On Android, when the user enters "ら", "ん", "す" with the virtual
keyboard and converts it to "ランス", xsystem4 receives the following
events:
SDL_TEXTINPUT("ら")
SDL_TEXTINPUT("ん")
SDL_TEXTINPUT("す")
SDL_KEYDOWN(backspace)
SDL_KEYUP(backspace)
SDL_KEYDOWN(backspace)
SDL_KEYUP(backspace)
SDL_KEYDOWN(backspace)
SDL_KEYUP(backspace)
SDL_TEXTINPUT("ランス")
The backspace key events are generated by SDL to delete the unconverted
text. However, System4 games process the backspace key by polling, so
if the SDL_KEYDOWN and SDL_KEYUP events occur in close succession, the
game cannot detect that the backspace key has been pressed.
To solve this problem, this patch queues these consecutive input events
and processes them with an interval of at least 10ms.
Fixes https://github.com/kichikuou/xsystem4-android/issues/2.