diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-08-01 00:36:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-01 00:36:49 +0200 |
| commit | 2c0364d95c25f888b897b3d9996d9388cd36c249 (patch) | |
| tree | f1e7a8e690553dcfb8ebb44b53dc35639ceb04a2 /Source/Core/DolphinWX/FrameTools.cpp | |
| parent | 04bf2d612c2d8be658e944e76ec8bc3a58deb093 (diff) | |
| parent | d906462deea61e8e9285a39385e886908c1f1527 (diff) | |
Merge pull request #4058 from Aestek/fix/netplay-gui-freeze
NetPlay: Fix GUI freeze
Diffstat (limited to 'Source/Core/DolphinWX/FrameTools.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/FrameTools.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/FrameTools.cpp b/Source/Core/DolphinWX/FrameTools.cpp index 0ea5685a17..b3689e9ab5 100644 --- a/Source/Core/DolphinWX/FrameTools.cpp +++ b/Source/Core/DolphinWX/FrameTools.cpp @@ -1132,10 +1132,17 @@ void CFrame::DoStop() // Pause the state during confirmation and restore it afterwards Core::EState state = Core::GetState(); + // Do not pause if netplay is running as CPU thread might be blocked + // waiting on inputs + bool should_pause = !NetPlayDialog::GetNetPlayClient(); + // If exclusive fullscreen is not enabled then we can pause the emulation // before we've exited fullscreen. If not then we need to exit fullscreen first. - if (!RendererIsFullscreen() || !g_Config.ExclusiveFullscreenEnabled() || - SConfig::GetInstance().bRenderToMain) + should_pause = + should_pause && (!RendererIsFullscreen() || !g_Config.ExclusiveFullscreenEnabled() || + SConfig::GetInstance().bRenderToMain); + + if (should_pause) { Core::SetState(Core::CORE_PAUSE); } @@ -1149,7 +1156,9 @@ void CFrame::DoStop() HotkeyManagerEmu::Enable(true); if (Ret != wxID_YES) { - Core::SetState(state); + if (should_pause) + Core::SetState(state); + m_confirmStop = false; return; } |
