mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-23 18:05:31 +00:00
Merge commit '7ac5d616f3732b4d98010331d2ae0a24f883092d' into main
This commit is contained in:
commit
6d3ce729a6
|
@ -2390,14 +2390,11 @@ class SDLInputConnection extends BaseInputConnection {
|
|||
// Workaround to capture backspace key. Ref: http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection
|
||||
// and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
|
||||
if (beforeLength > 0 && afterLength == 0) {
|
||||
boolean ret = true;
|
||||
// backspace(s)
|
||||
while (beforeLength-- > 0) {
|
||||
boolean ret_key = sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
|
||||
&& sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
|
||||
ret = ret && ret_key;
|
||||
nativeGenerateScancodeForUnichar('\b');
|
||||
}
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.deleteSurroundingText(beforeLength, afterLength);
|
||||
|
|
|
@ -45,7 +45,7 @@ static ASCIIKeyInfo SDL_ASCIIKeyInfoTable[] = {
|
|||
/* 5 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 6 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 7 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 8 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 8 */ { SDL_SCANCODE_BACKSPACE, 0 },
|
||||
/* 9 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 10 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
/* 11 */ { SDL_SCANCODE_UNKNOWN, 0 },
|
||||
|
|
Loading…
Reference in a new issue