mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
7a64527db5
commit
a9cca5e76c
12 changed files with 84 additions and 47 deletions
|
@ -113,6 +113,15 @@ bool MyEventReceiver::OnEvent(const SEvent &event)
|
|||
return true;
|
||||
}
|
||||
|
||||
if (event.EventType == EET_APPLICATION_EVENT &&
|
||||
event.ApplicationEvent.EventType == EAET_DPI_CHANGED) {
|
||||
// This is a fake setting so that we can use (de)registerChangedCallback
|
||||
// not only to listen for gui/hud_scaling changes, but also for DPI changes.
|
||||
g_settings->setU16("dpi_change_notifier",
|
||||
g_settings->getU16("dpi_change_notifier") + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// This is separate from other keyboard handling so that it also works in menus.
|
||||
if (event.EventType == EET_KEY_INPUT_EVENT) {
|
||||
const KeyPress keyCode(event.KeyInput);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue