mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-04-04 05:51:57 +00:00
cl_main.c: More VID_SetCaption status messages.
vid_*: Make it so that VID_SetCaption can be safely called with the output from va()
This commit is contained in:
parent
5e8b620b9d
commit
e0a53aa9a2
6 changed files with 37 additions and 21 deletions
|
@ -320,6 +320,7 @@ void CL_CheckForResend (void)
|
|||
|
||||
connect_time = realtime+t2-t1; // for retransmit requests
|
||||
|
||||
VID_SetCaption (va ("Connecting to %s", cls.servername));
|
||||
Con_Printf ("Connecting to %s...\n", cls.servername);
|
||||
sprintf (data, "%c%c%c%cgetchallenge\n", 255, 255, 255, 255);
|
||||
NET_SendPacket (strlen(data), data, adr);
|
||||
|
@ -467,7 +468,7 @@ void CL_Disconnect (void)
|
|||
|
||||
connect_time = -1;
|
||||
|
||||
VID_SetCaption("disconnected");
|
||||
VID_SetCaption("Disconnected");
|
||||
|
||||
// stop sounds (especially looping!)
|
||||
S_StopAllSounds (true);
|
||||
|
@ -891,6 +892,7 @@ void CL_Reconnect_f (void)
|
|||
|
||||
if (cls.state == ca_connected) {
|
||||
Con_Printf ("reconnecting...\n");
|
||||
VID_SetCaption ("Reconnecting");
|
||||
MSG_WriteChar (&cls.netchan.message, clc_stringcmd);
|
||||
MSG_WriteString (&cls.netchan.message, "new");
|
||||
return;
|
||||
|
|
|
@ -586,17 +586,19 @@ void VID_Init(unsigned char *palette)
|
|||
vid.recalc_refdef = 1; // force a surface cache flush
|
||||
}
|
||||
|
||||
void VID_InitCvars()
|
||||
void
|
||||
VID_InitCvars (void)
|
||||
{
|
||||
// It may not look like it, but this is important
|
||||
}
|
||||
|
||||
void
|
||||
VID_LockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
VID_LockBuffer ( void )
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
VID_UnlockBuffer ( void )
|
||||
VID_UnlockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -604,7 +606,9 @@ void
|
|||
VID_SetCaption (char *text)
|
||||
{
|
||||
if (text && *text) {
|
||||
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||
char *temp = strdup (text);
|
||||
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, temp));
|
||||
free (temp);
|
||||
} else {
|
||||
x11_set_caption (va ("%s %s", PROGRAM, VERSION));
|
||||
}
|
||||
|
|
|
@ -3427,9 +3427,11 @@ void VID_MenuKey (int key)
|
|||
void VID_SetCaption (char *text)
|
||||
{
|
||||
if (text && *text) {
|
||||
SetWindowText(mainwindow,(LPSTR) va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||
char *temp = strdup (text);
|
||||
SetWindowText (mainwindow, (LPSTR) va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||
free (temp);
|
||||
} else {
|
||||
SetWindowText(mainwindow,(LPSTR) va ("%s %s", PROGRAM, VERSION));
|
||||
SetWindowText (mainwindow, (LPSTR) va ("%s %s", PROGRAM, VERSION));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -519,18 +519,19 @@ IN_Move (usercmd_t *cmd)
|
|||
}
|
||||
|
||||
|
||||
void VID_InitCvars ()
|
||||
void
|
||||
VID_InitCvars (void)
|
||||
{
|
||||
// It may not look like it, but this is important
|
||||
}
|
||||
|
||||
void
|
||||
VID_LockBuffer ( void )
|
||||
VID_LockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
VID_UnlockBuffer ( void )
|
||||
VID_UnlockBuffer (void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -538,9 +539,11 @@ void
|
|||
VID_SetCaption (char *text)
|
||||
{
|
||||
if (text && *text) {
|
||||
SDL_WM_SetCaption(va ("%s %s: %s", PROGRAM, VERSION, text), NULL);
|
||||
char *temp = strdup (text);
|
||||
SDL_WM_SetCaption (va ("%s %s: %s", PROGRAM, VERSION, temp), NULL);
|
||||
free (temp);
|
||||
} else {
|
||||
SDL_WM_SetCaption(va ("%s %s", PROGRAM, VERSION), NULL);
|
||||
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -717,9 +717,11 @@ void
|
|||
VID_SetCaption (char *text)
|
||||
{
|
||||
if (text && *text) {
|
||||
SDL_WM_SetCaption(va ("%s %s: %s", PROGRAM, VERSION, text), NULL);
|
||||
char *temp = strdup (text);
|
||||
SDL_WM_SetCaption (va ("%s %s: %s", PROGRAM, VERSION, temp), NULL);
|
||||
free (temp);
|
||||
} else {
|
||||
SDL_WM_SetCaption(va ("%s %s", PROGRAM, VERSION), NULL);
|
||||
SDL_WM_SetCaption (va ("%s %s", PROGRAM, VERSION), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -779,7 +779,7 @@ VID_DitherOn( void )
|
|||
|
||||
|
||||
void
|
||||
VID_DitherOff( void )
|
||||
VID_DitherOff (void)
|
||||
{
|
||||
if (dither) {
|
||||
vid.recalc_refdef = 1;
|
||||
|
@ -787,7 +787,8 @@ VID_DitherOff( void )
|
|||
}
|
||||
}
|
||||
|
||||
void VID_InitCvars ()
|
||||
void
|
||||
VID_InitCvars (void)
|
||||
{
|
||||
// It may not look like it, but this is important
|
||||
}
|
||||
|
@ -806,7 +807,9 @@ void
|
|||
VID_SetCaption (char *text)
|
||||
{
|
||||
if (text && *text) {
|
||||
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||
char *temp = strdup (text);
|
||||
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, temp));
|
||||
free (temp);
|
||||
} else {
|
||||
x11_set_caption (va ("%s %s", PROGRAM, VERSION));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue