mirror of https://github.com/PCSX2/pcsx2.git
gui: ESC on fullscreen: better resilience
Make sure we exit fullscreen only if the GS window is visible and in fullscreen. While we don't currently have such cases, it's possible that the Sys_Suspend command is called while it's already suspended (and the GS window is hidden) but the code without this patch would have incorrectly made it visible again.
This commit is contained in:
parent
9c1688a39a
commit
fa04f0970e
|
@ -282,7 +282,7 @@ namespace Implementations
|
||||||
void Sys_Suspend()
|
void Sys_Suspend()
|
||||||
{
|
{
|
||||||
GSFrame* gsframe = wxGetApp().GetGsFramePtr();
|
GSFrame* gsframe = wxGetApp().GetGsFramePtr();
|
||||||
if (gsframe) {
|
if (gsframe && gsframe->IsShown() && gsframe->IsFullScreen()) {
|
||||||
// On some cases, probably due to driver bugs, if we don't exit fullscreen then
|
// On some cases, probably due to driver bugs, if we don't exit fullscreen then
|
||||||
// the content stays on screen. Try to prevent that by first exiting fullscreen,
|
// the content stays on screen. Try to prevent that by first exiting fullscreen,
|
||||||
// but don't update the internal PCSX2 state/config, and PCSX2 will restore
|
// but don't update the internal PCSX2 state/config, and PCSX2 will restore
|
||||||
|
|
Loading…
Reference in New Issue