mirror of https://github.com/PCSX2/pcsx2.git
gsdump: reset state when dump is invalid & ensure you can't run it if started
This commit is contained in:
parent
d6a671d4ae
commit
00d680f4bd
|
@ -174,13 +174,8 @@ void Dialogs::GSDumpDialog::SelectedDump(wxListEvent& evt)
|
||||||
|
|
||||||
void Dialogs::GSDumpDialog::RunDump(wxCommandEvent& event)
|
void Dialogs::GSDumpDialog::RunDump(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
m_debug_mode->Enable();
|
if (!m_run->IsEnabled())
|
||||||
m_start->Enable();
|
return;
|
||||||
m_step->Enable();
|
|
||||||
m_selection->Enable();
|
|
||||||
m_vsync->Enable();
|
|
||||||
m_run->Disable();
|
|
||||||
|
|
||||||
m_thread->m_dump_file = std::make_unique<pxInputStream>(m_selected_dump, new wxFFileInputStream(m_selected_dump));
|
m_thread->m_dump_file = std::make_unique<pxInputStream>(m_selected_dump, new wxFFileInputStream(m_selected_dump));
|
||||||
|
|
||||||
if (!(m_thread->m_dump_file)->IsOk())
|
if (!(m_thread->m_dump_file)->IsOk())
|
||||||
|
@ -190,6 +185,12 @@ void Dialogs::GSDumpDialog::RunDump(wxCommandEvent& event)
|
||||||
wxMessageBox(s, _("GSDumpGov"), wxICON_ERROR);
|
wxMessageBox(s, _("GSDumpGov"), wxICON_ERROR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
m_run->Disable();
|
||||||
|
m_debug_mode->Enable();
|
||||||
|
m_start->Enable();
|
||||||
|
m_step->Enable();
|
||||||
|
m_selection->Enable();
|
||||||
|
m_vsync->Enable();
|
||||||
m_thread->Start();
|
m_thread->Start();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,6 +162,7 @@ namespace Dialogs
|
||||||
wxButton* m_selection;
|
wxButton* m_selection;
|
||||||
wxButton* m_vsync;
|
wxButton* m_vsync;
|
||||||
wxButton* m_run;
|
wxButton* m_run;
|
||||||
|
long m_focused_dump;
|
||||||
wxFileSystemWatcher m_fs_watcher;
|
wxFileSystemWatcher m_fs_watcher;
|
||||||
|
|
||||||
void GetDumpsList();
|
void GetDumpsList();
|
||||||
|
|
Loading…
Reference in New Issue