--- a/hedgewars/hwengine.pas Fri Nov 08 17:53:02 2013 +0400
+++ b/hedgewars/hwengine.pas Sun Nov 10 01:45:43 2013 +0400
@@ -154,13 +154,8 @@
case event.type_ of
{$IFDEF SDL2}
SDL_KEYDOWN:
- if GameState = gsChat then
- begin
- // sdl on iphone supports only ashii keyboards and the unicode field is deprecated in sdl 1.3
- KeyPressChat(SDL_GetKeyFromScancode(event.key.keysym.sym), event.key.keysym.sym); //TODO correct for keymodifiers
- end
- else
- if GameState >= gsGame then ProcessKey(event.key);
+ if (GameState <> gsChat) and (GameState >= gsGame) then
+ ProcessKey(event.key);
SDL_KEYUP:
if (GameState <> gsChat) and (GameState >= gsGame) then
ProcessKey(event.key);
@@ -177,6 +172,9 @@
SDL_MOUSEWHEEL:
ProcessMouseWheel(event.wheel.x, event.wheel.y);
+ SDL_TEXTINPUT: AddFileLog('[Text input] ' + event.text.text);
+ SDL_TEXTEDITING: AddFileLog('[Text edit] ''' + event.edit.text + ''' ' + inttostr(event.edit.start) + ' ' + inttostr(event.edit.length));
+
SDL_WINDOWEVENT:
if event.window.event = SDL_WINDOWEVENT_SHOWN then
begin
@@ -352,7 +350,7 @@
WriteLnToConsole(msgOK);
{$IFDEF SDL2}
- SDL_StartTextInput();
+ //SDL_StartTextInput();
{$ELSE}
SDL_EnableUNICODE(1);
{$ENDIF}