X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_main.pas;h=c290df5e6b2176f743ae93748f919b73bd14add9;hb=91448a18a3dad8151acb610601f79bf82bca6c91;hp=050ee1fbea50d4e9dbc978a1f805cc21adbfd137;hpb=cf154570c3e691c4b95c021376c810020d689167;p=d2df-sdl.git diff --git a/src/game/g_main.pas b/src/game/g_main.pas index 050ee1f..c290df5 100644 --- a/src/game/g_main.pas +++ b/src/game/g_main.pas @@ -139,7 +139,11 @@ procedure InitPath; function IsSep (ch: Char): Boolean; begin - result := (ch = '/') or (ch = '\') + {$IFDEF WINDOWS} + result := (ch = '/') or (ch = '\'); + {$ELSE} + result := (ch = '/'); + {$ENDIF} end; function OptimizePath (dir: AnsiString): AnsiString; @@ -432,6 +436,8 @@ begin e_InitWritelnDriver(); e_WriteLog('Doom 2D: Forever version ' + GAME_VERSION + ' proto ' + IntToStr(NET_PROTOCOL_VER), TMsgType.Notify); e_WriteLog('Build date: ' + GAME_BUILDDATE + ' ' + GAME_BUILDTIME, TMsgType.Notify); + e_WriteLog('Build hash: ' + g_GetBuildHash(), TMsgType.Notify); + e_WriteLog('Build by: ' + g_GetBuilderName(), TMsgType.Notify); e_LogWritefln('Force bin dir: %s', [forceBinDir], TMsgType.Notify); e_LogWritefln('BINARY PATH: [%s]', [binPath], TMsgType.Notify); @@ -484,20 +490,15 @@ begin e_InitInput; sys_Init; + g_Options_SetDefault; + g_Options_SetDefaultVideo; s := CONFIG_FILENAME; if e_FindResource(ConfigDirs, s) = true then - begin - g_Options_Read(s) - end - else - begin - g_Options_SetDefault; - g_Options_SetDefaultVideo - end; - if sys_SetDisplayMode(gScreenWidth, gScreenHeight, gBPP, gFullScreen) = False then + g_Options_Read(s); + g_Console_SysInit; + if sys_SetDisplayMode(gRC_Width, gRC_Height, gBPP, gRC_FullScreen, gRC_Maximized) = False then raise Exception.Create('Failed to set videomode on startup.'); - g_Console_SysInit; e_WriteLog(gLanguage, TMsgType.Notify); g_Language_Set(gLanguage); @@ -566,6 +567,7 @@ begin if assigned(oglDeinitCB) then oglDeinitCB; {$ENDIF} + g_Console_WriteGameConfig; sys_Final; end;