]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Default curl maxspeed to unlimited and allow 3 downloads at the same time (it's not...
authorMario <mario@smbclan.net>
Fri, 23 Sep 2016 17:23:31 +0000 (03:23 +1000)
committerMario <mario@smbclan.net>
Fri, 23 Sep 2016 17:23:31 +0000 (03:23 +1000)
Rework download speed slider to show more sane values, including an "unlimited" option

defaultXonotic.cfg
qcsrc/menu/xonotic/dialog_settings_misc.qc

index dd097e60cd3f970bf72afa93b0afd7a02873a764..9a212486cd3ad036ab7c31ba8ad36b08b9db4d46 100644 (file)
@@ -684,7 +684,8 @@ alias sv_fbskin_off "sv_defaultcharacter 0; sv_defaultplayerskin 0; sv_defaultpl
 seta sv_servermodelsonly 1
 
 cl_curl_enabled 1
-cl_curl_maxspeed 500
+cl_curl_maxdownloads 3
+cl_curl_maxspeed 0
 cl_curl_useragent 1
 cl_curl_useragent_append "$g_xonoticversion"
 
index ede6543e7d983cfed14ee19587da465bd7411b06..8f98df58164e2fbd9933d17492ee6ea2f5ef4c05 100644 (file)
@@ -9,6 +9,8 @@
 #include "mainwindow.qh"
 
 #define ADDVALUE_FPS(i) e.addValue(e, strzone(sprintf(_("%d fps"), i)), #i)
+#define ADDVALUE_SPEED_KB(i) e.addValue(e, strzone(sprintf(_("%d kb/s"), i)), #i)
+#define ADDVALUE_SPEED_MB(i, j) e.addValue(e, strzone(sprintf(_("%d MB/s"), i)), #j)
 entity makeXonoticMiscSettingsTab()
 {
        entity me;
@@ -51,9 +53,16 @@ void XonoticMiscSettingsTab_fill(entity me)
                me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads",
                        _("Maximum number of concurrent HTTP/FTP downloads")));
        me.TR(me);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Speed (kB/s):")));
-               me.TD(me, 1, 2, e = makeXonoticSlider_T(10, 2000, 50, "cl_curl_maxspeed",
-                       _("Maximum download speed")));
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Download speed:")));
+               me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_curl_maxspeed"));
+               ADDVALUE_SPEED_KB(50);
+               ADDVALUE_SPEED_KB(100);
+               ADDVALUE_SPEED_KB(300);
+               ADDVALUE_SPEED_KB(500);
+               ADDVALUE_SPEED_MB(1, 1000);
+               ADDVALUE_SPEED_MB(2, 2000);
+               e.addValue(e, strzone(_("Unlimited")), "0");
+               e.configureXonoticTextSliderValues(e);
        me.TR(me);
                if(cvar("developer"))
                {