Fixed Zaero visor HUD scaling hack triggering on Lazarus text popups containing "\"Tracking ".

Added yellow coloring to sscanf() failure warnings.
This commit is contained in:
Knightmare66 2021-07-14 22:21:01 -04:00
parent 4806e6cbc5
commit 263161d9fc
4 changed files with 4 additions and 4 deletions

View file

@ -78,7 +78,7 @@ void ReadTextureSurfaceAssignments (void)
{
// sscanf(line, "%d %s", &tex_surf[num_texsurfs].step_id, tex_surf[num_texsurfs].tex);
if (sscanf(line, "%d %s", &tex_surf[num_texsurfs].step_id, tex_surf[num_texsurfs].tex) == EOF) {
Com_Printf ("ReadTextureSurfaceAssignments: invalid footstep assignment '%s'.\n", line);
Com_Printf (S_COLOR_YELLOW"ReadTextureSurfaceAssignments: invalid footstep assignment '%s'.\n", line);
}
// Com_Printf("%d %s\n", tex_surf[num_texsurfs].step_id, tex_surf[num_texsurfs].tex);
num_texsurfs++;

View file

@ -802,7 +802,7 @@ void CL_DrawLayout (void)
return;
// Special hack for visor HUD addition in Zaero
if ( strstr(cl.layout, "\"Tracking ") )
if ( strstr(cl.layout, "xv 26 yb -75 string \"Tracking ") )
isStatusBar = true;
CL_ExecuteLayoutString (cl.layout, isStatusBar);

View file

@ -1909,7 +1909,7 @@ qboolean R_Init ( void *hinstance, void *hWnd, char *reason )
glConfig.version_string = qglGetString (GL_VERSION);
// sscanf(glConfig.version_string, "%d.%d.%d", &glConfig.version_major, &glConfig.version_minor, &glConfig.version_release);
if (sscanf(glConfig.version_string, "%d.%d.%d", &glConfig.version_major, &glConfig.version_minor, &glConfig.version_release) == EOF) {
VID_Printf (PRINT_ALL, "R_Init: invalid GL_VERSION string reported by driver!\n");
VID_Printf (PRINT_ALL, S_COLOR_YELLOW"R_Init: invalid GL_VERSION string reported by driver!\n");
}
VID_Printf (PRINT_ALL, "GL_VERSION: %s\n", glConfig.version_string );

View file

@ -233,7 +233,7 @@ qboolean NET_StringToSockaddr (char *s, struct sockaddr *sadr)
DO(19, sa_nodenum[5]);
// sscanf (&s[22], "%u", &val);
if (sscanf (&s[22], "%u", &val) == EOF) {
Com_Printf ("NET_StringToSockaddr: invalid IPX address '%s'.\n", s);
Com_Printf (S_COLOR_YELLOW"NET_StringToSockaddr: invalid IPX address '%s'.\n", s);
}
((struct sockaddr_ipx *)sadr)->sa_socket = htons((unsigned short)val);
}