From e455659467282d23dc20f1fe0ec517c3695409c9 Mon Sep 17 00:00:00 2001 From: Jaylon Gowie Date: Fri, 10 Sep 2021 21:13:51 -0500 Subject: [PATCH] Simplify Backspace and Enter --- src/video/vita/SDL_vitavideo.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/video/vita/SDL_vitavideo.c b/src/video/vita/SDL_vitavideo.c index aebca8410..9f9feed33 100644 --- a/src/video/vita/SDL_vitavideo.c +++ b/src/video/vita/SDL_vitavideo.c @@ -428,8 +428,7 @@ void VITA_ImeEventHandler(void *arg, const SceImeEventData *e) switch (e->id) { case SCE_IME_EVENT_UPDATE_TEXT: if (e->param.text.caretIndex == 0) { - scancode = SDL_GetScancodeFromKey(0x08); - SDL_SendKeyboardKeyAutoRelease(scancode); + SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_BACKSPACE); sceImeSetText((SceWChar16 *)libime_initval, 4); } else { @@ -449,8 +448,7 @@ void VITA_ImeEventHandler(void *arg, const SceImeEventData *e) } break; case SCE_IME_EVENT_PRESS_ENTER: - scancode = SDL_GetScancodeFromKey(0x0D); - SDL_SendKeyboardKeyAutoRelease(scancode); + SDL_SendKeyboardKeyAutoRelease(SDL_SCANCODE_RETURN); case SCE_IME_EVENT_PRESS_CLOSE: sceImeClose(); videodata->ime_active = SDL_FALSE;