]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cvar.c
vid: implement monitor selection with instant cvar changes
[xonotic/darkplaces.git] / cvar.c
diff --git a/cvar.c b/cvar.c
index 98f11e399ba6d924f9487dadf96b266d0e470d27..e711df4624bdad92dc87a3806b3b2ac5c26bb0fa 100644 (file)
--- a/cvar.c
+++ b/cvar.c
@@ -271,15 +271,13 @@ void Cvar_PrintHelp(cvar_t *cvar, const char *name, qbool full)
 {
        // Aliases are purple, cvars are yellow
        if (strcmp(cvar->name, name))
-               Con_Printf("^6");
+               Con_Printf("^6%s^7 (alias of ^3%s^7)", name, cvar->name);
        else
-               Con_Printf("^3");
-       Con_Printf("%s^7 is \"%s\" [\"%s\"]", name, ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
-       if (strcmp(cvar->name, name))
-               Con_Printf(" (also ^3%s^7)", cvar->name);
+               Con_Printf("^3%s^7", name);
+       Con_Printf(" is \"%s^7\" [\"%s^7\"]", ((cvar->flags & CF_PRIVATE) ? "********"/*hunter2*/ : cvar->string), cvar->defstring);
        if (full)
                Con_Printf(" %s", cvar->description);
-       Con_Printf("\n");
+       Con_Print("\n");
 }
 
 // written by LadyHavoc
@@ -392,7 +390,7 @@ static void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
        changed = strcmp(var->string, value) != 0;
        // LadyHavoc: don't reallocate when there is no change
        if (!changed)
-               return;
+               goto cvar_callback;
 
        // LadyHavoc: don't reallocate when the buffer is the same size
        valuelen = strlen(value);
@@ -425,6 +423,7 @@ static void Cvar_SetQuick_Internal (cvar_t *var, const char *value)
 
        Cvar_UpdateAutoCvar(var);
 
+cvar_callback:
        // Call the function stored in the cvar for bounds checking, cleanup, etc
        Cvar_Callback(var);
 }