From 3e0171ea1b81ca273e2e62047965876021017edb Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 23 Apr 2016 18:02:57 +0200 Subject: [PATCH] Tried some asynchronus input method, but doesn't seems to works --- Sources/Engine/Base/SDL/SDLInput.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/Engine/Base/SDL/SDLInput.cpp b/Sources/Engine/Base/SDL/SDLInput.cpp index 8596a5f..17ebefa 100755 --- a/Sources/Engine/Base/SDL/SDLInput.cpp +++ b/Sources/Engine/Base/SDL/SDLInput.cpp @@ -724,6 +724,7 @@ void CInput::GetInput(BOOL bPreScan) // clear button's buffer memset( inp_ubButtonsBuffer, 0, sizeof( inp_ubButtonsBuffer)); + Uint8 *keystate = SDL_GetKeyboardState(NULL); // for each Key for (INDEX iKey=0; iKey=0) { // is state is pressed - if (SDL_GetKeyboardState(NULL)[SDL_GetScancodeFromKey((SDL_Keycode)iVirt)]) { + if (keystate[SDL_GetScancodeFromKey((SDL_Keycode)iVirt)]) { // mark it as pressed inp_ubButtonsBuffer[iKID] = 0xFF; }