summaryrefslogtreecommitdiff
path: root/Source/Plugins
diff options
context:
space:
mode:
authorluisr142004 <luisr142004@gmail.com>2010-02-09 00:34:27 +0000
committerluisr142004 <luisr142004@gmail.com>2010-02-09 00:34:27 +0000
commitc291a2db676c330bec77e77cc08ed5210be3daae (patch)
treeac01153020c6a5802164060096a2866ed29c61ed /Source/Plugins
parente93e777ffb941af612805ee438db5b8c0e5b5c73 (diff)
make ESC pause the game now instead of quitting plus fix another bug with key and window handling
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5035 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins')
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp10
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp4
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp4
3 files changed, 11 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp
index 1fc63db440..162075d1f1 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/EmuWindow.cpp
@@ -101,8 +101,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
// Pressing Esc switches to Windowed mode from Fullscreen mode
ToggleFullscreen(hWnd);
}
- // And stops the emulation when already in Windowed mode
- PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
+ // And pauses the emulation when already in Windowed mode
+ PostMessage(m_hMain, WM_USER, WM_USER_PAUSE, 0);
}
break;
case '3': // OSD keys
@@ -130,6 +130,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
break;
+ default:
+ return DefWindowProc(hWnd, iMsg, wParam, lParam);
}
break;
@@ -144,7 +146,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
case WM_CLOSE:
// When the user closes the window, we post an event to the main window to call Stop()
// Which then handles all the necessary steps to Shutdown the core + the plugins
- if (m_hParent == NULL)
+ if (!g_Config.RenderToMainframe)
{
PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
}
@@ -171,6 +173,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
case SC_SCREENSAVE:
case SC_MONITORPOWER:
break;
+ default:
+ return DefWindowProc(hWnd, iMsg, wParam, lParam);
}
break;
default:
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
index 58e527e0f8..0831d97463 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/OS/Win32.cpp
@@ -250,8 +250,8 @@ void OnKeyDown(WPARAM wParam)
// Pressing Esc switches to Windowed mode from Fullscreen mode
ToggleFullscreen(m_hWnd);
}
- // then stops the emulation if already Windowed
- SendMessage(m_hWnd, WM_CLOSE, 0, 0);
+ // then pauses the emulation if already Windowed
+ SendMessage(m_hMain, WM_USER, WM_USER_PAUSE, 0);
}
break;
case '3': // OSD keys
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
index 5b374f8ca1..1ce1763454 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
@@ -162,8 +162,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
// Pressing Esc switches to Windowed mode from Fullscreen mode
ToggleFullscreen(hWnd);
}
- // And stops the emulation when already in Windowed mode
- PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
+ // And pause the emulation when already in Windowed mode
+ PostMessage(m_hMain, WM_USER, WM_USER_PAUSE, 0);
break;
}
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);