diff options
| author | notaz | 2011-02-08 18:21:17 +0200 | 
|---|---|---|
| committer | notaz | 2011-02-10 02:07:54 +0200 | 
| commit | 1df403c52368a3930b67dedabf8c0e1d522f1cc3 (patch) | |
| tree | 2c5b522c3626332d287704a3a1800aa9f923d809 /libpcsxcore/plugins.c | |
| parent | cdb31c9557f464b452ce6dc78b58b7e73cd423d8 (diff) | |
| download | pcsx_rearmed-1df403c52368a3930b67dedabf8c0e1d522f1cc3.tar.gz pcsx_rearmed-1df403c52368a3930b67dedabf8c0e1d522f1cc3.tar.bz2 pcsx_rearmed-1df403c52368a3930b67dedabf8c0e1d522f1cc3.zip | |
add cd swap functionality
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';
 | 
