mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 13:49:53 -06:00
revert to r4531, but keep the changes from the following revisions: 4533,4550-4551,4556-4559
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4566 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -10,7 +10,6 @@
|
||||
namespace EmuWindow
|
||||
{
|
||||
HWND m_hWnd = NULL;
|
||||
HWND m_hMain = NULL;
|
||||
HWND m_hParent = NULL;
|
||||
HINSTANCE m_hInstance = NULL;
|
||||
WNDCLASSEX wndClass;
|
||||
@ -37,9 +36,6 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( iMsg )
|
||||
{
|
||||
case WM_CREATE:
|
||||
PostMessage( m_hMain, WM_USER, WM_USER_CREATE, g_Config.RenderToMainframe );
|
||||
break;
|
||||
case WM_PAINT:
|
||||
{
|
||||
HDC hdc;
|
||||
@ -58,18 +54,9 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
break;
|
||||
|
||||
case WM_KEYDOWN:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case VK_ESCAPE:
|
||||
SendMessage(m_hWnd, WM_CLOSE, 0, 0);
|
||||
break;
|
||||
}
|
||||
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
|
||||
break;
|
||||
case WM_SYSKEYDOWN:
|
||||
switch( LOWORD( wParam ))
|
||||
{
|
||||
case VK_RETURN: // Pressing Esc switch FullScreen/Windowed
|
||||
case VK_ESCAPE: // Pressing Esc switch FullScreen/Windowed
|
||||
if (g_ActiveConfig.bFullscreen)
|
||||
{
|
||||
DestroyWindow(hWnd);
|
||||
@ -131,7 +118,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
}*/
|
||||
break;
|
||||
}
|
||||
//g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
|
||||
g_VideoInitialize.pKeyPress(LOWORD(wParam), GetAsyncKeyState(VK_SHIFT) != 0, GetAsyncKeyState(VK_CONTROL) != 0);
|
||||
break;
|
||||
|
||||
/* Post thes mouse events to the main window, it's nessesary because in difference to the
|
||||
@ -145,7 +132,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
||||
case WM_CLOSE:
|
||||
//Fifo_ExitLoopNonBlocking();
|
||||
//Shutdown();
|
||||
PostMessage( m_hMain, WM_USER, WM_USER_STOP, 0 );
|
||||
PostMessage( m_hParent, WM_USER, OPENGL_WM_USER_STOP, 0 );
|
||||
// Simple hack to easily exit without stopping. Hope to fix the stopping errors soon.
|
||||
//ExitProcess(0);
|
||||
return 0;
|
||||
@ -200,7 +187,7 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
||||
|
||||
if (g_Config.RenderToMainframe)
|
||||
{
|
||||
m_hParent = m_hMain = parent;
|
||||
m_hParent = parent;
|
||||
|
||||
m_hWnd = CreateWindowEx(0, m_szClassName, title, WS_CHILD,
|
||||
0, 0, width, height,
|
||||
@ -211,8 +198,6 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
||||
}
|
||||
else
|
||||
{
|
||||
m_hMain = parent;
|
||||
|
||||
DWORD style = g_Config.bFullscreen ? WS_POPUP : WS_OVERLAPPEDWINDOW;
|
||||
|
||||
RECT rc = {0, 0, width, height};
|
||||
@ -228,7 +213,7 @@ HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const T
|
||||
|
||||
m_hWnd = CreateWindowEx(0, m_szClassName, title, style,
|
||||
rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top,
|
||||
NULL, NULL, hInstance, NULL);
|
||||
NULL, NULL, hInstance, NULL );
|
||||
}
|
||||
|
||||
return m_hWnd;
|
||||
|
Reference in New Issue
Block a user