From 9eadf353d957b01eddb09a39062b41f6f04304bc Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Mon, 5 Oct 2015 20:57:14 +0300 Subject: [PATCH] gui: recording dialog - make pseudo-modal also for the main window The dialog was already modal for the GS window, but the main window wasn't blocked and pcsx2 could crash if, e.g. the user tried to close the main window while the recording dialog was visible. Fixes #879 --- pcsx2/gui/GlobalCommands.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pcsx2/gui/GlobalCommands.cpp b/pcsx2/gui/GlobalCommands.cpp index f39adcf734..f6d81d9b06 100644 --- a/pcsx2/gui/GlobalCommands.cpp +++ b/pcsx2/gui/GlobalCommands.cpp @@ -386,6 +386,11 @@ namespace Implementations if (g_Pcsx2Recording) { // start recording if (GSsetupRecording) { + // make the recording-config dialog[s] pseudo-modal also for the main PCSX2 window + // (it's already properly modal for the GS window) + if (GetMainFramePtr()) + GetMainFramePtr()->Disable(); + // GSsetupRecording can be aborted/canceled by the user. Don't go on to record the audio if that happens. if (GSsetupRecording(g_Pcsx2Recording, NULL)) { if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL); @@ -393,6 +398,10 @@ namespace Implementations // recording dialog canceled by the user. align our state g_Pcsx2Recording ^= 1; } + + if (GetMainFramePtr()) + GetMainFramePtr()->Enable(); + } else { // the GS doesn't support recording. if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL);