1
0
mirror of synced 2025-02-17 18:59:21 +01:00

fix: Fix macOS build again

This commit is contained in:
WerWolv 2023-02-08 14:11:42 +01:00
parent dd87dc7046
commit 303dd28c7c
3 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@
void openWebpageMacos(const char *url); void openWebpageMacos(const char *url);
bool isMacosSystemDarkModeEnabled(); bool isMacosSystemDarkModeEnabled();
float getBackingScaleFactorMacos(); float getBackingScaleFactor();
} }

View File

@ -26,7 +26,7 @@
} }
} }
float getBackingScaleFactorMacos(void) { float getBackingScaleFactor(void) {
return [[NSScreen mainScreen] backingScaleFactor]; return [[NSScreen mainScreen] backingScaleFactor];
} }

View File

@ -2,6 +2,7 @@
#include <hex/api/imhex_api.hpp> #include <hex/api/imhex_api.hpp>
#include <hex/helpers/utils.hpp> #include <hex/helpers/utils.hpp>
#include <hex/helpers/utils_macos.hpp>
#include <hex/helpers/fmt.hpp> #include <hex/helpers/fmt.hpp>
#include <hex/helpers/logger.hpp> #include <hex/helpers/logger.hpp>
@ -205,7 +206,7 @@ namespace hex::init {
meanScale = 1.0F; meanScale = 1.0F;
#if defined(OS_MACOS) #if defined(OS_MACOS)
meanScale /= getBackingScaleFactorMacos(); meanScale /= getBackingScaleFactor();
#endif #endif
ImHexApi::System::impl::setGlobalScale(meanScale); ImHexApi::System::impl::setGlobalScale(meanScale);