J :
* Next try
This commit is contained in:
+12
-9
@@ -586,15 +586,18 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window
|
|||||||
case WM_KEYDOWN: // Update Keyboard Buffers For Keys Pressed
|
case WM_KEYDOWN: // Update Keyboard Buffers For Keys Pressed
|
||||||
if ((wParam >= 0) && (wParam <= 255)) // Is Key (wParam) In A Valid Range?
|
if ((wParam >= 0) && (wParam <= 255)) // Is Key (wParam) In A Valid Range?
|
||||||
{
|
{
|
||||||
g_keys[wParam] = TRUE; // Set The Selected Key (wParam) To True
|
g_keys[wParam] = true; // Set The Selected Key (wParam) To True
|
||||||
g_holds[wParam] = TRUE;
|
if (false == g_holds[wParam])
|
||||||
for (signed int i = sizeof(gWinKeyCodes)/sizeof(gWinKeyCodes[0]) - 1; i >= 0; --i)
|
{
|
||||||
if (gWinKeyCodes[i] == wParam)
|
g_holds[wParam] = true;
|
||||||
if (false == gThisFrame[i])
|
for (signed int i = sizeof(gWinKeyCodes)/sizeof(gWinKeyCodes[0]) - 1; i >= 0; --i)
|
||||||
{
|
if (gWinKeyCodes[i] == wParam)
|
||||||
gThisFrame[i] = true;
|
if (false == gThisFrame[i])
|
||||||
gKeyBuffer.push(make_pair(gPSPKeyMasks[i], wParam));
|
{
|
||||||
}
|
gThisFrame[i] = true;
|
||||||
|
gKeyBuffer.push(make_pair(gPSPKeyMasks[i], wParam));
|
||||||
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break; // Break
|
break; // Break
|
||||||
|
|||||||
Reference in New Issue
Block a user