mirror of https://github.com/PCSX2/pcsx2.git
gsdump: force close-shutdown when gsdump is the callee
This commit is contained in:
parent
f407c5aabd
commit
501225c630
|
@ -29,6 +29,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Utilities/pxStreams.h"
|
#include "Utilities/pxStreams.h"
|
||||||
|
#include "gui/Dialogs/ModalPopups.h"
|
||||||
|
|
||||||
#include "svnrev.h"
|
#include "svnrev.h"
|
||||||
#include "ConsoleLogger.h"
|
#include "ConsoleLogger.h"
|
||||||
|
@ -901,7 +902,7 @@ void SysCorePlugins::Close( PluginsEnum_t pid )
|
||||||
{
|
{
|
||||||
pxAssert( (uint)pid < PluginId_Count );
|
pxAssert( (uint)pid < PluginId_Count );
|
||||||
|
|
||||||
if( !IsOpen(pid) ) return;
|
if (!(IsOpen(pid) || GSDump::isRunning) ) return;
|
||||||
|
|
||||||
if( !GetMTGS().IsSelf() ) // stop the spam!
|
if( !GetMTGS().IsSelf() ) // stop the spam!
|
||||||
Console.Indent().WriteLn( "Closing %s", tbl_PluginInfo[pid].shortname );
|
Console.Indent().WriteLn( "Closing %s", tbl_PluginInfo[pid].shortname );
|
||||||
|
@ -920,7 +921,7 @@ void SysCorePlugins::Close( PluginsEnum_t pid )
|
||||||
|
|
||||||
void SysCorePlugins::Close()
|
void SysCorePlugins::Close()
|
||||||
{
|
{
|
||||||
if( !NeedsClose() ) return; // Spam stopper; returns before writing any logs. >_<
|
if( !(NeedsClose() || GSDump::isRunning) ) return; // Spam stopper; returns before writing any logs. >_<
|
||||||
|
|
||||||
// Close plugins in reverse order of the initialization procedure, which
|
// Close plugins in reverse order of the initialization procedure, which
|
||||||
// ensures the GS gets closed last.
|
// ensures the GS gets closed last.
|
||||||
|
|
|
@ -24,6 +24,7 @@
|
||||||
#include "Plugins.h"
|
#include "Plugins.h"
|
||||||
#include "GS.h"
|
#include "GS.h"
|
||||||
#include "AppConfig.h"
|
#include "AppConfig.h"
|
||||||
|
#include "gui/Dialogs/ModalPopups.h"
|
||||||
|
|
||||||
using namespace Threading;
|
using namespace Threading;
|
||||||
|
|
||||||
|
@ -328,7 +329,7 @@ bool AppCorePlugins::Shutdown()
|
||||||
|
|
||||||
void AppCorePlugins::Close()
|
void AppCorePlugins::Close()
|
||||||
{
|
{
|
||||||
if (!NeedsClose())
|
if (!(NeedsClose() || GSDump::isRunning))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PostPluginStatus(CorePlugins_Closing);
|
PostPluginStatus(CorePlugins_Closing);
|
||||||
|
|
|
@ -68,7 +68,6 @@
|
||||||
#undef ECX
|
#undef ECX
|
||||||
#include <wx/osx/private.h> // needed to implement the app!
|
#include <wx/osx/private.h> // needed to implement the app!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxIMPLEMENT_APP(Pcsx2App);
|
wxIMPLEMENT_APP(Pcsx2App);
|
||||||
|
|
||||||
std::unique_ptr<AppConfig> g_Conf;
|
std::unique_ptr<AppConfig> g_Conf;
|
||||||
|
|
|
@ -178,7 +178,6 @@ void Dialogs::GSDumpDialog::RunDump(wxCommandEvent& event)
|
||||||
m_selection->Enable();
|
m_selection->Enable();
|
||||||
m_vsync->Enable();
|
m_vsync->Enable();
|
||||||
m_run->Disable();
|
m_run->Disable();
|
||||||
GetCorePlugins().Shutdown();
|
|
||||||
|
|
||||||
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));
|
||||||
|
|
||||||
|
@ -807,13 +806,14 @@ void Dialogs::GSDumpDialog::GSThread::ExecuteTaskInThread()
|
||||||
{
|
{
|
||||||
if (!window->IsShown())
|
if (!window->IsShown())
|
||||||
{
|
{
|
||||||
|
GetCorePlugins().Close();
|
||||||
|
GetCorePlugins().Shutdown();
|
||||||
sApp.CloseGsPanel();
|
sApp.CloseGsPanel();
|
||||||
GSDump::isRunning = false;
|
GSDump::isRunning = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GetCorePlugins().Close();
|
|
||||||
OnStop();
|
OnStop();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue