From fecb9b58035179ac6578a1dc884d423d63da639c Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 1 Jun 2024 23:13:50 +0300 Subject: [PATCH] Fix changing the tablet driver on Windows Plus, it should also no longer require a restart --- src/Autoload/Global.gd | 5 ++--- src/Preferences/PreferencesDialog.gd | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Autoload/Global.gd b/src/Autoload/Global.gd index 82e09f220..af674ee53 100644 --- a/src/Autoload/Global.gd +++ b/src/Autoload/Global.gd @@ -506,9 +506,8 @@ var tablet_driver := 0: if value == tablet_driver: return tablet_driver = value - var tablet_driver_name := DisplayServer.tablet_get_current_driver() - ProjectSettings.set_setting("display/window/tablet_driver", tablet_driver_name) - ProjectSettings.save_custom(root_directory.path_join(OVERRIDE_FILE)) + var tablet_driver_name := DisplayServer.tablet_get_driver_name(tablet_driver) + DisplayServer.tablet_set_current_driver(tablet_driver_name) # Tools & options ## Found in Preferences. If [code]true[/code], the cursor's left tool icon is visible. diff --git a/src/Preferences/PreferencesDialog.gd b/src/Preferences/PreferencesDialog.gd index 316a418aa..49293e2d9 100644 --- a/src/Preferences/PreferencesDialog.gd +++ b/src/Preferences/PreferencesDialog.gd @@ -185,7 +185,7 @@ var preferences: Array[Preference] = [ # Preference.new( # "renderer", "Drivers/DriversContainer/Renderer", "selected", OS.VIDEO_DRIVER_GLES2, true # ), - Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", 0, true) + Preference.new("tablet_driver", "Drivers/DriversContainer/TabletDriver", "selected", 0) ] var content_list := PackedStringArray([])