Browse Source

Windows: Fixed a build error and some unreachable code warnings when JUCE_WIN_PER_MONITOR_DPI_AWARE=0

tags/2021-05-28
ed 4 years ago
parent
commit
c32142a215
1 changed files with 9 additions and 9 deletions
  1. +9
    -9
      modules/juce_gui_basics/native/juce_win32_Windowing.cpp

+ 9
- 9
modules/juce_gui_basics/native/juce_win32_Windowing.cpp View File

@@ -435,8 +435,7 @@ static bool isPerMonitorDPIAwareProcess()
{
#if ! JUCE_WIN_PER_MONITOR_DPI_AWARE
return false;
#endif
#else
static bool dpiAware = []() -> bool
{
setDPIAwareness();
@@ -451,15 +450,15 @@ static bool isPerMonitorDPIAwareProcess()
}();
return dpiAware;
#endif
}
static bool isPerMonitorDPIAwareWindow (HWND nativeWindow)
{
#if ! JUCE_WIN_PER_MONITOR_DPI_AWARE
ignoreUnused (h);
ignoreUnused (nativeWindow);
return false;
#endif
#else
setDPIAwareness();
if (getWindowDPIAwarenessContext != nullptr
@@ -470,14 +469,14 @@ static bool isPerMonitorDPIAwareWindow (HWND nativeWindow)
}
return isPerMonitorDPIAwareProcess();
#endif
}
static bool isPerMonitorDPIAwareThread()
{
#if ! JUCE_WIN_PER_MONITOR_DPI_AWARE
return false;
#endif
#else
setDPIAwareness();
if (getThreadDPIAwarenessContext != nullptr
@@ -488,6 +487,7 @@ static bool isPerMonitorDPIAwareThread()
}
return isPerMonitorDPIAwareProcess();
#endif
}
static double getGlobalDPI()
@@ -1949,8 +1949,7 @@ public:
{
#if ! JUCE_WIN_PER_MONITOR_DPI_AWARE
return 1.0;
#endif
#else
if (! isPerMonitorDPIAwareWindow (hwnd))
return 1.0;
@@ -1964,6 +1963,7 @@ public:
}
return scaleFactor;
#endif
}
private:


Loading…
Cancel
Save