Fixed for compiler version 0.2.012
This commit is contained in:
@@ -94,14 +94,14 @@ update_sdl_input :: () {
|
||||
engine.input.exit = true;
|
||||
}
|
||||
case SDL_KEYDOWN; {
|
||||
keycode, success := table_find(*key_mappings, event.key.keysym.sym);
|
||||
success, keycode := table_find_new(*key_mappings, event.key.keysym.sym);
|
||||
|
||||
if success {
|
||||
update_key_state(keycode, true);
|
||||
}
|
||||
}
|
||||
case SDL_KEYUP; {
|
||||
keycode, success := table_find(*key_mappings, event.key.keysym.sym);
|
||||
success, keycode := table_find_new(*key_mappings, event.key.keysym.sym);
|
||||
|
||||
if success {
|
||||
update_key_state(keycode, false);
|
||||
@@ -249,7 +249,7 @@ sdl_gamepad_button_update :: (using event : SDL_ControllerButtonEvent) {
|
||||
}
|
||||
down := state == SDL_PRESSED;
|
||||
|
||||
gamepad_button, success := table_find(*sdl_button_map, cast(SDL_GameControllerButton)button);
|
||||
success, gamepad_button := table_find_new(*sdl_button_map, cast(SDL_GameControllerButton)button);
|
||||
|
||||
if success {
|
||||
gamepad := *engine.input.gamepads[which];
|
||||
|
||||
Reference in New Issue
Block a user