fix: Fix macOS build again
This commit is contained in:
parent
dd87dc7046
commit
303dd28c7c
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
void openWebpageMacos(const char *url);
|
void openWebpageMacos(const char *url);
|
||||||
bool isMacosSystemDarkModeEnabled();
|
bool isMacosSystemDarkModeEnabled();
|
||||||
float getBackingScaleFactorMacos();
|
float getBackingScaleFactor();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
float getBackingScaleFactorMacos(void) {
|
float getBackingScaleFactor(void) {
|
||||||
return [[NSScreen mainScreen] backingScaleFactor];
|
return [[NSScreen mainScreen] backingScaleFactor];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user