Browse Source

Added some missing lines and made a few tweaks to allow Quake to run headless without crashing

console
Nico de Poel 5 years ago
parent
commit
3361ea2114
  1. 3
      engine/Quake/gl_draw.c
  2. 13
      engine/UniQuake/stub/stub_vidgl.c

3
engine/Quake/gl_draw.c

@ -506,6 +506,9 @@ void Draw_Pic (int x, int y, qpic_t *pic)
{ {
glpic_t *gl; glpic_t *gl;
if (!pic)
return;
if (scrap_dirty) if (scrap_dirty)
Scrap_Upload (); Scrap_Upload ();
gl = (glpic_t *)pic->data; gl = (glpic_t *)pic->data;

13
engine/UniQuake/stub/stub_vidgl.c

@ -6,7 +6,7 @@ viddef_t vid; // global video state
modestate_t modestate = MS_UNINIT; modestate_t modestate = MS_UNINIT;
int gl_stencilbits = 0; int gl_stencilbits = 0;
qboolean gl_texture_NPOT = false;
qboolean gl_texture_NPOT = true; // No need to resample textures to power-of-two sizes
qboolean gl_glsl_gamma_able = false; qboolean gl_glsl_gamma_able = false;
qboolean gl_mtexable = false; qboolean gl_mtexable = false;
float gl_max_anisotropy = 1; float gl_max_anisotropy = 1;
@ -22,12 +22,15 @@ void VID_Init(void)
Cvar_RegisterVariable(&vid_contrast); Cvar_RegisterVariable(&vid_contrast);
memset(&vid, 0, sizeof(viddef_t)); memset(&vid, 0, sizeof(viddef_t));
vid.width = 1;
vid.height = 1;
vid.conwidth = 1;
vid.conheight = 1;
vid.width = 320;
vid.height = 200;
vid.conwidth = 320;
vid.conheight = 200;
vid.maxwarpwidth = 320; vid.maxwarpwidth = 320;
vid.maxwarpheight = 200; vid.maxwarpheight = 200;
vid.colormap = host_colormap;
vid.fullbright = 256 - LittleLong(*((int *)vid.colormap + 2048));
} }
void VID_Shutdown(void) void VID_Shutdown(void)

Loading…
Cancel
Save