MRI: Add 'System.raw_key_states' to query full keyboard state
Returns a byte array with all key states (0 = released, 1 = pressed) indexed via SDL_SCANCODE_* enums.
This commit is contained in:
parent
e44a1e32fa
commit
4a8b0f30c8
3 changed files with 29 additions and 17 deletions
|
@ -34,7 +34,7 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
bool EventThread::keyStates[] = { false };
|
||||
uint8_t EventThread::keyStates[] = { false };
|
||||
|
||||
EventThread::JoyState EventThread::joyState =
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ struct SDL_Window;
|
|||
class EventThread
|
||||
{
|
||||
public:
|
||||
static bool keyStates[SDL_NUM_SCANCODES];
|
||||
static uint8_t keyStates[SDL_NUM_SCANCODES];
|
||||
|
||||
struct JoyState
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue