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
This commit is contained in:
parent
601e86fba5
commit
ba10af9edb
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user