don't set stereomode when stereo is disabled flibqtfrontend
authorkoda
Tue, 04 Dec 2012 10:17:16 +0100
branchflibqtfrontend
changeset 8220 67105120662c
parent 8218 a61eacecf091
child 8222 d3dc08500fc0
don't set stereomode when stereo is disabled
hedgewars/ArgParsers.inc
--- a/hedgewars/ArgParsers.inc	Tue Dec 04 03:54:42 2012 +0100
+++ b/hedgewars/ArgParsers.inc	Tue Dec 04 10:17:16 2012 +0100
@@ -37,15 +37,22 @@
     cReducedQuality:= StrToInt(ParamStr(15));
     tmp:= StrToInt(ParamStr(16));
     GrayScale:= false;
-    if (tmp > 9) and (tmp < 16) then 
+{$IFDEF USE_S3D_RENDERING}
+    if (tmp > 9) and (tmp < 16) then
         begin
+        // set the gray anaglyph rendering
         GrayScale:= true;
         cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp-9)))
         end
-    else if tmp <= 9 then 
+    else if tmp <= 9 then
+        // set the fullcolor anaglyph
         cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp)))
-    else 
+    else
+        // any other mode
         cStereoMode:= TStereoMode(max(0, min(ord(high(TStereoMode)), tmp-6)));
+{$ELSE}
+	cStereoMode:= smNone;
+{$ENDIF}
     cLocaleFName:= ParamStr(17);
 end;