mirror of
https://github.com/love2d/megasource.git
synced 2026-08-19 20:20:11 +02:00
Updated SDL2 to the latest code from Mercurial.
This commit is contained in:
@@ -845,6 +845,19 @@ SDL_SetModState(SDL_Keymod modstate)
|
||||
keyboard->modstate = modstate;
|
||||
}
|
||||
|
||||
/* Note that SDL_ToggleModState() is not a public API. SDL_SetModState() is. */
|
||||
void
|
||||
SDL_ToggleModState(const SDL_Keymod modstate, const SDL_bool toggle)
|
||||
{
|
||||
SDL_Keyboard *keyboard = &SDL_keyboard;
|
||||
if (toggle) {
|
||||
keyboard->modstate |= modstate;
|
||||
} else {
|
||||
keyboard->modstate &= ~modstate;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SDL_Keycode
|
||||
SDL_GetKeyFromScancode(SDL_Scancode scancode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user