DEADSOFTWARE

tools: fix build with sdl2
[d2df-sdl.git] / src / flexui / sdlstandalone.pas
index 11f52108333395c3dc19a2279b67b93add82dda3..6b6dd8a3974cfce1f4ab6db4b1fb3486efe31091 100644 (file)
@@ -1,9 +1,8 @@
-(* Copyright (C)  DooM 2D:Forever Developers
+(* Copyright (C)  Doom 2D: Forever Developers
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -70,6 +69,7 @@ begin
   //SDL_Quit();
   result := true;
   fuiWinActive := fuiWinActive;
+  SDL_StartTextInput();
 end;
 
 
@@ -108,9 +108,10 @@ begin
   FillChar(ev, sizeof(ev), 0);
   while (SDL_PollEvent(@ev) > 0) do
   begin
-    if fuiOnSDLEvent(ev) then result := true;
+    fuiOnSDLEvent(ev);
     //if (ev.type_ = SDL_QUITEV) then exit;
   end;
+  if fuiQuitReceived then result := true;
 end;