Fix compilation when ENABLE_DEVMODE is defined

This commit is contained in:
David Capello 2021-02-24 09:26:24 -03:00
parent ddcc53469d
commit 9dedb41e0f

View File

@ -584,7 +584,7 @@ bool CustomizedGuiManager::onProcessDevModeKeyDown(KeyMessage* msg)
if (msg->ctrlPressed() && if (msg->ctrlPressed() &&
msg->scancode() == kKeyF1) { msg->scancode() == kKeyF1) {
try { try {
os::Window* window = nativeWindow(); os::Window* window = display()->nativeWindow();
int screenScale = window->scale(); int screenScale = window->scale();
int uiScale = ui::guiscale(); int uiScale = ui::guiscale();
@ -621,8 +621,7 @@ bool CustomizedGuiManager::onProcessDevModeKeyDown(KeyMessage* msg)
ui::set_theme(ui::get_theme(), uiScale); ui::set_theme(ui::get_theme(), uiScale);
} }
if (screenScale != window->scale()) { if (screenScale != window->scale()) {
window->setScale(screenScale); updateAllDisplaysWithNewScale(screenScale);
setWindow(window);
} }
} }
catch (const std::exception& ex) { catch (const std::exception& ex) {