mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 22:32:03 +00:00
Adds a key reset upon screen mode changes in SDL.
This commit is contained in:
parent
7728adfc5a
commit
15deef50c8
@ -461,6 +461,12 @@ int main(int argc, char *argv[]) {
|
|||||||
fullscreen_mode ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
|
fullscreen_mode ^= SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||||
SDL_SetWindowFullscreen(window, fullscreen_mode);
|
SDL_SetWindowFullscreen(window, fullscreen_mode);
|
||||||
SDL_ShowCursor((fullscreen_mode&SDL_WINDOW_FULLSCREEN_DESKTOP) ? SDL_DISABLE : SDL_ENABLE);
|
SDL_ShowCursor((fullscreen_mode&SDL_WINDOW_FULLSCREEN_DESKTOP) ? SDL_DISABLE : SDL_ENABLE);
|
||||||
|
|
||||||
|
// Announce a potential discontinuity in keyboard input.
|
||||||
|
auto keyboard_machine = machine->keyboard_machine();
|
||||||
|
if(keyboard_machine) {
|
||||||
|
keyboard_machine->get_keyboard().reset_all_keys();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user