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:
+4
-4
@@ -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());
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user