mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Merge commit '041d1c6cb6e1eff8d84ce883ff42c3c7f1c5f67e' into soft_render
This commit is contained in:
commit
5a24b969bc
2 changed files with 29 additions and 21 deletions
|
@ -127,22 +127,6 @@ Sys_Quit(void)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
void
|
||||
WinError(void)
|
||||
{
|
||||
LPVOID lpMsgBuf;
|
||||
|
||||
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||
(LPTSTR)&lpMsgBuf, 0, NULL);
|
||||
|
||||
/* Display the string. */
|
||||
MessageBox(NULL, lpMsgBuf, "GetLastError", MB_OK | MB_ICONINFORMATION);
|
||||
|
||||
/* Free the buffer. */
|
||||
LocalFree(lpMsgBuf);
|
||||
}
|
||||
|
||||
/* ================================================================ */
|
||||
|
||||
void
|
||||
|
|
|
@ -28,6 +28,18 @@
|
|||
|
||||
cvar_t *cvar_vars;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *old;
|
||||
char *new;
|
||||
} replacement_t;
|
||||
|
||||
/* An ugly hack to rewrite CVARs loaded from config.cfg */
|
||||
replacement_t replacements[] = {
|
||||
};
|
||||
|
||||
|
||||
static qboolean
|
||||
Cvar_InfoValidate(char *s)
|
||||
{
|
||||
|
@ -408,8 +420,8 @@ Cvar_Command(void)
|
|||
void
|
||||
Cvar_Set_f(void)
|
||||
{
|
||||
int c;
|
||||
int flags;
|
||||
char *firstarg;
|
||||
int c, flags, i;
|
||||
|
||||
c = Cmd_Argc();
|
||||
|
||||
|
@ -419,6 +431,19 @@ Cvar_Set_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
firstarg = Cmd_Argv(1);
|
||||
|
||||
/* An ugly hack to rewrite changed CVARs */
|
||||
for (i = 0; i < sizeof(replacements) / sizeof(replacement_t); i++)
|
||||
{
|
||||
if (!strcmp(firstarg, replacements[i].old))
|
||||
{
|
||||
Com_Printf("cvar %s ist deprecated, use %s instead\n", replacements[i].old, replacements[i].new);
|
||||
|
||||
firstarg = replacements[i].new;
|
||||
}
|
||||
}
|
||||
|
||||
if (c == 4)
|
||||
{
|
||||
if (!strcmp(Cmd_Argv(3), "u"))
|
||||
|
@ -437,12 +462,11 @@ Cvar_Set_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
Cvar_FullSet(Cmd_Argv(1), Cmd_Argv(2), flags);
|
||||
Cvar_FullSet(firstarg, Cmd_Argv(2), flags);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
Cvar_Set(Cmd_Argv(1), Cmd_Argv(2));
|
||||
Cvar_Set(firstarg, Cmd_Argv(2));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue