DEADSOFTWARE

fix android
[d2df-sdl.git] / src / game / g_main.pas
index 7d0dfb264e1daefb77761bbb7fc4a3ba0d935380..6a6df2af907e9a4c3f4d83943bb6ac24013ecc87 100644 (file)
@@ -84,22 +84,17 @@ begin
 {$ENDIF}
   e_WriteToStdOut := False; //{$IFDEF HEADLESS}True;{$ELSE}False;{$ENDIF}
 
-  e_WriteLog('Init Input', TMsgType.Notify);
   e_InitInput;
 
-  e_WriteLog('Read config file', TMsgType.Notify);
+  sys_Init;
   g_Options_Read(GameDir + '/' + CONFIG_FILENAME);
-  g_Console_SysInit;
-
-  //GetSystemDefaultLCID()
+  if sys_SetDisplayMode(gScreenWidth, gScreenHeight, gBPP, gFullScreen) = False then
+    raise Exception.Create('Failed to set videomode on startup.');
 
-  //e_WriteLog('Read language file', MSG_NOTIFY);
-  //g_Language_Load(DataDir + gLanguage + '.txt');
+  g_Console_SysInit;
   e_WriteLog(gLanguage, TMsgType.Notify);
   g_Language_Set(gLanguage);
 
-  sys_Init;
-
 {$IF not DEFINED(HEADLESS) and DEFINED(ENABLE_HOLMES)}
   flexloaded := true;
   if not fuiAddWad('flexui.wad') then