wx: keep execute and SPU_Pause together
execute=false and SPU_Pause(1) belongs together (avoid sound problems). From: Jan Bücken (nooris), #3301520
This commit is contained in:
parent
3503f1cc56
commit
b7a9d5085f
|
@ -165,6 +165,7 @@ void DesmumeFrame::NDSInitialize() {
|
|||
void DesmumeFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
execute = false;
|
||||
SPU_Pause(1);
|
||||
NDS_DeInit();
|
||||
Close(true);
|
||||
}
|
||||
|
@ -249,8 +250,9 @@ void DesmumeFrame::LoadRom(wxCommandEvent& event)
|
|||
wxFileDialog dialog(this,_T("Load Rom"),wxGetHomeDir(),_T(""),_T("*.nds"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
|
||||
if(dialog.ShowModal() == wxID_OK) {
|
||||
history->AddFileToHistory(dialog.GetPath());
|
||||
execute = true;
|
||||
NDS_LoadROM(dialog.GetPath().mb_str(), dialog.GetPath().mb_str());
|
||||
execute = true;
|
||||
SPU_Pause(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -649,9 +651,10 @@ void DesmumeFrame::OnOpenRecent(wxCommandEvent &event) {
|
|||
size_t id = event.GetId()-wxID_FILE1;
|
||||
|
||||
ret = NDS_LoadROM(history->GetHistoryFile(id).mb_str(), history->GetHistoryFile(id).mb_str());
|
||||
if (ret > 0)
|
||||
if (ret > 0) {
|
||||
execute = true;
|
||||
else
|
||||
SPU_Pause(0);
|
||||
} else
|
||||
history->RemoveFileFromHistory(id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue