summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
diff options
context:
space:
mode:
authorluisr142004 <luisr142004@gmail.com>2010-02-08 09:57:52 +0000
committerluisr142004 <luisr142004@gmail.com>2010-02-08 09:57:52 +0000
commit3f90bb215ce88634cb8772d93dd03c6129fdef3b (patch)
treeff44f04a2d06d3a60e4ed3224465163f814e5b49 /Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
parent3915f0fbcabf8f2bb4fbf69cf57d9788eef3a1f0 (diff)
make ESC quit the game instead of toggling out of/into full screen mode (fixes issue 2246),
implement proper window handling (d3d/sw) which i believe fixes a hang that occurs when a game is stopped (plz test this :)) + some minor stuff git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5030 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp29
1 files changed, 12 insertions, 17 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
index 6c9ab4ac20..5b374f8ca1 100644
--- a/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
+++ b/Source/Plugins/Plugin_VideoSoftware/Src/Win32.cpp
@@ -23,7 +23,7 @@
#include <wx/dialog.h>
#include <wx/aboutdlg.h>
-#include "../VideoConfig.h"
+#include "VideoConfig.h"
#include "main.h"
#include "Win32.h"
@@ -135,7 +135,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
case WM_PAINT:
hdc = BeginPaint( hWnd, &ps );
EndPaint( hWnd, &ps );
- return 0;
+ break;
case WM_SYSKEYDOWN:
switch( LOWORD( wParam ))
@@ -145,31 +145,25 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
if (m_hParent == NULL && !g_Config.renderToMainframe)
{
ToggleFullscreen(hWnd);
- return 0;
}
break;
case VK_F5: case VK_F6: case VK_F7: case VK_F8:
PostMessage(m_hMain, WM_SYSKEYDOWN, wParam, lParam);
- return 0;
+ break;
}
break;
case WM_KEYDOWN:
- switch( LOWORD( wParam ))
+ switch (LOWORD( wParam ))
{
case VK_ESCAPE:
if (g_Config.bFullscreen)
{
- // Pressing Esc switch to Windowed in Fullscreen mode
+ // Pressing Esc switches to Windowed mode from Fullscreen mode
ToggleFullscreen(hWnd);
- return 0;
- }
- else if (!g_Config.renderToMainframe)
- {
- // And stops the emulation when already in Windowed mode
- PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
- return 0;
}
+ // And stops the emulation when already in Windowed mode
+ PostMessage(m_hMain, WM_USER, WM_USER_STOP, 0);
break;
}
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
@@ -214,8 +208,8 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
{
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon.
ExitProcess(0);
- return 0;
}
+ break;
case WM_DESTROY:
//Shutdown();
@@ -228,12 +222,13 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
{
case SC_SCREENSAVE:
case SC_MONITORPOWER:
- return 0;
+ break;
}
break;
+ default:
+ return DefWindowProc(hWnd, iMsg, wParam, lParam);
}
-
- return DefWindowProc(hWnd, iMsg, wParam, lParam);
+ return 0;
}