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