dont reload palette until config was loaded
This commit is contained in:
parent
a098e22907
commit
e369d1a090
3 changed files with 10 additions and 1 deletions
|
|
@ -181,6 +181,8 @@ INT32 eventhead, eventtail;
|
|||
|
||||
boolean dedicated = false;
|
||||
|
||||
boolean loaded_config = false;
|
||||
|
||||
//
|
||||
// D_PostEvent
|
||||
// Called by the I/O functions when input is detected
|
||||
|
|
@ -1793,6 +1795,8 @@ void D_SRB2Main(void)
|
|||
|
||||
savedata.lives = 0; // flag this as not-used
|
||||
|
||||
loaded_config = true; // so pallettechange doesent get called 500 times at startup lol
|
||||
|
||||
CON_SetLoadingProgress(LOADED_CONFIG);
|
||||
|
||||
CONS_Printf("R_InitTextureData()...\n");
|
||||
|
|
|
|||
|
|
@ -55,6 +55,8 @@ typedef enum
|
|||
extern boolean gameconfig_loaded;
|
||||
extern tic_t rendergametic;
|
||||
|
||||
extern boolean loaded_config;
|
||||
|
||||
extern char srb2home[256]; //Alam: My Home
|
||||
extern boolean usehome; //Alam: which path?
|
||||
extern const char *pandf; //Alam: how to path?
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
#include "doomdef.h"
|
||||
#include "doomtype.h"
|
||||
#include "d_main.h"
|
||||
#include "r_local.h"
|
||||
#include "p_local.h" // stplyr
|
||||
#include "g_game.h" // players
|
||||
|
|
@ -135,7 +136,7 @@ static boolean InitCube(void)
|
|||
float globalgammamul, globalgammaoffs;
|
||||
boolean doinggamma;
|
||||
|
||||
if (con_startup_loadprogress < LOADED_CONFIG)
|
||||
if (loaded_config == false)
|
||||
return false;
|
||||
|
||||
#define diffcons(cv) (cv.value != atoi(cv.defaultvalue))
|
||||
|
|
@ -491,6 +492,8 @@ void V_SetPaletteLump(const char *pal)
|
|||
|
||||
static void CV_palette_OnChange(void)
|
||||
{
|
||||
if (loaded_config == false)
|
||||
return;
|
||||
// recalculate Color Cube
|
||||
V_ReloadPalette();
|
||||
V_SetPalette(0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue