Fix problems with handling of the default crosshair color.

git-svn-id: https://svn.eduke32.com/eduke32@5950 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-12-26 06:01:24 +00:00
parent c20e41d0c8
commit c102a6620a
3 changed files with 3 additions and 3 deletions

View file

@ -666,7 +666,7 @@ void CONFIG_WriteSettings(void) // save binds and aliases to <cfgname>_settings.
OSD_WriteAliases(fp);
if (g_crosshairSum && g_crosshairSum != DefaultCrosshairColors.r+(DefaultCrosshairColors.g<<1)+(DefaultCrosshairColors.b<<2))
if (g_crosshairSum != -1 && g_crosshairSum != DefaultCrosshairColors.r+(DefaultCrosshairColors.g<<8)+(DefaultCrosshairColors.b<<16))
Bfprintf(fp, "crosshaircolor %d %d %d\n", CrosshairColors.r, CrosshairColors.g, CrosshairColors.b);
OSD_WriteCvars(fp);

View file

@ -833,7 +833,7 @@ void onvideomodechange(int32_t newmode)
setbrightness(ud.brightness>>2, palid, 0);
g_restorePalette = -1;
g_crosshairSum = 0;
g_crosshairSum = -1;
}
static int32_t osdcmd_name(const osdfuncparm_t *parm)

View file

@ -43,7 +43,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
palette_t CrosshairColors ={ 255, 255, 255, 0 };
palette_t DefaultCrosshairColors ={ 0, 0, 0, 0 };
int32_t g_crosshairSum = 0;
int32_t g_crosshairSum = -1;
// yxaspect and viewingrange just before the 'main' drawrooms call
int32_t dr_yxaspect, dr_viewingrange;
double g_moveActorsTime = 0; // in ms, smoothed