Fixed timing of memcpy of keys to keysLast #86
|
@ -44,6 +44,9 @@ namespace SHADE
|
||||||
void SHInputManager::UpdateInput(double dt) noexcept
|
void SHInputManager::UpdateInput(double dt) noexcept
|
||||||
{
|
{
|
||||||
//Keyboard and Mouse Buttons////////////////////////////////////////////////
|
//Keyboard and Mouse Buttons////////////////////////////////////////////////
|
||||||
|
//Write to lastKeys
|
||||||
|
memcpy(keysLast, keys, sizeof(keys));
|
||||||
|
|
||||||
//Poll
|
//Poll
|
||||||
unsigned char keyboardState[MAX_KEYS];
|
unsigned char keyboardState[MAX_KEYS];
|
||||||
//if (GetKeyboardState(keyboardState) == false) return;
|
//if (GetKeyboardState(keyboardState) == false) return;
|
||||||
|
@ -96,9 +99,6 @@ namespace SHADE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Write to lastKeys
|
|
||||||
memcpy(keysLast, keys, sizeof(keys));
|
|
||||||
|
|
||||||
//Mouse Positioning/////////////////////////////////////
|
//Mouse Positioning/////////////////////////////////////
|
||||||
//https://stackoverflow.com/a/6423739
|
//https://stackoverflow.com/a/6423739
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue