Simplify Backspace and Enter

This commit is contained in:
Jaylon Gowie 2021-09-10 21:13:51 -05:00 committed by Sam Lantinga
parent 88578dc9cb
commit e455659467
1 changed files with 2 additions and 4 deletions

View File

@ -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;