aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UIni.pas
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Game/Code/Classes/UIni.pas22
1 files changed, 16 insertions, 6 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 5d599eab..6b7f3cea 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -260,12 +260,22 @@ begin
for Pet := 0 to High(IScreens) do
if Tekst = IScreens[Pet] then Ini.Screens := Pet;
+ // FullScreen
+ Tekst := IniFile.ReadString('Graphics', 'FullScreen', 'On');
+ for Pet := 0 to High(IFullScreen) do
+ if Tekst = IFullScreen[Pet] then Ini.FullScreen := Pet;
+
+
// Resolution
SetLength(IResolution, 0);
Modes := SDL_ListModes(nil, SDL_OPENGL or SDL_FULLSCREEN); // Check if there are any modes available
repeat
SetLength(IResolution, Length(IResolution) + 1);
IResolution[High(IResolution)] := IntToStr(Modes^.w) + 'x' + IntToStr(Modes^.h);
+ Tekst := IniFile.ReadString('Graphics', 'Screens', IScreens[0]);
+
+ Log.LogStatus('SDL_ListModes Res : ' + IResolution[High(IResolution)], 'Graphics - Resolutions');
+
Inc(Modes);
until Modes^ = nil;
@@ -274,8 +284,12 @@ begin
// THANKS : linnex at users.sourceforge.net
if Length(IResolution) < 1 then
begin
- SetLength(IResolution, Length(IResolution) + 1);
- IResolution[High(IResolution)] := IntToStr(800) + 'x' + IntToStr(600);
+ SetLength(IResolution, Length(IResolution) + 1);
+ IResolution[High(IResolution)] := IntToStr(800) + 'x' + IntToStr(600);
+ Log.LogStatus('SDL_ListModes Defaulted Res To : ' + IResolution[High(IResolution)] , 'Graphics - Resolutions');
+
+ // Default to fullscreen OFF, in this case !
+ Ini.FullScreen := 0;
end;
// reverse order
@@ -289,10 +303,6 @@ begin
for Pet := 0 to High(IResolution) do
if Tekst = IResolution[Pet] then Ini.Resolution := Pet;
- // FullScreen
- Tekst := IniFile.ReadString('Graphics', 'FullScreen', 'On');
- for Pet := 0 to High(IFullScreen) do
- if Tekst = IFullScreen[Pet] then Ini.FullScreen := Pet;
// Resolution
Tekst := IniFile.ReadString('Graphics', 'Depth', '32 bit');