DEADSOFTWARE

gui: fix build with disabled render
[d2df-sdl.git] / src / flexui / sdlstandalone.pas
index 11f52108333395c3dc19a2279b67b93add82dda3..79506da918f8b42cc27522ac896b306acf6d592f 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
 {$INCLUDE ../shared/a_modes.inc}
 unit sdlstandalone;
 
+  {$IFNDEF USE_SDL2}
+    {$FATAL SDL2 required for flexui sdlstandalone}
+  {$ENDIF}
+
 interface
 
 uses
@@ -70,6 +73,7 @@ begin
   //SDL_Quit();
   result := true;
   fuiWinActive := fuiWinActive;
+  SDL_StartTextInput();
 end;
 
 
@@ -108,9 +112,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;