void MainEmuFrame::Menu_IsoBrowse_Click( wxCommandEvent &event ) { ScopedCoreThreadPopup core; wxString isofile; if( !_DoSelectIsoBrowser(isofile) ) { core.AllowResume(); return; } SwapOrReset_Iso(this, core, isofile, GetMsg_IsoImageChanged()); AppSaveSettings(); // save the new iso selection; update menus! }
wxWindowID SwapOrReset_CdvdSrc( wxWindow* owner, CDVD_SourceType newsrc ) { if(newsrc == g_Conf->CdvdSource) return wxID_CANCEL; wxWindowID result = wxID_CANCEL; ScopedCoreThreadPopup core; if( SysHasValidState() ) { wxDialogWithHelpers dialog( owner, _("Confirm CDVD source change") ); wxString changeMsg; changeMsg.Printf(_("You've selected to switch the CDVD source from %s to %s."), CDVD_SourceLabels[g_Conf->CdvdSource], CDVD_SourceLabels[newsrc] ); dialog += dialog.Heading(changeMsg + L"\n\n" + _("Do you want to swap discs or boot the new image (system reset)?") ); result = pxIssueConfirmation( dialog, MsgButtons().Reset().Cancel().Custom(_("Swap Disc"), "swap"), L"DragDrop.BootSwapIso" ); if( result == wxID_CANCEL ) { core.AllowResume(); sMainFrame.UpdateIsoSrcSelection(); return result; } } CDVD_SourceType oldsrc = g_Conf->CdvdSource; g_Conf->CdvdSource = newsrc; if( result != wxID_RESET ) { Console.Indent().WriteLn( L"(CdvdSource) HotSwapping CDVD source types from %s to %s.", CDVD_SourceLabels[oldsrc], CDVD_SourceLabels[newsrc] ); //CoreThread.ChangeCdvdSource(); sMainFrame.UpdateIsoSrcSelection(); core.AllowResume(); } else { core.DisallowResume(); sApp.SysExecute( g_Conf->CdvdSource ); } GetMainFrame().EnableCdvdPluginSubmenu( g_Conf->CdvdSource == CDVDsrc_Plugin ); return result; }
void MainEmuFrame::Menu_ResetAllSettings_Click(wxCommandEvent &event) { if( IsBeingDeleted() || m_RestartEmuOnDelete ) return; { ScopedCoreThreadPopup suspender; if( !Msgbox::OkCancel( pxsFmt( pxE( L"This command clears %s settings and allows you to re-run the First-Time Wizard. You will need to manually restart %s after this operation.\n\nWARNING!! Click OK to delete *ALL* settings for %s and force-close the app, losing any current emulation progress. Are you absolutely sure?\n\n(note: settings for plugins are unaffected)" ), WX_STR(pxGetAppName()), WX_STR(pxGetAppName()), WX_STR(pxGetAppName()) ), _("Reset all settings?") ) ) { suspender.AllowResume(); return; } } WipeSettings(); wxGetApp().PostMenuAction( MenuId_Exit ); }