diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 7d0dfb264e1daefb77761bbb7fc4a3ba0d935380..0269a4c9315d2d700320061cd60f4b02774c4354 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
charbuff: packed array [0..15] of AnsiChar;
procedure Main();
-var
- sdlflags: LongWord;
-{$IF not DEFINED(HEADLESS) and DEFINED(ENABLE_HOLMES)}
- flexloaded: Boolean;
+{$IFDEF ENABLE_HOLMES}
+ var flexloaded: Boolean;
{$ENDIF}
begin
e_InitWritelnDriver();
{$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;
+ if sys_SetDisplayMode(gScreenWidth, gScreenHeight, gBPP, gFullScreen) = False then
+ raise Exception.Create('Failed to set videomode on startup.');
- //GetSystemDefaultLCID()
-
- //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