diff options
| author | Jules Blok <jules.blok@gmail.com> | 2014-07-08 00:47:57 +0200 |
|---|---|---|
| committer | Jules Blok <jules.blok@gmail.com> | 2014-07-08 22:30:44 +0200 |
| commit | db7e746cb423de5ca47be7a3df7c4918a610ff5a (patch) | |
| tree | 43d90ab33c8001daa493173c717ab52bee3d494d /Source/Core/DolphinWX/Frame.cpp | |
| parent | ad1b61af2e5d5b4c63c6d7ed052775e1c2858c39 (diff) | |
Check whether the core is running instead of checking if it is unitialized.
This properly handles the stopping state and more accurately represents the intended check.
Diffstat (limited to 'Source/Core/DolphinWX/Frame.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Frame.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 38b8ae7df0..03cc67250d 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -217,7 +217,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa case WM_CLOSE: // Let Core finish initializing before accepting any WM_CLOSE messages - if (Core::GetState() == Core::CORE_UNINITIALIZED) break; + if (!Core::IsRunning()) break; // Use default action otherwise default: @@ -722,7 +722,7 @@ void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height) void CFrame::OnRenderWindowSizeRequest(int width, int height) { - if (Core::GetState() == Core::CORE_UNINITIALIZED || + if (!Core::IsRunning() || !SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize || RendererIsFullscreen() || m_RenderFrame->IsMaximized()) return; @@ -1109,8 +1109,7 @@ void CFrame::OnKeyDown(wxKeyEvent& event) void CFrame::OnKeyUp(wxKeyEvent& event) { - if(Core::GetState() != Core::CORE_UNINITIALIZED && - (RendererHasFocus() || TASInputHasFocus())) + if(Core::IsRunning() && (RendererHasFocus() || TASInputHasFocus())) { if (IsHotkey(event, HK_TOGGLE_THROTTLE)) { |
