void Pcsx2App::SysApplySettings() { if( AppRpc_TryInvoke(&Pcsx2App::SysApplySettings) ) return; CoreThread.ApplySettings( g_Conf->EmuOptions ); CDVD_SourceType cdvdsrc( g_Conf->CdvdSource ); if( cdvdsrc != CDVDsys_GetSourceType() || (cdvdsrc == CDVD_SourceType::Iso && (CDVDsys_GetFile(cdvdsrc) != g_Conf->CurrentIso)) ) { CoreThread.ResetCdvd(); } CDVDsys_SetFile(CDVD_SourceType::Iso, g_Conf->CurrentIso ); }
void AppCoreThread::ChangeCdvdSource() { if( !GetSysExecutorThread().IsSelf() ) { GetSysExecutorThread().PostEvent( new SysExecEvent_InvokeCoreThreadMethod(&AppCoreThread::ChangeCdvdSource) ); return; } CDVD_SourceType cdvdsrc( g_Conf->CdvdSource ); if( cdvdsrc == CDVDsys_GetSourceType() ) return; // Fast change of the CDVD source only -- a Pause will suffice. ScopedCoreThreadPause paused_core; GetCorePlugins().Close( PluginId_CDVD ); CDVDsys_ChangeSource( cdvdsrc ); paused_core.AllowResume(); // TODO: Add a listener for CDVDsource changes? Or should we bother? }