Fixed crash in video menu. Fixed compiler setting.

This commit is contained in:
brendon 2020-06-14 09:59:25 -07:00
parent b63c8dd617
commit 901a845e39
3 changed files with 10 additions and 5 deletions

View file

@ -203,8 +203,7 @@
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX86</TargetMachine>
<IgnoreSpecificDefaultLibraries>
</IgnoreSpecificDefaultLibraries>
<IgnoreSpecificDefaultLibraries>LIBCMTD.lib</IgnoreSpecificDefaultLibraries>
<IgnoreAllDefaultLibraries>
</IgnoreAllDefaultLibraries>
</Link>

View file

@ -1131,7 +1131,7 @@ qboolean R_Init ( void *hinstance, void *hWnd, char *reason )
VID_Printf (PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %i\n", gl_config.max_texsize );
gl_config.extensions_string = qglGetString (GL_EXTENSIONS);
VID_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string );
//VID_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string ); //BC 6-14-2020 don't print this, because it sometimes makes things crash.
strcpy( renderer_buffer, gl_config.renderer_string );
strlwr( renderer_buffer );
@ -1532,7 +1532,7 @@ void GL_Strings_f (void)
VID_Printf (PRINT_ALL, "GL_RENDERER: %s\n", gl_config.renderer_string );
VID_Printf (PRINT_ALL, "GL_VERSION: %s\n", gl_config.version_string );
VID_Printf (PRINT_ALL, "GL_MAX_TEXTURE_SIZE: %i\n", gl_config.max_texsize );
VID_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string );
//VID_Printf (PRINT_ALL, "GL_EXTENSIONS: %s\n", gl_config.extensions_string ); //BC 6-14-2020 don't print this, because it sometimes makes things crash.
}

View file

@ -826,7 +826,13 @@ void Menu_Draw (menuframework_s *menu)
min[0] -= SCR_ScaledVideo(len*MENU_FONT_SIZE - LCOLUMN_OFFSET*2);
}
//len = strlen(spin->itemnames[spin->curvalue]);
if (spin->curvalue >= 0) //BC 6-14-2020 crash fix if curvalue is < 0
len = strlen(spin->itemnames[spin->curvalue]);
else
len = 3;
max[0] += SCR_ScaledVideo(len*MENU_FONT_SIZE);
type = MENUITEM_ROTATE;