diff --git a/config/menus_settings.cfg b/config/menus_settings.cfg index 3a5d8457..15423a49 100644 --- a/config/menus_settings.cfg +++ b/config/menus_settings.cfg @@ -346,21 +346,36 @@ menuitem [] -1 menuitem "\f2\t\t\t [ Apply now! ]" [ resetgl ] newmenu [Display resolutions] -looplist (getdisplayresolutions) [w h] [ - push desc "" - push r (div (* $w 1000) $h) - looplist [1250 5:4 1333 4:3 1777 16:9 1600 16:10] [nr nd] [ - if (= $r $nr) [ - desc = $nd - ][ - if (= (div $r 10) (div $nr 10)) [ - desc = (concatword "~" $nd) - ] - ] +push __getar [ + push n (findlist [1250 1333 1777 1600] (div (* 1000 $arg1) $arg2)) + if (>= $n 0) [ + n = (at [5:4 4:3 16:9 16:10] $n) + ][ + n = (at ["" ~5:4 ~4:3 ~16:9 ~16:10] (+ (findlist [125 133 177 160] (div (* 100 $arg1) $arg2)) 1)) ] - if (< $w 1000) [ r = " " ] [ r = "" ] - menuitem (concatword (pop r) $w x $h "\t(" (pop desc) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) + pop n ] +push reslist (getdisplayresolutions) +if (strlen $reslist) [ + menuitem "\f4Preferred resolutions:" -1 + looplist $reslist [w h] [ + menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) + ] + menuitem "" -1 + menuitem "\f4More resolutions:" -1 +][ + reslist = "17001 17001" +] +looplist [640 480 800 600 1024 768 1280 720 1280 800 1280 1024 1360 768 1366 768 1440 900 1600 900 1680 1050 1920 1080 1920 1200] [w h] [ + push d (&& (< $w (at $reslist 0)) (< $h (at $reslist 1))) + looplist $reslist [rw rh] [ + if (&& (= $w $rw) (= $h $rh)) [d = 0] + ] + if (pop d) [ + menuitem (concatword (at ["" " "] (< $w 1000)) $w x $h "\t(" (__getar $w $h) ")") (concat scr_w $w ";" scr_h $h ";" closecurmenu) + ] +] +pop reslist __getar const fsaa_valuemap [-1 0 2 4 8 16] const aniso_valuemap [0 2 4 8 16]