fix some errors and warnings for GCC 6

* do not use std::abs() because math.h includes one, that converts ints
  to double. Use own iabs(), which directly uses labs() instead.
* don't use the word "gamma" as name for variables
* don't use a homebrew round() function
This commit is contained in:
ac-stef
2016-02-27 22:50:06 +01:00
parent d107aa3cd6
commit 98d01d1f34
15 changed files with 33 additions and 38 deletions
+4 -4
View File
@@ -526,11 +526,11 @@ void setresdata(char *s, enet_uint32 c)
COMMANDF(screenres, "ii", (int *w, int *h) { screenres(*w, *h); });
static int curgamma = 100;
VARFP(gamma, 30, 100, 300,
VARNFP(gamma, vgamma, 30, 100, 300,
{
if(gamma == curgamma) return;
curgamma = gamma;
float f = gamma/100.0f;
if(vgamma == curgamma) return;
curgamma = vgamma;
float f = vgamma/100.0f;
if(SDL_SetGamma(f,f,f)==-1) conoutf("Could not set gamma: %s", SDL_GetError());
});