Fix compilation when ENABLE_DEVMODE is defined

This commit is contained in:
David Capello 2021-07-05 19:41:51 -03:00
parent c42c5e1453
commit 4a5a3a7bc4

View File

@ -636,8 +636,8 @@ bool CustomizedGuiManager::onProcessDevModeKeyDown(KeyMessage* msg)
if (msg->ctrlPressed() && if (msg->ctrlPressed() &&
msg->scancode() == kKeyF1) { msg->scancode() == kKeyF1) {
try { try {
os::Display* display = getDisplay(); os::Window* window = display();
int screenScale = display->scale(); int screenScale = window->scale();
int uiScale = ui::guiscale(); int uiScale = ui::guiscale();
if (msg->shiftPressed()) { if (msg->shiftPressed()) {
@ -672,9 +672,8 @@ bool CustomizedGuiManager::onProcessDevModeKeyDown(KeyMessage* msg)
if (uiScale != ui::guiscale()) { if (uiScale != ui::guiscale()) {
ui::set_theme(ui::get_theme(), uiScale); ui::set_theme(ui::get_theme(), uiScale);
} }
if (screenScale != display->scale()) { if (screenScale != window->scale()) {
display->setScale(screenScale); updateAllDisplaysWithNewScale(screenScale);
setDisplay(display);
} }
} }
catch (const std::exception& ex) { catch (const std::exception& ex) {