mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 05:30:58 +00:00
Show renderer name in window title
This commit is contained in:
parent
7cd86106dc
commit
8723f73831
3 changed files with 20 additions and 8 deletions
|
@ -231,7 +231,6 @@ GLimp_InitGraphics(qboolean fullscreen, int *pwidth, int *pheight)
|
|||
{
|
||||
int flags;
|
||||
int curWidth, curHeight;
|
||||
char title[24];
|
||||
int width = *pwidth;
|
||||
int height = *pheight;
|
||||
|
||||
|
@ -346,15 +345,10 @@ GLimp_InitGraphics(qboolean fullscreen, int *pwidth, int *pheight)
|
|||
cvar_t* gl_swapinterval = Cvar_Get("gl_swapinterval", "1", CVAR_ARCHIVE);
|
||||
vsync_active = gl_swapinterval->value ? true : false;
|
||||
|
||||
/* Window title */
|
||||
snprintf(title, sizeof(title), "Yamagi Quake II %s", YQ2VERSION);
|
||||
/* Note: window title is now set in re.InitContext() to include renderer name */
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
SDL_SetWindowTitle(window, title);
|
||||
|
||||
/* Also set the window icon - For SDL2, this must be done after creating the window */
|
||||
/* Set the window icon - For SDL2, this must be done after creating the window */
|
||||
SetSDLIcon();
|
||||
#else
|
||||
SDL_WM_SetCaption(title, title);
|
||||
#endif
|
||||
|
||||
/* No cursor */
|
||||
|
|
|
@ -373,6 +373,7 @@ int RI_PrepareForWindow(void)
|
|||
int RI_InitContext(void* win)
|
||||
{
|
||||
int msaa_samples = 0, stencil_bits = 0;
|
||||
char title[40] = {0};
|
||||
|
||||
if(win == NULL)
|
||||
{
|
||||
|
@ -417,6 +418,14 @@ int RI_InitContext(void* win)
|
|||
/* Initialize hardware gamma */
|
||||
InitGamma();
|
||||
|
||||
/* Window title - set here so we can display renderer name in it */
|
||||
snprintf(title, sizeof(title), "Yamagi Quake II %s - OpenGL 1.x", YQ2VERSION);
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
SDL_SetWindowTitle(window, title);
|
||||
#else
|
||||
SDL_WM_SetCaption(title, title);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -172,6 +172,7 @@ DebugCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei le
|
|||
int GL3_InitContext(void* win)
|
||||
{
|
||||
int msaa_samples = 0, stencil_bits = 0;
|
||||
char title[40] = {0};
|
||||
|
||||
if(win == NULL)
|
||||
{
|
||||
|
@ -239,6 +240,14 @@ int GL3_InitContext(void* win)
|
|||
// glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, true);
|
||||
}
|
||||
|
||||
/* Window title - set here so we can display renderer name in it */
|
||||
snprintf(title, sizeof(title), "Yamagi Quake II %s - OpenGL 3.2", YQ2VERSION);
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
SDL_SetWindowTitle(window, title);
|
||||
#else
|
||||
SDL_WM_SetCaption(title, title);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue