mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user