aboutsummaryrefslogtreecommitdiff
path: root/client/global.gd
diff options
context:
space:
mode:
Diffstat (limited to 'client/global.gd')
-rw-r--r--client/global.gd4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/global.gd b/client/global.gd
index 6d41dc31..47d9da06 100644
--- a/client/global.gd
+++ b/client/global.gd
@@ -83,7 +83,7 @@ func _input(event):
using_joypad_change.emit(using_joypad)
# Update using_touch variable
- if get_setting("ui.touch_controls") == 0: # Only if set to automatic
+ if get_setting("ui.touch_controls") == "automatic": # Only if set to automatic
if event is InputEventScreenTouch or event is InputEventScreenDrag:
if not using_touch:
using_touch = true
@@ -143,7 +143,7 @@ func get_setting(key: String):
func set_setting_unchecked(key: String, value):
value = value.duplicate(true) if value is Array else value
- if key in settings and settings[key] == value: return
+ if key in settings and typeof(settings[key]) == typeof(value) and settings[key] == value: return
settings[key] = value
if Settings.change_hooks_display.get(key) != null: Settings.change_hooks_display.get(key).call(value)
if Settings.change_hooks_apply.get(key) != null: Settings.change_hooks_apply.get(key).call(value)