mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-24 21:41:10 +00:00
Fixed potential game crash at shutdown
Only happens in Windows. A cvar was being queried just after all cvars were freed, in Qcommon_Shutdown(). GL_GENERATE_MIPMAP definition relocated. scrap_uploads counter deleted, it wasn't being read anywhere.
This commit is contained in:
parent
b401846ce6
commit
a8824972db
4 changed files with 4 additions and 9 deletions
|
@ -85,6 +85,7 @@ Sys_Error(const char *error, ...)
|
|||
void
|
||||
Sys_Quit(void)
|
||||
{
|
||||
const qboolean free_console = (dedicated && dedicated->value);
|
||||
timeEndPeriod(1);
|
||||
|
||||
#ifndef DEDICATED_ONLY
|
||||
|
@ -93,7 +94,7 @@ Sys_Quit(void)
|
|||
|
||||
Qcommon_Shutdown();
|
||||
|
||||
if (dedicated && dedicated->value)
|
||||
if (free_console)
|
||||
{
|
||||
FreeConsole();
|
||||
}
|
||||
|
|
|
@ -638,11 +638,6 @@ R_BuildPalettedTexture(unsigned char *paletted_texture, unsigned char *scaled,
|
|||
}
|
||||
}
|
||||
|
||||
// Windows headers don't define this constant.
|
||||
#ifndef GL_GENERATE_MIPMAP
|
||||
#define GL_GENERATE_MIPMAP 0x8191
|
||||
#endif
|
||||
|
||||
qboolean
|
||||
R_Upload32Native(unsigned *data, int width, int height, qboolean mipmap)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
* =======================================================================
|
||||
*
|
||||
* Allocate all the little status bar obejcts into a single texture
|
||||
* Allocate all the little status bar objects into a single texture
|
||||
* to crutch up inefficient hardware / drivers.
|
||||
*
|
||||
* =======================================================================
|
||||
|
@ -30,7 +30,6 @@
|
|||
int scrap_allocated[MAX_SCRAPS][BLOCK_WIDTH];
|
||||
byte scrap_texels[MAX_SCRAPS][BLOCK_WIDTH * BLOCK_HEIGHT];
|
||||
qboolean scrap_dirty;
|
||||
int scrap_uploads;
|
||||
|
||||
qboolean R_Upload8(byte *data,
|
||||
int width,
|
||||
|
@ -93,7 +92,6 @@ Scrap_AllocBlock(int w, int h, int *x, int *y)
|
|||
void
|
||||
Scrap_Upload(void)
|
||||
{
|
||||
scrap_uploads++;
|
||||
R_Bind(TEXNUM_SCRAPS);
|
||||
R_Upload8(scrap_texels[0], BLOCK_WIDTH, BLOCK_HEIGHT, false, false);
|
||||
scrap_dirty = false;
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
#define GL_POINT_SIZE_MIN 0x8126
|
||||
#define GL_POINT_SIZE_MAX 0x8127
|
||||
#define GL_POINT_DISTANCE_ATTENUATION 0x8129
|
||||
#define GL_GENERATE_MIPMAP 0x8191
|
||||
#endif
|
||||
|
||||
#ifndef GL_VERSION_1_3
|
||||
|
|
Loading…
Reference in a new issue