mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Windowing: Avoid dynamically loading SetProcessDPIAware, which is always present on Vista
This commit is contained in:
parent
2261575b00
commit
b4749b1f86
1 changed files with 1 additions and 5 deletions
|
|
@ -354,7 +354,6 @@ static void checkForPointerAPI()
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
using SetProcessDPIAwareFunc = BOOL (WINAPI*) ();
|
||||
using SetProcessDPIAwarenessContextFunc = BOOL (WINAPI*) (DPI_AWARENESS_CONTEXT);
|
||||
using SetProcessDPIAwarenessFunc = HRESULT (WINAPI*) (DPI_Awareness);
|
||||
using SetThreadDPIAwarenessContextFunc = DPI_AWARENESS_CONTEXT (WINAPI*) (DPI_AWARENESS_CONTEXT);
|
||||
|
|
@ -366,7 +365,6 @@ using GetThreadDPIAwarenessContextFunc = DPI_AWARENESS_CONTEXT (WINAPI*)
|
|||
using GetAwarenessFromDpiAwarenessContextFunc = DPI_Awareness (WINAPI*) (DPI_AWARENESS_CONTEXT);
|
||||
using EnableNonClientDPIScalingFunc = BOOL (WINAPI*) (HWND);
|
||||
|
||||
static SetProcessDPIAwareFunc setProcessDPIAware = nullptr;
|
||||
static SetProcessDPIAwarenessContextFunc setProcessDPIAwarenessContext = nullptr;
|
||||
static SetProcessDPIAwarenessFunc setProcessDPIAwareness = nullptr;
|
||||
static SetThreadDPIAwarenessContextFunc setThreadDPIAwarenessContext = nullptr;
|
||||
|
|
@ -381,8 +379,6 @@ static bool hasCheckedForDPIAwareness = false;
|
|||
|
||||
static void loadDPIAwarenessFunctions()
|
||||
{
|
||||
setProcessDPIAware = (SetProcessDPIAwareFunc) getUser32Function ("SetProcessDPIAware");
|
||||
|
||||
constexpr auto shcore = "SHCore.dll";
|
||||
LoadLibraryA (shcore);
|
||||
const auto shcoreModule = GetModuleHandleA (shcore);
|
||||
|
|
@ -428,7 +424,7 @@ static void setDPIAwareness()
|
|||
&& SUCCEEDED (setProcessDPIAwareness (DPI_Awareness::DPI_Awareness_System_Aware)))
|
||||
return;
|
||||
|
||||
NullCheckedInvocation::invoke (setProcessDPIAware);
|
||||
SetProcessDPIAware();
|
||||
}
|
||||
|
||||
static bool isPerMonitorDPIAwareProcess()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue