1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Auto-toggle TouchControls in-game when receiving touch/mouse input

This commit is contained in:
grorp 2024-09-28 11:23:09 +02:00 committed by grorp
parent 3c5f05b284
commit 4952f17df4
15 changed files with 152 additions and 89 deletions

View file

@ -97,7 +97,10 @@ void set_default_settings()
// Client
settings->setDefault("address", "");
settings->setDefault("enable_sound", "true");
settings->setDefault("touch_controls", bool_to_cstr(has_touch));
settings->setDefault("touch_controls", "auto");
// Since GUI scaling shouldn't suddenly change during a session, we use
// hardware detection for "touch_gui" instead of switching based on the last
// input method used.
settings->setDefault("touch_gui", bool_to_cstr(has_touch));
settings->setDefault("sound_volume", "0.8");
settings->setDefault("sound_volume_unfocused", "0.3");