summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2017-07-01 10:12:10 +0000
committerManolo Gouy <Manolo>2017-07-01 10:12:10 +0000
commitba10af9edb594f69e58e6f2ccb251e3bdff3e9c6 (patch)
tree674bac8895aef2f7db047879195136914d1a62b8 /src
parent601e86fba5972dc8e431a34d95988647a1f5e47b (diff)
WIN32: fix error when building without FLTK_HIDPI_SUPPORT.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12284 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Screen_Driver.cxx3
-rw-r--r--src/Fl_win32.cxx2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Fl_Screen_Driver.cxx b/src/Fl_Screen_Driver.cxx
index 29fcffd14..0332f59b3 100644
--- a/src/Fl_Screen_Driver.cxx
+++ b/src/Fl_Screen_Driver.cxx
@@ -493,9 +493,10 @@ void Fl_Screen_Driver::open_display()
static bool been_here = false;
if (!been_here) {
been_here = true;
+ int ns = screen_count();
if (rescalable()) {
float factor = default_scale_factor();
- for (int i = 0; i < screen_count(); i++) scale(i, factor);
+ for (int i = 0; i < ns; i++) scale(i, factor);
Fl::add_handler(Fl_Screen_Driver::scale_handler);
Fl_Graphics_Driver::default_driver().scale(factor);
}
diff --git a/src/Fl_win32.cxx b/src/Fl_win32.cxx
index 2a16a43d3..0366178bc 100644
--- a/src/Fl_win32.cxx
+++ b/src/Fl_win32.cxx
@@ -516,9 +516,9 @@ void Fl_WinAPI_Screen_Driver::open_display_platform() {
float Fl_WinAPI_Screen_Driver::desktop_scale_factor() {
- typedef HRESULT (WINAPI* GetDpiForMonitor_type)(HMONITOR, int, UINT*, UINT*);
float f = 1;
#ifdef FLTK_HIDPI_SUPPORT
+ typedef HRESULT (WINAPI* GetDpiForMonitor_type)(HMONITOR, int, UINT*, UINT*);
HMODULE hMod = LoadLibrary("Shcore.DLL");
GetDpiForMonitor_type fl_GetDpiForMonitor = NULL;
if (hMod) fl_GetDpiForMonitor = (GetDpiForMonitor_type)GetProcAddress(hMod, "GetDpiForMonitor");