1
0
mirror of synced 2024-11-12 18:20:52 +01:00

ui: Fix horrible scaling on MacOS

This commit is contained in:
WerWolv 2022-01-17 20:20:37 +01:00
parent 8701e0f402
commit c4cbcc7232

View File

@ -171,6 +171,13 @@ namespace hex::init {
SharedData::globalScale = SharedData::fontScale = std::midpoint(xScale, yScale);
// On Macs with a retina display (basically all modern ones we care about), the OS reports twice
// the actual monitor scale for some obscure reason. Get rid of this here so ImHex doesn't look
// extremely huge with native scaling on MacOS.
#if defined(OS_MACOS)
SharedData::globalScale /= 2;
#endif
if (SharedData::globalScale <= 0) {
SharedData::globalScale = 1.0;
}