applied Gottox mwfact patch
This commit is contained in:
parent
55d8dda9f4
commit
7d156dee1e
1 changed files with 7 additions and 8 deletions
15
tile.c
15
tile.c
|
@ -10,7 +10,7 @@ static double mwfact = MWFACT;
|
||||||
|
|
||||||
void
|
void
|
||||||
setmwfact(const char *arg) {
|
setmwfact(const char *arg) {
|
||||||
double delta, newfact;
|
double delta;
|
||||||
|
|
||||||
if(!isarrange(tile))
|
if(!isarrange(tile))
|
||||||
return;
|
return;
|
||||||
|
@ -19,14 +19,13 @@ setmwfact(const char *arg) {
|
||||||
mwfact = MWFACT;
|
mwfact = MWFACT;
|
||||||
else if(1 == sscanf(arg, "%lf", &delta)) {
|
else if(1 == sscanf(arg, "%lf", &delta)) {
|
||||||
if(arg[0] != '+' && arg[0] != '-')
|
if(arg[0] != '+' && arg[0] != '-')
|
||||||
newfact = delta;
|
mwfact = delta;
|
||||||
else
|
else
|
||||||
newfact = mwfact + delta;
|
mwfact += delta;
|
||||||
if(newfact < 0.1)
|
if(mwfact < 0.1)
|
||||||
newfact = 0.1;
|
mwfact = 0.1;
|
||||||
else if(newfact > 0.9)
|
else if(mwfact > 0.9)
|
||||||
newfact = 0.9;
|
mwfact = 0.9;
|
||||||
mwfact = newfact;
|
|
||||||
}
|
}
|
||||||
arrange();
|
arrange();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue