diff options
Diffstat (limited to 'libpcsxcore/plugins.c')
-rw-r--r-- | libpcsxcore/plugins.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libpcsxcore/plugins.c b/libpcsxcore/plugins.c index f965e0d..57e7ef2 100644 --- a/libpcsxcore/plugins.c +++ b/libpcsxcore/plugins.c @@ -794,6 +794,23 @@ void ReleasePlugins() { #endif
}
+// for CD swap
+int ReloadCdromPlugin()
+{
+ if (hCDRDriver != NULL || cdrIsoActive()) CDR_shutdown();
+ if (hCDRDriver != NULL) SysCloseLibrary(hCDRDriver); hCDRDriver = NULL;
+
+ if (UsingIso()) {
+ LoadCDRplugin(NULL);
+ } else {
+ char Plugin[MAXPATHLEN];
+ sprintf(Plugin, "%s/%s", Config.PluginsDir, Config.Cdr);
+ if (LoadCDRplugin(Plugin) == -1) return -1;
+ }
+
+ return CDR_init();
+}
+
void SetIsoFile(const char *filename) {
if (filename == NULL) {
IsoFile[0] = '\0';
|