mirror of
https://github.com/libretro/snes9x.git
synced 2024-11-30 20:11:00 +00:00
win32: differentiate between left and right special keys
This commit is contained in:
parent
09df5e1406
commit
1fb5d790e3
@ -959,17 +959,36 @@ static LRESULT CALLBACK InputCustomWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
|
||||
return 1;
|
||||
case WM_USER+45:
|
||||
case WM_KEYDOWN:
|
||||
TranslateKey(wParam,temp);
|
||||
{
|
||||
UINT scancode = (lParam & 0x00ff0000) >> 16;
|
||||
int extended = (lParam & 0x01000000) != 0;
|
||||
|
||||
switch (wParam) {
|
||||
case VK_SHIFT:
|
||||
wParam = MapVirtualKey(scancode, MAPVK_VSC_TO_VK_EX);
|
||||
break;
|
||||
case VK_CONTROL:
|
||||
wParam = extended ? VK_RCONTROL : VK_LCONTROL;
|
||||
break;
|
||||
case VK_MENU:
|
||||
wParam = extended ? VK_RMENU : VK_LMENU;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
TranslateKey(wParam, temp);
|
||||
col = CheckButtonKey(wParam);
|
||||
|
||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||
icp->crBackGnd = col;
|
||||
SetWindowText(hwnd,_tFromChar(temp));
|
||||
SetWindowText(hwnd, _tFromChar(temp));
|
||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||
UpdateWindow(icp->hwnd);
|
||||
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
||||
SendMessage(pappy, WM_USER + 43, wParam, (LPARAM)hwnd);
|
||||
|
||||
break;
|
||||
}
|
||||
case WM_USER+44:
|
||||
|
||||
TranslateKey(wParam,temp);
|
||||
|
Loading…
Reference in New Issue
Block a user