From 4f254ae499000e4a3580b89429639cf6e26617f9 Mon Sep 17 00:00:00 2001 From: Fred Emmott Date: Sun, 3 Dec 2023 12:04:55 -0600 Subject: [PATCH] Windows: support setting runtimes with spaces in the names This allows setting "VirtualDesktopXR (Bundled)" in combination with https://github.com/maluoi/openxr-explorer/pull/21 --- src/openxrexplorer/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openxrexplorer/main.cpp b/src/openxrexplorer/main.cpp index 2041f65..3976936 100644 --- a/src/openxrexplorer/main.cpp +++ b/src/openxrexplorer/main.cpp @@ -331,7 +331,7 @@ void app_element_table(const display_table_t *table) { #include void app_set_runtime(int32_t runtime_index) { char command[1024]; - snprintf(command, sizeof(command), " -%s", runtimes[runtime_index].name); + snprintf(command, sizeof(command), " \"-%s\"", runtimes[runtime_index].name); SHELLEXECUTEINFO info = {0}; info.cbSize = sizeof(SHELLEXECUTEINFO);