This commit is contained in:
Vadim Grigoruk 2018-08-26 10:35:41 +03:00
parent 516e39f679
commit e151bab3f1
1 changed files with 3 additions and 2 deletions

View File

@ -397,16 +397,17 @@ static void processMouse()
static void processKeyboard() static void processKeyboard()
{ {
tic_mem* tic = platform.studio->tic;
{ {
SDL_Keymod mod = SDL_GetModState(); SDL_Keymod mod = SDL_GetModState();
platform.keyboard.state[tic_key_shift] = mod & KMOD_SHIFT; platform.keyboard.state[tic_key_shift] = mod & KMOD_SHIFT;
platform.keyboard.state[tic_key_ctrl] = mod & (KMOD_CTRL | KMOD_GUI); platform.keyboard.state[tic_key_ctrl] = mod & (KMOD_CTRL | KMOD_GUI);
platform.keyboard.state[tic_key_alt] = mod & KMOD_ALT;
platform.keyboard.state[tic_key_capslock] = mod & KMOD_CAPS; platform.keyboard.state[tic_key_capslock] = mod & KMOD_CAPS;
} }
tic80_input* input = &platform.studio->tic->ram.input; tic80_input* input = &tic->ram.input;
input->keyboard.data = 0; input->keyboard.data = 0;
enum{BufSize = COUNT_OF(input->keyboard.keys)}; enum{BufSize = COUNT_OF(input->keyboard.keys)};