aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-01 10:41:06 +0000
committerjaybinks <jaybinks@b956fd51-792f-4845-bead-9b4dfca2ff2c>2007-10-01 10:41:06 +0000
commit73a9802c1417cc36106f88fe1e6b5989fd47b8b0 (patch)
treed541d9fc7cdde1e80f09085cf1d93b7681a7e06a
parentda754bece1dc05115f06bce0c7719d75a97f6962 (diff)
downloadusdx-73a9802c1417cc36106f88fe1e6b5989fd47b8b0.tar.gz
usdx-73a9802c1417cc36106f88fe1e6b5989fd47b8b0.tar.xz
usdx-73a9802c1417cc36106f88fe1e6b5989fd47b8b0.zip
added patch (with small modification)
which apparently enables USDX to run on linux, using wine. ( currently untested by myself ) BIG THANKS goes to linnex from sourceforge. http://sourceforge.net/forum/message.php?msg_id=4544965 git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@454 b956fd51-792f-4845-bead-9b4dfca2ff2c
-rw-r--r--Game/Code/Classes/UIni.pas10
1 files changed, 9 insertions, 1 deletions
diff --git a/Game/Code/Classes/UIni.pas b/Game/Code/Classes/UIni.pas
index 86ce7361..5d599eab 100644
--- a/Game/Code/Classes/UIni.pas
+++ b/Game/Code/Classes/UIni.pas
@@ -264,12 +264,20 @@ begin
SetLength(IResolution, 0);
Modes := SDL_ListModes(nil, SDL_OPENGL or SDL_FULLSCREEN); // Check if there are any modes available
repeat
-// Log.LogError(Format( ' %d x %d', [ modes^.w, modes^.h ] ) );
SetLength(IResolution, Length(IResolution) + 1);
IResolution[High(IResolution)] := IntToStr(Modes^.w) + 'x' + IntToStr(Modes^.h);
Inc(Modes);
until Modes^ = nil;
+ // if no modes were set, then failback to 800x600
+ // as per http://sourceforge.net/forum/message.php?msg_id=4544965
+ // 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);
+ end;
+
// reverse order
for I := 0 to (Length(IResolution) div 2) - 1 do begin
S := IResolution[I];