From: Debugger Date: Thu, 12 Sep 2013 20:32:53 +0000 (+0200) Subject: adding the possbility to use dualscreenresolution X-Git-Tag: xonotic-v0.8.0~332^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=296e756115c901d81cc862e1f0b37b1d03670d30;p=xonotic%2Fxonotic-data.pk3dir.git adding the possbility to use dualscreenresolution --- diff --git a/defaultXonotic.cfg b/defaultXonotic.cfg index 30a03a15a..28c1af69d 100644 --- a/defaultXonotic.cfg +++ b/defaultXonotic.cfg @@ -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 diff --git a/qcsrc/menu/xonotic/slider_resolution.c b/qcsrc/menu/xonotic/slider_resolution.c index 8bd47e799..b08aac86f 100644 --- a/qcsrc/menu/xonotic/slider_resolution.c +++ b/qcsrc/menu/xonotic/slider_resolution.c @@ -75,6 +75,7 @@ void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pi void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me) { float i; + float autocvar_menu_vid_allowdualscreenresolution = 0; vector r0, r; me.configureXonoticTextSlider(me, "_menu_vid_width"); @@ -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); }