mirror of https://github.com/snes9xgit/snes9x.git
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;
|
return 1;
|
||||||
case WM_USER+45:
|
case WM_USER+45:
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
TranslateKey(wParam,temp);
|
{
|
||||||
col = CheckButtonKey(wParam);
|
UINT scancode = (lParam & 0x00ff0000) >> 16;
|
||||||
|
int extended = (lParam & 0x01000000) != 0;
|
||||||
|
|
||||||
icp->crForeGnd = ((~col) & 0x00ffffff);
|
switch (wParam) {
|
||||||
icp->crBackGnd = col;
|
case VK_SHIFT:
|
||||||
SetWindowText(hwnd,_tFromChar(temp));
|
wParam = MapVirtualKey(scancode, MAPVK_VSC_TO_VK_EX);
|
||||||
InvalidateRect(icp->hwnd, NULL, FALSE);
|
break;
|
||||||
UpdateWindow(icp->hwnd);
|
case VK_CONTROL:
|
||||||
SendMessage(pappy,WM_USER+43,wParam,(LPARAM)hwnd);
|
wParam = extended ? VK_RCONTROL : VK_LCONTROL;
|
||||||
|
break;
|
||||||
|
case VK_MENU:
|
||||||
|
wParam = extended ? VK_RMENU : VK_LMENU;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
TranslateKey(wParam, temp);
|
||||||
|
col = CheckButtonKey(wParam);
|
||||||
|
|
||||||
|
icp->crForeGnd = ((~col) & 0x00ffffff);
|
||||||
|
icp->crBackGnd = col;
|
||||||
|
SetWindowText(hwnd, _tFromChar(temp));
|
||||||
|
InvalidateRect(icp->hwnd, NULL, FALSE);
|
||||||
|
UpdateWindow(icp->hwnd);
|
||||||
|
SendMessage(pappy, WM_USER + 43, wParam, (LPARAM)hwnd);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WM_USER+44:
|
case WM_USER+44:
|
||||||
|
|
||||||
TranslateKey(wParam,temp);
|
TranslateKey(wParam,temp);
|
||||||
|
|
Loading…
Reference in New Issue