mirror of https://github.com/PCSX2/pcsx2.git
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
This commit is contained in:
parent
d7391badf4
commit
9eadf353d9
|
@ -386,6 +386,11 @@ namespace Implementations
|
||||||
if (g_Pcsx2Recording) {
|
if (g_Pcsx2Recording) {
|
||||||
// start recording
|
// start recording
|
||||||
if (GSsetupRecording) {
|
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.
|
// 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 (GSsetupRecording(g_Pcsx2Recording, NULL)) {
|
||||||
if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL);
|
if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL);
|
||||||
|
@ -393,6 +398,10 @@ namespace Implementations
|
||||||
// recording dialog canceled by the user. align our state
|
// recording dialog canceled by the user. align our state
|
||||||
g_Pcsx2Recording ^= 1;
|
g_Pcsx2Recording ^= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (GetMainFramePtr())
|
||||||
|
GetMainFramePtr()->Enable();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// the GS doesn't support recording.
|
// the GS doesn't support recording.
|
||||||
if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL);
|
if (SPU2setupRecording) SPU2setupRecording(g_Pcsx2Recording, NULL);
|
||||||
|
|
Loading…
Reference in New Issue