mirror of
https://git.code.sf.net/p/quake/newtree
synced 2025-05-31 01:00:53 +00:00
make VID_SetCaption consistent wherever appropriate (ie possibly windowed
environments). caption is "PROGRAM VERSION[: text]".
This commit is contained in:
parent
46cbb108da
commit
065abe9464
9 changed files with 36 additions and 16 deletions
|
@ -466,7 +466,7 @@ void CL_Disconnect (void)
|
||||||
|
|
||||||
connect_time = -1;
|
connect_time = -1;
|
||||||
|
|
||||||
VID_SetCaption(PROGRAM ": disconnected");
|
VID_SetCaption("disconnected");
|
||||||
|
|
||||||
// stop sounds (especially looping!)
|
// stop sounds (especially looping!)
|
||||||
S_StopAllSounds (true);
|
S_StopAllSounds (true);
|
||||||
|
|
|
@ -167,12 +167,8 @@ void CL_PredictMove (void)
|
||||||
// we can now render a frame
|
// we can now render a frame
|
||||||
if (cls.state == ca_onserver)
|
if (cls.state == ca_onserver)
|
||||||
{ // first update is the final signon stage
|
{ // first update is the final signon stage
|
||||||
|
VID_SetCaption(cls.servername);
|
||||||
char text[1024];
|
cls.state = ca_active;
|
||||||
snprintf (text, sizeof(text), "%s: %s", PROGRAM, cls.servername);
|
|
||||||
VID_SetCaption(text);
|
|
||||||
|
|
||||||
cls.state = ca_active;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cl_nopred->value)
|
if (cl_nopred->value)
|
||||||
|
|
|
@ -322,7 +322,7 @@ x11_create_window(int width, int height)
|
||||||
x_vis, mask, &attr);
|
x_vis, mask, &attr);
|
||||||
|
|
||||||
// Set window title
|
// Set window title
|
||||||
XStoreName (x_disp, x_win, va ("%s %s", PROGRAM, VERSION));
|
x11_set_caption (va ("%s %s", PROGRAM, VERSION));
|
||||||
// Set icon name
|
// Set icon name
|
||||||
XSetIconName (x_disp, x_win, PROGRAM);
|
XSetIconName (x_disp, x_win, PROGRAM);
|
||||||
|
|
||||||
|
|
|
@ -609,5 +609,9 @@ VID_UnlockBuffer ( void )
|
||||||
void
|
void
|
||||||
VID_SetCaption (char *text)
|
VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
x11_set_caption (text);
|
if (text && *text) {
|
||||||
|
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||||
|
} else {
|
||||||
|
x11_set_caption (va ("%s %s", PROGRAM, VERSION));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3426,6 +3426,10 @@ void VID_MenuKey (int key)
|
||||||
|
|
||||||
void VID_SetCaption (char *text)
|
void VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
SetWindowText(mainwindow,(LPSTR) text);
|
if (text && *text) {
|
||||||
|
SetWindowText(mainwindow,(LPSTR) va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||||
|
} else {
|
||||||
|
SetWindowText(mainwindow,(LPSTR) va ("%s %s", PROGRAM, VERSION));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
vid_sdl.c
|
vid_sdl.c
|
||||||
|
|
||||||
Video driver for Sam Lantinga's Simple DirectMedia Layer
|
Video driver for Sam Lantinga's Simple DirectMedia Layer
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void VID_Init (unsigned char *palette)
|
||||||
if (!(screen = SDL_SetVideoMode(vid.width, vid.height, 8, flags)))
|
if (!(screen = SDL_SetVideoMode(vid.width, vid.height, 8, flags)))
|
||||||
Sys_Error("VID: Couldn't set video mode: %s\n", SDL_GetError());
|
Sys_Error("VID: Couldn't set video mode: %s\n", SDL_GetError());
|
||||||
VID_SetPalette(palette);
|
VID_SetPalette(palette);
|
||||||
VID_SetCaption("sdlquakeworld");
|
VID_SetCaption("");
|
||||||
|
|
||||||
// now know everything we need to know about the buffer
|
// now know everything we need to know about the buffer
|
||||||
VGA_width = vid.conwidth = vid.width;
|
VGA_width = vid.conwidth = vid.width;
|
||||||
|
@ -524,6 +524,10 @@ VID_UnlockBuffer ( void )
|
||||||
void
|
void
|
||||||
VID_SetCaption (char *text)
|
VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
SDL_WM_SetCaption(text, NULL);
|
if (text && *text) {
|
||||||
|
SDL_WM_SetCaption(va ("%s %s: %s", PROGRAM, VERSION, text), NULL);
|
||||||
|
} else {
|
||||||
|
SDL_WM_SetCaption(va ("%s %s", PROGRAM, VERSION), NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -703,6 +703,10 @@ VID_UnlockBuffer ( void )
|
||||||
void
|
void
|
||||||
VID_SetCaption (char *text)
|
VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
SDL_WM_SetCaption(text, NULL);
|
if (text && *text) {
|
||||||
|
SDL_WM_SetCaption(va ("%s %s: %s", PROGRAM, VERSION, text), NULL);
|
||||||
|
} else {
|
||||||
|
SDL_WM_SetCaption(va ("%s %s", PROGRAM, VERSION), NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1939,5 +1939,9 @@ void VID_MenuKey (int key)
|
||||||
|
|
||||||
void VID_SetCaption (char *text)
|
void VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
SetWindowText(mainwindow,(LPSTR) text);
|
if (text && *text) {
|
||||||
|
SetWindowText(mainwindow,(LPSTR) va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||||
|
} else {
|
||||||
|
SetWindowText(mainwindow,(LPSTR) va ("%s %s", PROGRAM, VERSION));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -806,5 +806,9 @@ VID_UnlockBuffer ( void )
|
||||||
void
|
void
|
||||||
VID_SetCaption (char *text)
|
VID_SetCaption (char *text)
|
||||||
{
|
{
|
||||||
x11_set_caption (text);
|
if (text && *text) {
|
||||||
|
x11_set_caption (va ("%s %s: %s", PROGRAM, VERSION, text));
|
||||||
|
} else {
|
||||||
|
x11_set_caption (va ("%s %s", PROGRAM, VERSION));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue