1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Windows: Remove isStandaloneApp checks

This commit is contained in:
reuk 2025-09-18 16:20:00 +01:00
parent 3f13cdb314
commit 57c739c444
No known key found for this signature in database
2 changed files with 2 additions and 19 deletions

View file

@ -355,9 +355,6 @@ static void setDPIAwareness()
hasCheckedForDPIAwareness = true;
if (! JUCEApplicationBase::isStandaloneApp())
return;
loadDPIAwarenessFunctions();
if (SetProcessDpiAwarenessContext (DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2))
@ -381,9 +378,6 @@ static bool isPerMonitorDPIAwareProcess()
{
setDPIAwareness();
if (! JUCEApplication::isStandaloneApp())
return false;
PROCESS_DPI_AWARENESS context{};
GetProcessDpiAwareness (nullptr, &context);
@ -580,8 +574,7 @@ static Point<int> convertLogicalScreenPointToPhysical (Point<int> p, HWND h) noe
return p;
}
JUCE_API double getScaleFactorForWindow (HWND h);
JUCE_API double getScaleFactorForWindow (HWND h)
static double getScaleFactorForWindow (HWND h)
{
return (double) GetDpiForWindow (h) / USER_DEFAULT_SCREEN_DPI;
}
@ -618,7 +611,7 @@ RTL_OSVERSIONINFOW getWindowsVersionInfo();
double Desktop::getDefaultMasterScale()
{
if (! JUCEApplicationBase::isStandaloneApp() || isPerMonitorDPIAwareProcess())
if (isPerMonitorDPIAwareProcess())
return 1.0;
return getGlobalDPI() / USER_DEFAULT_SCREEN_DPI;
@ -3397,12 +3390,6 @@ private:
//==============================================================================
LRESULT handleDPIChanging (int newDPI, RECT newRect)
{
// Sometimes, windows that should not be automatically scaled (secondary windows in plugins)
// are sent WM_DPICHANGED. The size suggested by the OS is incorrect for our unscaled
// window, so we should ignore it.
if (! isPerMonitorDPIAwareWindow (hwnd))
return 0;
const auto newScale = (double) newDPI / USER_DEFAULT_SCREEN_DPI;
if (approximatelyEqual (scaleFactor, newScale))

View file

@ -80,10 +80,6 @@ private:
#endif
#if JUCE_WINDOWS && JUCE_WIN_PER_MONITOR_DPI_AWARE
extern JUCE_API double getScaleFactorForWindow (HWND);
#endif
static bool contextHasTextureNpotFeature()
{
if (getOpenGLVersion() >= Version (2))