Selaa lähdekoodia

Wayland: Fix Wayland driver in export templates

I might have accidentally put the socket connection logic inside a
`TOOLS_ENABLED` `#ifdef` xD
Dery Almas 3 viikkoa sitten
vanhempi
sitoutus
8fb195e20d
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5 4
      platform/linuxbsd/wayland/wayland_thread.cpp

+ 5 - 4
platform/linuxbsd/wayland/wayland_thread.cpp

@@ -4652,9 +4652,9 @@ Error WaylandThread::init() {
 
 
 	KeyMappingXKB::initialize();
 	KeyMappingXKB::initialize();
 
 
-#ifdef TOOLS_ENABLED
 	String embedder_socket_path;
 	String embedder_socket_path;
 
 
+#ifdef TOOLS_ENABLED
 	bool embedder_enabled = true;
 	bool embedder_enabled = true;
 
 
 	if (OS::get_singleton()->get_environment("GODOT_WAYLAND_DISABLE_EMBEDDER") == "1") {
 	if (OS::get_singleton()->get_environment("GODOT_WAYLAND_DISABLE_EMBEDDER") == "1") {
@@ -4677,9 +4677,11 @@ Error WaylandThread::init() {
 			print_line("Pausing as per GODOT_DEBUG_EMBEDDER_SINGLE_INSTANCE.");
 			print_line("Pausing as per GODOT_DEBUG_EMBEDDER_SINGLE_INSTANCE.");
 			pause();
 			pause();
 		}
 		}
-	} else if (Engine::get_singleton()->is_embedded_in_editor()) {
-		embedder_socket_path = OS::get_singleton()->get_environment("GODOT_WAYLAND_DISPLAY");
+	}
+#endif // TOOLS_ENABLED
 
 
+	if (Engine::get_singleton()->is_embedded_in_editor()) {
+		embedder_socket_path = OS::get_singleton()->get_environment("GODOT_WAYLAND_DISPLAY");
 #if 0
 #if 0
 		// Debug
 		// Debug
 		OS::get_singleton()->set_environment("WAYLAND_DEBUG", "1");
 		OS::get_singleton()->set_environment("WAYLAND_DEBUG", "1");
@@ -4696,7 +4698,6 @@ Error WaylandThread::init() {
 		print_verbose("Connecting to the Wayland embedder display.");
 		print_verbose("Connecting to the Wayland embedder display.");
 		wl_display = wl_display_connect(embedder_socket_path.utf8().get_data());
 		wl_display = wl_display_connect(embedder_socket_path.utf8().get_data());
 	}
 	}
-#endif // TOOLS_ENABLED
 
 
 	ERR_FAIL_NULL_V_MSG(wl_display, ERR_CANT_CREATE, "Can't connect to a Wayland display.");
 	ERR_FAIL_NULL_V_MSG(wl_display, ERR_CANT_CREATE, "Can't connect to a Wayland display.");