mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Don't execute EventDPIChanged multiple times
This commit is contained in:
@@ -70,6 +70,9 @@ namespace hex {
|
||||
const auto newScale = LOWORD(wParam) / 96.0F;
|
||||
const auto oldScale = ImHexApi::System::getNativeScale();
|
||||
|
||||
if (u32(oldScale * 10) == u32(newScale * 10))
|
||||
break;
|
||||
|
||||
EventDPIChanged::post(oldScale, newScale);
|
||||
ImHexApi::System::impl::setNativeScale(newScale);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user