mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 06:56:24 +08:00
Fix Visual Studio build with HiDPI support.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12241 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+2
-2
@@ -500,7 +500,7 @@ void Fl_WinAPI_Screen_Driver::open_display() {
|
|||||||
|
|
||||||
beenHereDoneThat = 1;
|
beenHereDoneThat = 1;
|
||||||
#ifdef FLTK_HIDPI_SUPPORT
|
#ifdef FLTK_HIDPI_SUPPORT
|
||||||
typedef HRESULT WINAPI (*SetProcessDpiAwareness_type)(int);
|
typedef HRESULT (WINAPI* SetProcessDpiAwareness_type)(int);
|
||||||
HMODULE hMod = LoadLibrary("Shcore.DLL");
|
HMODULE hMod = LoadLibrary("Shcore.DLL");
|
||||||
if (hMod) {
|
if (hMod) {
|
||||||
SetProcessDpiAwareness_type fl_SetProcessDpiAwareness = (SetProcessDpiAwareness_type)GetProcAddress(hMod, "SetProcessDpiAwareness");
|
SetProcessDpiAwareness_type fl_SetProcessDpiAwareness = (SetProcessDpiAwareness_type)GetProcAddress(hMod, "SetProcessDpiAwareness");
|
||||||
@@ -517,7 +517,7 @@ void Fl_WinAPI_Screen_Driver::open_display() {
|
|||||||
|
|
||||||
|
|
||||||
float Fl_WinAPI_Screen_Driver::desktop_scale_factor() {
|
float Fl_WinAPI_Screen_Driver::desktop_scale_factor() {
|
||||||
typedef HRESULT WINAPI (*GetDpiForMonitor_type)(HMONITOR, int, UINT*, UINT*);
|
typedef HRESULT (WINAPI* GetDpiForMonitor_type)(HMONITOR, int, UINT*, UINT*);
|
||||||
float f = 1;
|
float f = 1;
|
||||||
#ifdef FLTK_HIDPI_SUPPORT
|
#ifdef FLTK_HIDPI_SUPPORT
|
||||||
HMODULE hMod = LoadLibrary("Shcore.DLL");
|
HMODULE hMod = LoadLibrary("Shcore.DLL");
|
||||||
|
|||||||
Reference in New Issue
Block a user