Warn the user if the geometry doesn't fit the screen
This commit is contained in:
parent
b70edf4c4b
commit
b01de5cb48
9
bar.c
9
bar.c
|
@ -850,12 +850,13 @@ main (int argc, char **argv)
|
||||||
bx = geom_v[2];
|
bx = geom_v[2];
|
||||||
|
|
||||||
/* Sanitize the arguments */
|
/* Sanitize the arguments */
|
||||||
if (bx >= scr->width_in_pixels || bx + bw >= scr->width_in_pixels) {
|
if (bx >= scr->width_in_pixels || bx + bw > scr->width_in_pixels) {
|
||||||
bx = 0;
|
fprintf(stderr, "The geometry specified doesn't fit the screen!\n");
|
||||||
bw = -1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bu >= bh)
|
if (bu >= bh)
|
||||||
bu = 1;
|
bu %= bh;
|
||||||
if (ba > 1.0f)
|
if (ba > 1.0f)
|
||||||
ba = 1.0f;
|
ba = 1.0f;
|
||||||
if (ba < 0.0f)
|
if (ba < 0.0f)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user