diff --git a/polymer/eduke32/build/include/baselayer.h b/polymer/eduke32/build/include/baselayer.h index f7f60a660..358c406bc 100644 --- a/polymer/eduke32/build/include/baselayer.h +++ b/polymer/eduke32/build/include/baselayer.h @@ -163,7 +163,7 @@ extern double vid_gamma, vid_contrast, vid_brightness; #define DEFAULT_CONTRAST 1.0 #define DEFAULT_BRIGHTNESS 0.0 -#define GAMMA_CALC (int32_t)(min(max((float)((vid_gamma-1.0)*10.0),0),15)) +#define GAMMA_CALC ((int32_t)(min(max((double)((vid_gamma-1.0)*10.0),0),15))) int32_t switchrendermethod(int32_t,int32_t); // 0 = software, 1 = opengl | bool = reinit diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index b81f27e30..014695282 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -2740,7 +2740,7 @@ cheat_for_port_credits: if (b != (double)(vid_gamma*40960.f)) { vid_gamma = (double)b/40960.f; - ud.brightness = (int32_t)(min(max((double)((vid_gamma-1.0)*10.0),0),15)); + ud.brightness = GAMMA_CALC; ud.brightness <<= 2; setbrightness(ud.brightness>>2,g_player[myconnectindex].ps->palette,0); }