diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-07 05:25:19 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-07-07 05:25:19 +0000 |
| commit | 14b4acb8311b0c513150e44a8fc300907523d194 (patch) | |
| tree | 03b52524237628153880d2aa7fc0c336ed8db381 /libpcsxcore/plugins.c | |
| parent | dd4b2eaa7fc19e3988b6a6a6e41f0784126ef7b3 (diff) | |
| download | pcsxr-14b4acb8311b0c513150e44a8fc300907523d194.tar.gz | |
#ifdef'ed out Sio1 interface for now (using uninitialized ptr in plugins.c could result in potential bad thing)
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@54254 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'libpcsxcore/plugins.c')
| -rw-r--r-- | libpcsxcore/plugins.c | 34 |
1 files changed, 26 insertions, 8 deletions
diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index d1371751..6b23e12e 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -136,6 +136,8 @@ NETrecvPadData NET_recvPadData; NETsetInfo NET_setInfo;
NETkeypressed NET_keypressed;
+#ifdef ENABLE_SIO1API
+
SIO1init SIO1_init;
SIO1shutdown SIO1_shutdown;
SIO1open SIO1_open;
@@ -170,6 +172,8 @@ SIO1readBaud16 SIO1_readBaud16; SIO1readBaud32 SIO1_readBaud32;
SIO1registerCallback SIO1_registerCallback;
+#endif
+
static const char *err;
#define CheckErr(func) { \
@@ -596,6 +600,8 @@ static int LoadNETplugin(const char *NETdll) { return 0;
}
+#ifdef ENABLE_SIO1API
+
void *hSIO1Driver = NULL;
long CALLBACK SIO1__init(void) { return 0; }
@@ -648,13 +654,13 @@ void CALLBACK SIO1irq(void) { static int LoadSIO1plugin(const char *SIO1dll) {
void *drv;
-/*
+
hSIO1Driver = SysLoadLibrary(SIO1dll);
if (hSIO1Driver == NULL) {
SysMessage (_("Could not load SIO1 plugin %s!"), SIO1dll); return -1;
}
drv = hSIO1Driver;
-*/
+
LoadSio1Sym0(init, "SIO1init");
LoadSio1Sym0(shutdown, "SIO1shutdown");
LoadSio1Sym0(open, "SIO1open");
@@ -691,6 +697,8 @@ static int LoadSIO1plugin(const char *SIO1dll) { return 0;
}
+#endif
+
void CALLBACK clearDynarec(void) {
psxCpu->Reset();
}
@@ -727,9 +735,11 @@ int LoadPlugins() { sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Net);
if (LoadNETplugin(Plugin) == -1) Config.UseNet = FALSE;
}
-
+
+#ifdef ENABLE_SIO1API
sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Sio1);
- if (LoadSIO1plugin(Plugin) == -1) return -1;
+ if (LoadSIO1plugin(Plugin) == -1) return -1;
+#endif
ret = CDR_init();
if (ret < 0) { SysMessage (_("Error initializing CD-ROM plugin: %d"), ret); return -1; }
@@ -746,9 +756,11 @@ int LoadPlugins() { ret = NET_init();
if (ret < 0) { SysMessage (_("Error initializing NetPlay plugin: %d"), ret); return -1; }
}
-
+
+#ifdef ENABLE_SIO1API
ret = SIO1_init();
- if (ret < 0) { SysMessage (_("Error initializing SIO1 plugin: %d"), ret); return -1; }
+ if (ret < 0) { SysMessage (_("Error initializing SIO1 plugin: %d"), ret); return -1; }
+#endif
SysPrintf(_("Plugins loaded.\n"));
return 0;
@@ -766,7 +778,6 @@ void ReleasePlugins() { if (hSPUDriver != NULL) SPU_shutdown();
if (hPAD1Driver != NULL) PAD1_shutdown();
if (hPAD2Driver != NULL) PAD2_shutdown();
- if (hSIO1Driver != NULL) SIO1_shutdown();
if (Config.UseNet && hNETDriver != NULL) NET_shutdown();
@@ -775,11 +786,18 @@ void ReleasePlugins() { if (hSPUDriver != NULL) SysCloseLibrary(hSPUDriver); hSPUDriver = NULL;
if (hPAD1Driver != NULL) SysCloseLibrary(hPAD1Driver); hPAD1Driver = NULL;
if (hPAD2Driver != NULL) SysCloseLibrary(hPAD2Driver); hPAD2Driver = NULL;
- if (hSIO1Driver != NULL) SysCloseLibrary(hSIO1Driver); hSIO1Driver = NULL;
if (Config.UseNet && hNETDriver != NULL) {
SysCloseLibrary(hNETDriver); hNETDriver = NULL;
}
+
+#ifdef ENABLE_SIO1API
+ if (hSIO1Driver != NULL) {
+ SIO1_shutdown();
+ SysCloseLibrary(hSIO1Driver);
+ hSIO1Driver = NULL;
+ }
+#endif
}
void SetIsoFile(const char *filename) {
|
