summaryrefslogtreecommitdiff
path: root/libpcsxcore/plugins.c
diff options
context:
space:
mode:
authorSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-10 07:11:29 +0000
committerSND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2010-05-10 07:11:29 +0000
commit78470f808411136437789aee0d33fbe0c892daea (patch)
tree881982366f2b13fd535ac0160d505764bc0e19ba /libpcsxcore/plugins.c
parent92679bf72724dc122da6c69c20d9f785a230af4b (diff)
downloadpcsxr-78470f808411136437789aee0d33fbe0c892daea.tar.gz
got rid of cdrfilename & cdOpenCase, windows broken for now
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@47753 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/plugins.c')
-rw-r--r--libpcsxcore/plugins.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c
index cd8fc8cc..59d14bb6 100644
--- a/libpcsxcore/plugins.c
+++ b/libpcsxcore/plugins.c
@@ -24,8 +24,8 @@
#include "plugins.h"
#include "cdriso.h"
-char cdrfilename[MAXPATHLEN] = ""; // FIXME: cleanup
-int cdOpenCase = 0; // FIXME: cleanup
+static char IsoFile[MAXPATHLEN] = "";
+static s64 cdOpenCaseTime = 0;
GPUupdateLace GPU_updateLace;
GPUinit GPU_init;
@@ -213,7 +213,7 @@ long CALLBACK CDR__play(unsigned char *sector) { return 0; }
long CALLBACK CDR__stop(void) { return 0; }
long CALLBACK CDR__getStatus(struct CdrStat *stat) {
- if (cdOpenCase < 0 || cdOpenCase > time(NULL))
+ if (cdOpenCaseTime < 0 || cdOpenCaseTime > (s64)time(NULL))
stat->Status = 0x10;
else
stat->Status = 0;
@@ -460,7 +460,7 @@ int LoadPlugins() {
ReleasePlugins();
- if (cdrfilename[0] != '\0') {
+ if (UsingIso()) {
LoadCDRplugin(NULL);
} else {
sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr);
@@ -511,7 +511,7 @@ void ReleasePlugins() {
if (Config.UseNet) {
int ret = NET_close();
if (ret < 0) Config.UseNet = 0;
- NetOpened = 0;
+ NetOpened = FALSE;
}
if (hCDRDriver != NULL || cdrIsoActive()) CDR_shutdown();
@@ -532,3 +532,23 @@ void ReleasePlugins() {
SysCloseLibrary(hNETDriver); hNETDriver = NULL;
}
}
+
+void SetIsoFile(const char *filename) {
+ if (filename == NULL) {
+ IsoFile[0] = '\0';
+ return;
+ }
+ strncpy(IsoFile, filename, MAXPATHLEN);
+}
+
+const char *GetIsoFile(void) {
+ return IsoFile;
+}
+
+boolean UsingIso(void) {
+ return (IsoFile[0] != '\0');
+}
+
+void SetCdOpenCaseTime(s64 time) {
+ cdOpenCaseTime = time;
+}