From fc5497861a9d179468d49886436decb73da32dab Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 30 Nov 2022 02:09:06 +0200 Subject: [PATCH] Fix tablet driver not reflecting the currently chosen driver If winink was chosen, the preferences still showed wintab. --- src/Autoload/Global.gd | 2 ++ src/Preferences/PreferencesDialog.gd | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 31f820f32..5d1831523 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -214,6 +214,8 @@ onready var current_version: String = ProjectSettings.get_setting("application/c func _init() -> void: + if ProjectSettings.get_setting("display/window/tablet_driver") == "winink": + tablet_driver = 1 if OS.has_feature("editor"): return diff --git a/src/Preferences/PreferencesDialog.gd b/src/Preferences/PreferencesDialog.gd index 01868aee1..04ae78c3c 100644 --- a/src/Preferences/PreferencesDialog.gd +++ b/src/Preferences/PreferencesDialog.gd @@ -82,7 +82,7 @@ var preferences := [ Preference.new( "renderer", "Drivers/DriversContainer/Renderer", "selected", true, OS.VIDEO_DRIVER_GLES2 ), - Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", true) + Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", true, 0) ] var content_list := [] @@ -120,7 +120,7 @@ class Preference: node_path = _node_path value_type = _value_type require_restart = _require_restart - if _default_value: + if _default_value != null: default_value = _default_value else: default_value = Global.get(prop_name)