From b9e1d1b4de713c031353ec300113bd776961625c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 9 Oct 2022 19:49:34 -0400 Subject: [PATCH] events: Rename SDL_SendKeyboardKeyComplete to SDL_SendKeyboardKeyAndKeycode.+ --- src/events/SDL_keyboard.c | 2 +- src/events/SDL_keyboard_c.h | 2 +- src/video/emscripten/SDL_emscriptenevents.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/events/SDL_keyboard.c b/src/events/SDL_keyboard.c index c139dbdf1..87fee123b 100644 --- a/src/events/SDL_keyboard.c +++ b/src/events/SDL_keyboard.c @@ -976,7 +976,7 @@ SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode) } int -SDL_SendKeyboardKeyComplete(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) +SDL_SendKeyboardKeyAndKeycode(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode) { return SDL_SendKeyboardKeyInternal(KEYBOARD_HARDWARE, state, scancode, keycode); } diff --git a/src/events/SDL_keyboard_c.h b/src/events/SDL_keyboard_c.h index 653392131..db9703aaf 100644 --- a/src/events/SDL_keyboard_c.h +++ b/src/events/SDL_keyboard_c.h @@ -55,7 +55,7 @@ extern int SDL_SendKeyboardKeyAutoRelease(SDL_Scancode scancode); /* This is for platforms that don't know the keymap but can report scancode and keycode directly. Most platforms should prefer to optionally call SDL_SetKeymap and then use SDL_SendKeyboardKey. */ -extern int SDL_SendKeyboardKeyComplete(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode); +extern int SDL_SendKeyboardKeyAndKeycode(Uint8 state, SDL_Scancode scancode, SDL_Keycode keycode); /* Release all the autorelease keys */ extern void SDL_ReleaseAutoReleaseKeys(void); diff --git a/src/video/emscripten/SDL_emscriptenevents.c b/src/video/emscripten/SDL_emscriptenevents.c index 6c2a17df9..deb12b47a 100644 --- a/src/video/emscripten/SDL_emscriptenevents.c +++ b/src/video/emscripten/SDL_emscriptenevents.c @@ -818,7 +818,7 @@ Emscripten_HandleKey(int eventType, const EmscriptenKeyboardEvent *keyEvent, voi } if (scancode != SDL_SCANCODE_UNKNOWN) { - SDL_SendKeyboardKeyComplete(eventType == EMSCRIPTEN_EVENT_KEYDOWN ? SDL_PRESSED : SDL_RELEASED, scancode, keycode); + SDL_SendKeyboardKeyAndKeycode(eventType == EMSCRIPTEN_EVENT_KEYDOWN ? SDL_PRESSED : SDL_RELEASED, scancode, keycode); } /* if TEXTINPUT events are enabled we can't prevent keydown or we won't get keypress