vid_listmodes command to show video modes, add 720p mode

the very unusual 1280x854 mode has been replaced with the more common
1280x720 ("720p").
This commit is contained in:
Daniel Gibson 2017-02-25 20:33:17 +01:00
parent 66e9c5f6db
commit c4c21075a4
2 changed files with 25 additions and 12 deletions

View file

@ -66,7 +66,7 @@ vidmode_t vid_modes[] = {
{"Mode 11: 1152x768", 1152, 768, 11},
{"Mode 12: 1152x864", 1152, 864, 12},
{"Mode 13: 1280x800", 1280, 800, 13},
{"Mode 14: 1280x854", 1280, 854, 14},
{"Mode 14: 1280x720", 1280, 720, 14},
{"Mode 15: 1280x960", 1280, 960, 15},
{"Mode 16: 1280x1024", 1280, 1024, 16},
{"Mode 17: 1366x768", 1366, 768, 17},
@ -100,6 +100,18 @@ VID_Restart_f(void)
vid_fullscreen->modified = true;
}
void
VID_ListModes_f(void)
{
int i;
Com_Printf("Supported video modes (gl_mode):\n");
for(i=0; i<VID_NUM_MODES; ++i)
{
Com_Printf(" %s\n", vid_modes[i].description);
}
Com_Printf(" Mode -1: gl_customwidth x gl_customheight\n");
}
qboolean
VID_GetModeInfo(int *width, int *height, int mode)
{
@ -155,6 +167,7 @@ VID_Init(void)
/* Add some console commands that we want to handle */
Cmd_AddCommand("vid_restart", VID_Restart_f);
Cmd_AddCommand("vid_listmodes", VID_ListModes_f);
/* Start the graphics mode and load refresh DLL */
VID_CheckChanges();

View file

@ -256,7 +256,7 @@ VID_MenuInit(void)
"[1152 768 ]",
"[1152 864 ]",
"[1280 800 ]",
"[1280 854 ]",
"[1280 720 ]",
"[1280 960 ]",
"[1280 1024]",
"[1366 768 ]",