diff options
| author | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-07-21 17:54:43 -0400 |
|---|---|---|
| committer | Jasper St. Pierre <jstpierre@mecheye.net> | 2013-07-21 23:17:16 -0400 |
| commit | 52482115e17875d0cc56197e79dfe612e2ed35e1 (patch) | |
| tree | 463a6103fb200246522814b64d5f7903d9789d0c /Source/Core/VideoCommon | |
| parent | e742b32c6540bfd83bbd5eefa318839a7d57d313 (diff) | |
Move in-game keybinding handling to a central location
Instead of handling it separately in every backend.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/EmuWindow.cpp | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/Source/Core/VideoCommon/Src/EmuWindow.cpp b/Source/Core/VideoCommon/Src/EmuWindow.cpp index e8fa26a38b..fc4c049c80 100644 --- a/Source/Core/VideoCommon/Src/EmuWindow.cpp +++ b/Source/Core/VideoCommon/Src/EmuWindow.cpp @@ -8,7 +8,6 @@ #include "EmuWindow.h" #include "Fifo.h" #include "VertexShaderManager.h" -#include "RenderBase.h" #include "VideoBackendBase.h" #include "Core.h" #include "Host.h" @@ -42,28 +41,8 @@ HWND GetParentWnd() return m_hParent; } -// --------------------------------------------------------------------- -// KeyDown events -// ------------- -void OnKeyDown(WPARAM wParam) -{ - switch (LOWORD( wParam )) - { - case '3': // OSD keys - case '4': - case '5': - case '6': - case '7': - if (g_Config.bOSDHotKey) - OSDMenu(wParam); - break; - } -} -// --------------------------------------------------------------------- - void FreeLookInput( UINT iMsg, WPARAM wParam ) { - static float debugSpeed = 1.0f; static bool mouseLookEnabled = false; static bool mouseMoveEnabled = false; static float lastMouse[2]; @@ -71,34 +50,6 @@ void FreeLookInput( UINT iMsg, WPARAM wParam ) switch(iMsg) { - case WM_USER_KEYDOWN: - case WM_KEYDOWN: - switch (LOWORD(wParam)) - { - case '9': - debugSpeed /= 2.0f; - break; - case '0': - debugSpeed *= 2.0f; - break; - case 'W': - VertexShaderManager::TranslateView(0.0f, debugSpeed); - break; - case 'S': - VertexShaderManager::TranslateView(0.0f, -debugSpeed); - break; - case 'A': - VertexShaderManager::TranslateView(debugSpeed, 0.0f); - break; - case 'D': - VertexShaderManager::TranslateView(-debugSpeed, 0.0f); - break; - case 'R': - VertexShaderManager::ResetView(); - break; - } - break; - case WM_MOUSEMOVE: if (mouseLookEnabled) { @@ -190,11 +141,6 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam ) break; case WM_USER: - if (wParam == WM_USER_KEYDOWN) - { - OnKeyDown(lParam); - FreeLookInput((u32)wParam, lParam); - } break; // Called when a screensaver wants to show up while this window is active @@ -224,51 +170,6 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam ) return 0; } -// --------------------------------------------------------------------- -// OSD Menu -// ------------- -// Let's begin with 3 since 1 and 2 are default Wii keys -// ------------- -void OSDMenu(WPARAM wParam) -{ - switch( LOWORD( wParam )) - { - case '3': - OSDChoice = 1; - // Toggle native resolution - g_Config.iEFBScale = g_Config.iEFBScale + 1; - if (g_Config.iEFBScale > SCALE_4X) g_Config.iEFBScale = SCALE_AUTO; - break; - case '4': - OSDChoice = 2; - // Toggle aspect ratio - g_Config.iAspectRatio = (g_Config.iAspectRatio + 1) & 3; - break; - case '5': - OSDChoice = 3; - // Toggle EFB copy - if (!g_Config.bEFBCopyEnable) - { - g_Config.bEFBCopyEnable = true; - g_Config.bCopyEFBToTexture = false; - } - else if (!g_Config.bCopyEFBToTexture) - { - g_Config.bCopyEFBToTexture = true; - } - else - { - g_Config.bEFBCopyEnable = false; - g_Config.bCopyEFBToTexture = false; - } - break; - case '6': - OSDChoice = 4; - g_Config.bDisableFog = !g_Config.bDisableFog; - break; - } -} - HWND OpenWindow(HWND parent, HINSTANCE hInstance, int width, int height, const TCHAR *title) { wndClass.cbSize = sizeof( wndClass ); |
