summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-02-20 14:04:56 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-02-20 14:04:56 +0100
commit95f5135b4dad392a7287e28c7503ec8b7637e121 (patch)
tree42d1292439f1813fe30615ceb136bbaba83d8217 /src
parent96867f831856e7baf421e4f2b5b28f62a08c3b81 (diff)
Check to avoid erroneous values for the starting GUI scale factor.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Screen_Driver.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 2d70187ca..4255d6444 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -441,13 +441,13 @@ float Fl_Screen_Driver::use_startup_scale_factor()
char *p = 0;
if ((p = fl_getenv("FLTK_SCALING_FACTOR"))) {
sscanf(p, "%f", &factor);
- // checks to prevent potential crash (factor <= 0) or very large factors
- if (factor < 0.25) factor = 0.25;
- else if (factor > 10.0) factor = 10.0;
}
else {
factor = desktop_scale_factor();
}
+ // checks to prevent potential crash (factor <= 0) or very large factors
+ if (factor < 0.25) factor = 0.25;
+ else if (factor > 10.0) factor = 10.0;
return factor;
}