diff --git a/src/game/g_options.pas b/src/game/g_options.pas
index ac80a1b1f786cd8d11f7356510ca1c743b344b6a..f15e7c7718e8568906c3afea23ba9ed108daf5d6 100644 (file)
--- a/src/game/g_options.pas
+++ b/src/game/g_options.pas
function GenPlayerName (n: Integer): String;
-procedure g_Options_SetDefault();
+procedure g_Options_SetDefault;
+procedure g_Options_SetDefaultVideo;
procedure g_Options_Read(FileName: String);
procedure g_Options_Write(FileName: String);
procedure g_Options_Write_Language(FileName: String);
gSFSFastMode: Boolean;
gDefaultMegawadStart: AnsiString;
gBerserkAutoswitch: Boolean;
+ glNPOTOverride: Boolean = false;
implementation
percentage: Integer;
begin
(* Display 0 = Primary display *)
- SDL_GetDesktopDisplayMode(0, @display);
- {$IF DEFINED(ANDROID)}
+ gScreenWidth := 640;
+ gScreenHeight := 480;
+ //gBPP := SDL_BITSPERPIXEL(dispaly.format);
+ gBPP := 32;
+ {$IFDEF ANDROID}
+ gFullScreen := True; (* rotation not allowed? *)
+ {$ELSE}
+ gFullScreen := False;
+ {$ENDIF}
+ if SDL_GetDesktopDisplayMode(0, @display) = 0 then
+ begin
+ {$IFDEF ANDROID}
gScreenWidth := display.w;
gScreenHeight := display.h;
- //gBPP := SDL_BITSPERPIXEL(dispaly.format);
- gBPP := 32;
- gFullScreen := True; (* rotation not allowed? *)
{$ELSE}
(* Window must be smaller than display *)
closest.w := display.w;
gScreenWidth := closest.w;
gScreenHeight := closest.h;
//gBPP := SDL_BITSPERPIXEL(closest.format); (* Resolution list didn't work for some reason *)
- gBPP := 32;
- gFullScreen := False;
{$ENDIF}
+ end
+ else
+ begin
+ e_LogWritefln('SDL: Failed to get desktop display mode: %s', [SDL_GetError])
+ end;
(* Must be positioned on primary display *)
gWinRealPosX := SDL_WINDOWPOS_CENTERED;
gWinRealPosY := SDL_WINDOWPOS_CENTERED;
{$ELSE}
procedure g_Options_SetDefaultVideo;
begin
- {$WARNING stub}
gScreenWidth := 640;
gScreenHeight := 480;
gBPP := 32;
(* section MasterServer *)
NetSlistIP := 'mpms.doom2d.org';
NetSlistPort := 25665;
- g_Net_Slist_Set(NetSlistIP, NetSlistPort);
+ g_Net_Slist_Set(NetSlistIP, NetSlistPort, NetSlistList);
(* section Server *)
NetServerName := 'Unnamed Server';
ReadInteger(gFreq, 'Freq', 0);
ReadBoolean(gVSync, 'VSync');
ReadBoolean(gTextureFilter, 'TextureFilter');
- ReadBoolean(glLegacyNPOT, 'LegacyCompatible');
+ ReadBoolean(glNPOTOverride, 'LegacyCompatibleForce');
section := 'Sound';
ReadBoolean(gNoSound, 'NoSound');
section := 'MasterServer';
ReadString(NetSlistIP, 'IP');
ReadInteger(NetSlistPort, 'Port', 0, 65535);
- g_Net_Slist_Set(NetSlistIP, NetSlistPort);
+ ReadString(NetSlistList, 'List');
+ g_Net_Slist_Set(NetSlistIP, NetSlistPort, NetSlistList);
section := 'Server';
ReadString(NetServerName, 'Name');
config.WriteInt('Video', 'BPP', gBPP);
config.WriteBool('Video', 'VSync', gVSync);
config.WriteBool('Video', 'TextureFilter', gTextureFilter);
- config.WriteBool('Video', 'LegacyCompatible', glLegacyNPOT);
+ config.WriteBool('Video', 'LegacyCompatibleForce', glNPOTOverride);
config.WriteBool('Sound', 'NoSound', gNoSound);
config.WriteInt('Sound', 'SoundLevel', gSoundLevel);
config.WriteStr('MasterServer', 'IP', NetSlistIP);
config.WriteInt('MasterServer', 'Port', NetSlistPort);
+ config.WriteStr('MasterServer', 'List', NetSlistList);
config.WriteStr ('Server', 'Name', NetServerName);
config.WriteStr ('Server', 'Password', NetPassword);