wx: Pause spu and emulation before loading a rom
xrmx: kept only the hunk that pause and not the one that reenable the previous state, i think we should stay paused and the user should act to continue playing. Based on a patch from: Jan Bücken (nooris), #3301520
This commit is contained in:
parent
0a5a3c383c
commit
9b2821de3a
|
@ -249,6 +249,9 @@ void DesmumeFrame::applyInput()
|
|||
|
||||
void DesmumeFrame::LoadRom(wxCommandEvent& event)
|
||||
{
|
||||
execute = false;
|
||||
SPU_Pause(1);
|
||||
|
||||
wxFileDialog dialog(this,_T("Load Rom"),wxGetHomeDir(),_T(""),_T("*.nds"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
||||
if(dialog.ShowModal() == wxID_OK) {
|
||||
history->AddFileToHistory(dialog.GetPath());
|
||||
|
@ -652,6 +655,9 @@ void DesmumeFrame::OnOpenRecent(wxCommandEvent &event) {
|
|||
int ret;
|
||||
size_t id = event.GetId()-wxID_FILE1;
|
||||
|
||||
execute = false;
|
||||
SPU_Pause(1);
|
||||
|
||||
ret = NDS_LoadROM(history->GetHistoryFile(id).mb_str(), history->GetHistoryFile(id).mb_str());
|
||||
if (ret > 0) {
|
||||
execute = true;
|
||||
|
|
Loading…
Reference in New Issue