You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add editor setting to override tablet driver.
This commit is contained in:
committed by
bruvzg
parent
96cdbbe5bd
commit
b3c0eaeeb8
@@ -2783,6 +2783,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
print_header(false);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
int tablet_driver_editor = -1;
|
||||
if (editor || project_manager || cmdline_tool) {
|
||||
OS::get_singleton()->benchmark_begin_measure("Startup", "Initialize Early Settings");
|
||||
|
||||
@@ -2817,6 +2818,8 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
bool prefer_wayland_found = false;
|
||||
bool prefer_wayland = false;
|
||||
|
||||
bool tablet_found = false;
|
||||
|
||||
if (editor) {
|
||||
screen_property = "interface/editor/editor_screen";
|
||||
} else if (project_manager) {
|
||||
@@ -2831,7 +2834,7 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
prefer_wayland_found = true;
|
||||
}
|
||||
|
||||
while (!screen_found || !prefer_wayland_found) {
|
||||
while (!screen_found || !prefer_wayland_found || !tablet_found) {
|
||||
assign = Variant();
|
||||
next_tag.fields.clear();
|
||||
next_tag.name = String();
|
||||
@@ -2855,6 +2858,11 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
prefer_wayland = value;
|
||||
prefer_wayland_found = true;
|
||||
}
|
||||
|
||||
if (!tablet_found && assign == "interface/editor/tablet_driver") {
|
||||
tablet_driver_editor = value;
|
||||
tablet_found = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3123,6 +3131,12 @@ Error Main::setup2(bool p_show_boot_logo) {
|
||||
GLOBAL_DEF_RST_NOVAL("input_devices/pen_tablet/driver", "");
|
||||
GLOBAL_DEF_RST_NOVAL(PropertyInfo(Variant::STRING, "input_devices/pen_tablet/driver.windows", PROPERTY_HINT_ENUM, "auto,winink,wintab,dummy"), "");
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (tablet_driver.is_empty() && tablet_driver_editor != -1) {
|
||||
tablet_driver = DisplayServer::get_singleton()->tablet_get_driver_name(tablet_driver_editor);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (tablet_driver.is_empty()) { // specified in project.godot
|
||||
tablet_driver = GLOBAL_GET("input_devices/pen_tablet/driver");
|
||||
if (tablet_driver.is_empty()) {
|
||||
|
||||
Reference in New Issue
Block a user