summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b752ff4)
raw | patch | inline | side by side (parent: b752ff4)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 24 Jun 2018 13:08:26 +0000 (16:08 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Sun, 24 Jun 2018 13:08:47 +0000 (16:08 +0300) |
src/game/g_main.pas | patch | blob | history | |
src/game/g_options.pas | patch | blob | history |
diff --git a/src/game/g_main.pas b/src/game/g_main.pas
index 34de5cf99b8397a677492d5bcec19060bf434b7b..bb394f1d1b94761447c373d1b45335462118c574 100644 (file)
--- a/src/game/g_main.pas
+++ b/src/game/g_main.pas
TMsgType.Notify
);
- e_WriteLog('Read config file', TMsgType.Notify);
- g_Options_Read(GameDir + '/' + CONFIG_FILENAME);
-
{$IFDEF HEADLESS}
conbufDumpToStdOut := true;
{$ENDIF}
e_WriteToStdOut := False; //{$IFDEF HEADLESS}True;{$ELSE}False;{$ENDIF}
- //GetSystemDefaultLCID()
-
- //e_WriteLog('Read language file', MSG_NOTIFY);
- //g_Language_Load(DataDir + gLanguage + '.txt');
- e_WriteLog(gLanguage, TMsgType.Notify);
- g_Language_Set(gLanguage);
-
{$IFDEF HEADLESS}
{$IFDEF USE_SDLMIXER}
sdlflags := SDL_INIT_TIMER or SDL_INIT_AUDIO or $00004000;
if SDL_Init(sdlflags) < 0 then
raise Exception.Create('SDL: Init failed: ' + SDL_GetError());
+ e_WriteLog('Read config file', TMsgType.Notify);
+ g_Options_Read(GameDir + '/' + CONFIG_FILENAME);
+
+ //GetSystemDefaultLCID()
+
+ //e_WriteLog('Read language file', MSG_NOTIFY);
+ //g_Language_Load(DataDir + gLanguage + '.txt');
+ e_WriteLog(gLanguage, TMsgType.Notify);
+ g_Language_Set(gLanguage);
+
{$IFNDEF HEADLESS}
{$IFNDEF ANDROID}
SDL_StartTextInput();
diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index 42b3ef70704fe4fb9469680c8fbc802f83728a0a..493e07cb48c9475bd4043c04ddbc253a1756cf3b 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
procedure g_Options_SetDefaultVideo;
{$IF DEFINED(ANDROID)}
var
- display: PSDL_DisplayMode;
+ display: TSDL_DisplayMode;
{$ENDIF}
begin
{$IF DEFINED(ANDROID)}
(* On android set max screen size *)
- SDL_GetCurrentDisplayMode(0, display);
+ SDL_GetCurrentDisplayMode(0, @display);
gScreenWidth := display.w;
gScreenHeight := display.h;
gWinRealPosX := 0;
gTextureFilter := True;
glLegacyNPOT := False;
{$ENDIF}
+ e_LogWriteLn('g_Options_SetDefaultVideo: w = ' + IntToStr(gScreenWidth) + ' h = ' + IntToStr(gScreenHeight));
end;
procedure g_Options_SetDefault();