aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/UIni.pas
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-02 04:39:22 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-02 04:39:22 +0000
commitb29759fbfdd8a013e3d0a85b578934ebec028c41 (patch)
treedb75c93eea11c5e9f7d477be4f94b5dfe7559626 /Game/Code/Classes/UIni.pas
parentbcf55203a81aef383d0a7123996e872fa3a297dc (diff)
downloadusdx-b29759fbfdd8a013e3d0a85b578934ebec028c41.tar.gz
usdx-b29759fbfdd8a013e3d0a85b578934ebec028c41.tar.xz
usdx-b29759fbfdd8a013e3d0a85b578934ebec028c41.zip
Fixed linux compilation.
Linux is now running in the main loop fine. * no audio playback or input yet... * Timing hack inplace.. that must be replace * bunch of textures not working.. however the play screen is looking similar to windows builds. I hope this dosnt break windows builds to much. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@460 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/Classes/UIni.pas')
-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');