fixed keyboard

This commit is contained in:
Alan Steremberg
2021-06-30 08:59:09 -04:00
parent 6f700ec6f1
commit 5ec4dcf7af
2 changed files with 6 additions and 1 deletions

View File

@@ -29,7 +29,7 @@ Size=560,393
Collapsed=0
[Window][CPU Registers]
Pos=1349,13
Pos=1261,13
Size=269,188
Collapsed=0

View File

@@ -5,6 +5,7 @@
#ifndef _MSC_VER
#include <SDL2/SDL.h>
const Uint8* m_keyboardState;
const Uint8* m_keyboardState_last;
#else
#define WIN32
#include <dinput.h>
@@ -72,9 +73,13 @@ void SimInput::Read() {
#endif
}
#ifdef WIN32
for (unsigned char k = 0; k < 256; k++) {
m_keyboardState_last[k] = m_keyboardState[k];
}
#else
m_keyboardState_last = m_keyboardState;
#endif
}