1
0
mirror of synced 2024-11-24 07:40:17 +01:00

fix: Native scaling being way too small

This commit is contained in:
WerWolv 2023-10-21 23:58:51 +02:00
parent 7fe9a768d4
commit 79f18d12e6

View File

@ -567,11 +567,15 @@ namespace hex::init {
}
bool configureUIScale() {
int interfaceScaling = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.scaling", 0).get<float>() * 10;
if (interfaceScaling == 0)
interfaceScaling = ImHexApi::System::getNativeScale();
int interfaceScaleSetting = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.scaling", 0.0F).get<float>() * 10;
ImHexApi::System::impl::setGlobalScale(interfaceScaling / 10.0F);
float interfaceScaling;
if (interfaceScaleSetting == 0)
interfaceScaling = ImHexApi::System::getNativeScale();
else
interfaceScaling = interfaceScaleSetting / 10.0F;
ImHexApi::System::impl::setGlobalScale(interfaceScaling);
return true;
}