mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 12:10:48 +00:00
support vid_conwidth cvar (for -conwidth). while present in all targets, it
will only work in gl
This commit is contained in:
parent
6621bbee36
commit
a8a8792a76
4 changed files with 13 additions and 21 deletions
|
@ -53,6 +53,7 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
byte gammatable[256];
|
||||
cvar_t *vid_gamma;
|
||||
cvar_t *vid_system_gamma;
|
||||
cvar_t *vid_conwidth;
|
||||
qboolean vid_gamma_avail; // hardware gamma availability
|
||||
|
||||
unsigned int d_8to24table[256];
|
||||
|
@ -111,6 +112,18 @@ VID_GetWindowSize (int def_w, int def_h)
|
|||
|
||||
scr_width = vid.width = vid_width->int_val;
|
||||
scr_height = vid.height = vid_height->int_val;
|
||||
|
||||
vid_conwidth = Cvar_Get ("vid_conwidth", va ("%d", def_w), CVAR_NONE, NULL,
|
||||
"console effective width (GL only)");
|
||||
if ((pnum = COM_CheckParm ("-conwidth"))) {
|
||||
if (pnum >= com_argc - 1)
|
||||
Sys_Error ("VID: -conwidth <width>");
|
||||
Cvar_Set (vid_conwidth, com_argv[pnum + 1]);
|
||||
if (!vid_height->int_val)
|
||||
Sys_Error ("VID: Bad console width");
|
||||
}
|
||||
Cvar_SetFlags (vid_conwidth, vid_conwidth->flags | CVAR_ROM);
|
||||
vid.conwidth = vid_conwidth->int_val;
|
||||
}
|
||||
|
||||
/* GAMMA FUNCTIONS */
|
||||
|
|
|
@ -303,11 +303,6 @@ VID_Init (unsigned char *palette)
|
|||
attribs[4] = 1;
|
||||
attribs[5] = FXMESA_NONE;
|
||||
|
||||
if ((i = COM_CheckParm ("-conwidth")))
|
||||
vid.conwidth = atoi (com_argv[i + 1]);
|
||||
else
|
||||
vid.conwidth = 640;
|
||||
|
||||
vid.conwidth &= 0xfff8; // make it a multiple of eight
|
||||
|
||||
vid.conwidth = max (vid.conwidth, 320);
|
||||
|
|
|
@ -210,14 +210,6 @@ VID_Init (unsigned char *palette)
|
|||
vid.colormap8 = vid_colormap;
|
||||
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
|
||||
|
||||
// Interpret command-line params
|
||||
|
||||
// Set vid parameters
|
||||
if ((i = COM_CheckParm ("-conwidth")))
|
||||
vid.conwidth = atoi (com_argv[i + 1]);
|
||||
else
|
||||
vid.conwidth = scr_width;
|
||||
|
||||
vid.conwidth &= 0xfff8; // make it a multiple of eight
|
||||
vid.conwidth = max (vid.conwidth, 320);
|
||||
|
||||
|
|
|
@ -117,14 +117,6 @@ VID_Init (unsigned char *palette)
|
|||
vid.colormap8 = vid_colormap;
|
||||
vid.fullbright = 256 - LittleLong (*((int *) vid.colormap8 + 2048));
|
||||
|
||||
// Interpret command-line params
|
||||
|
||||
// Set vid parameters
|
||||
if ((i = COM_CheckParm ("-conwidth")) != 0)
|
||||
vid.conwidth = atoi (com_argv[i + 1]);
|
||||
else
|
||||
vid.conwidth = scr_width;
|
||||
|
||||
vid.conwidth &= 0xfff8; // make it a multiple of eight
|
||||
if (vid.conwidth < 320)
|
||||
vid.conwidth = 320;
|
||||
|
|
Loading…
Reference in a new issue