From a86f79f44777e4dbca6a3f09802e707e44b67013 Mon Sep 17 00:00:00 2001 From: Matt Callaghan Date: Fri, 29 Apr 2011 23:02:06 +0000 Subject: [PATCH] Quick fix for Dolphin crashing when using 3D and clicking anywhere on screen. Basically just re-adding something that I removed a while ago... it wasn't needed anymore, apparently it is again. Note: Newest nVidia drivers break Dolphins 3D (270.xx), not sure why yet, gonna ask around. It really confused me though when trying to fix this issue, spent at least an hour trying to figure out what the hell was going on. I eventually realised a build I knew worked in 3D was having issues... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7487 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/EmuWindow.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Core/VideoCommon/Src/EmuWindow.cpp b/Source/Core/VideoCommon/Src/EmuWindow.cpp index 6820d18f04..dbd223c368 100644 --- a/Source/Core/VideoCommon/Src/EmuWindow.cpp +++ b/Source/Core/VideoCommon/Src/EmuWindow.cpp @@ -172,6 +172,13 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam ) /* Post the mouse events to the main window, it's nessesary because in difference to the keyboard inputs these events only appear here, not in the parent window or any other WndProc()*/ case WM_LBUTTONDOWN: + if(g_ActiveConfig.backend_info.bSupports3DVision && g_ActiveConfig.b3DVision) + { + // This basically throws away the left button down input when b3DVision is activated so WX + // can't get access to it, stopping focus pulling on mouse click. + // (Input plugins use a different system so it doesn't cause too much weirdness) + break; + } case WM_LBUTTONUP: case WM_LBUTTONDBLCLK: PostMessage(GetParentWnd(), iMsg, wParam, lParam); @@ -303,13 +310,6 @@ void Show() BringWindowToTop(m_hWnd); UpdateWindow(m_hWnd); SetFocus(m_hParent); - - if(g_ActiveConfig.backend_info.bSupports3DVision && g_ActiveConfig.b3DVision) - { - SetActiveWindow(m_hParent); - SetForegroundWindow(m_hWnd); - } - } HWND Create(HWND hParent, HINSTANCE hInstance, const TCHAR *title)