sys: One more attempt to fix macOS scaling issues

This commit is contained in:
WerWolv
2023-02-08 12:53:34 +01:00
parent 89a96c6d25
commit 235a64deef
2 changed files with 7 additions and 2 deletions

View File

@@ -22,6 +22,10 @@
#include <future>
#include <numeric>
#if defined (OS_MACOS)
#include <AppKit/NSScreen.h>
#endif
using namespace std::literals::chrono_literals;
namespace hex::init {
@@ -205,7 +209,7 @@ namespace hex::init {
meanScale = 1.0F;
#if defined(OS_MACOS)
meanScale = std::max(meanScale / 2.0F, 1.0F);
meanScale /= NSScreen.mainScreen.backingScaleFactor;
#endif
ImHexApi::System::impl::setGlobalScale(meanScale);