Merge remote-tracking branch 'origin/debugger/dualscreenresolution'
authorSamual Lenks <samual@xonotic.org>
Sat, 14 Sep 2013 20:12:55 +0000 (16:12 -0400)
committerSamual Lenks <samual@xonotic.org>
Sat, 14 Sep 2013 20:12:55 +0000 (16:12 -0400)
# By Debugger (1) and Samual Lenks (1)
* origin/debugger/dualscreenresolution:
  Minor fix
  adding the possbility to use dualscreenresolution

defaultXonotic.cfg
qcsrc/menu/xonotic/slider_resolution.c

index 30a03a15a1ba68a0003e36b2753a6d1c2e9fa025..28c1af69dadf7a009b3da3fe094d7116640ff7a9 100644 (file)
@@ -99,6 +99,7 @@ set _menu_vid_width "$vid_width"
 set _menu_vid_height "$vid_height"
 set _menu_vid_pixelheight "$vid_pixelheight"
 seta menu_vid_scale 0
+seta menu_vid_allowdualscreenresolution 0
 // 2D resolution 800x600
 vid_conwidth 800
 vid_conheight 600
index 8bd47e799983abe4207446224c390a6441e4d1bc..01fd64e1022eb5d74524db0184dd80830d605f55 100644 (file)
@@ -72,6 +72,7 @@ void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pi
        me.addValue(me, strzone(sprintf(_("%dx%d"), w, h)), strzone(strcat(ftos(w), " ", ftos(h), " ", ftos(pixelheight))));
        // FIXME (in case you ever want to dynamically instantiate this): THIS IS NEVER FREED
 }
+float autocvar_menu_vid_allowdualscreenresolution;
 void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
 {
        float i;
@@ -93,7 +94,9 @@ void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me)
                if(r_x < 640 || r_y < 480)
                        continue;
                if(r_x > 2 * r_y) // likely dualscreen resolution, skip this one
-                       continue;
+                       if(autocvar_menu_vid_allowdualscreenresolution <= 0)
+                               continue;
+                       
                me.addResolution(me, r_x, r_y, r_z);
        }