J :
* Next try
This commit is contained in:
+5
-2
@@ -586,8 +586,10 @@ 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])
|
||||||
|
{
|
||||||
|
g_holds[wParam] = true;
|
||||||
for (signed int i = sizeof(gWinKeyCodes)/sizeof(gWinKeyCodes[0]) - 1; i >= 0; --i)
|
for (signed int i = sizeof(gWinKeyCodes)/sizeof(gWinKeyCodes[0]) - 1; i >= 0; --i)
|
||||||
if (gWinKeyCodes[i] == wParam)
|
if (gWinKeyCodes[i] == wParam)
|
||||||
if (false == gThisFrame[i])
|
if (false == gThisFrame[i])
|
||||||
@@ -595,6 +597,7 @@ LRESULT CALLBACK WndProc( HWND hWnd, // Handle For This Window
|
|||||||
gThisFrame[i] = true;
|
gThisFrame[i] = true;
|
||||||
gKeyBuffer.push(make_pair(gPSPKeyMasks[i], wParam));
|
gKeyBuffer.push(make_pair(gPSPKeyMasks[i], wParam));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
break; // Break
|
break; // Break
|
||||||
|
|||||||
Reference in New Issue
Block a user