Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

SteamVR: Fix controllers not working if application name contains a slash

David Snopek768c0716da0b
diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp
index 91ef005e79b..c66989deaf0 100644
--- a/modules/openxr/openxr_api.cpp
+++ b/modules/openxr/openxr_api.cpp
@@ -649,6 +649,8 @@ XrResult OpenXRAPI::attempt_create_instance(XrVersion p_version) {
// Get our project name.
String project_name = GLOBAL_GET("application/config/name");
if (!project_name.is_empty()) {
+ // On SteamVR, if applicationName contains slashes, controllers won't work!
+ project_name = project_name.replace_char('/', '-');
copy_string_to_char_buffer(project_name, instance_create_info.applicationInfo.applicationName, XR_MAX_APPLICATION_NAME_SIZE);
}