diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 3278f7df0d..f77346ea27 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -684,7 +684,6 @@ void CFrame::GetRenderWindowSize(int& x, int& y, int& width, int& height) void CFrame::OnRenderWindowSizeRequest(int width, int height) { if (Core::GetState() == Core::CORE_UNINITIALIZED || - !SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain || !SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize || RendererIsFullscreen() || m_RenderFrame->IsMaximized()) return; @@ -693,8 +692,10 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height) m_RenderFrame->GetClientSize(&old_width, &old_height); // Add space for the log/console/debugger window - if ((SConfig::GetInstance().m_InterfaceLogWindow || SConfig::GetInstance().m_InterfaceConsole || - SConfig::GetInstance().m_InterfaceLogConfigWindow) && + if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && + (SConfig::GetInstance().m_InterfaceLogWindow || + SConfig::GetInstance().m_InterfaceConsole || + SConfig::GetInstance().m_InterfaceLogConfigWindow) && !m_Mgr->GetPane(wxT("Pane 1")).IsFloating()) { switch (m_Mgr->GetPane(wxT("Pane 1")).dock_direction) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 4feeaf4b76..8b74dcf5f4 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -145,7 +145,7 @@ class CFrame : public CRenderFrame #ifdef __WXGTK__ Common::Event panic_event; bool bPanicResult; - std::mutex keystate_lock; + std::recursive_mutex keystate_lock; #endif #if defined(HAVE_XRANDR) && HAVE_XRANDR diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 7441fc4c62..5b55ab5bc3 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -1023,7 +1023,7 @@ void CFrame::DoStop() { #if defined __WXGTK__ wxMutexGuiLeave(); - std::lock_guard lk(keystate_lock); + std::lock_guard lk(keystate_lock); wxMutexGuiEnter(); #endif // Ask for confirmation in case the user accidentally clicked Stop / Escape diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 239f936a21..c0f3ed4709 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -584,8 +584,8 @@ bool Host_GetKeyState(int keycode) #ifdef _WIN32 return GetAsyncKeyState(keycode); #elif defined __WXGTK__ - std::unique_lock lk(main_frame->keystate_lock, std::defer_lock); - if (!lk.try_lock()) + std::unique_lock lk(main_frame->keystate_lock, std::try_to_lock); + if (!lk.owns_lock()) return false; bool key_pressed;