diff --git a/src/ui/app.rs b/src/ui/app.rs index e097067..8145a2c 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -174,15 +174,18 @@ impl App { ); return; } - if let Err(e) = set_current_active_runtime_to_profile(&prof) { - alert( - "Failed to start XR Service", - Some(&format!( - "Error setting current active runtime to profile: {e}" - )), - Some(&self.app_win.clone().upcast::()), - ); - return; + // wivrn takes care of replacing active_runtime.json + if prof.xrservice_type != XRServiceType::Wivrn { + if let Err(e) = set_current_active_runtime_to_profile(&prof) { + alert( + "Failed to start XR Service", + Some(&format!( + "Error setting current active runtime to profile: {e}" + )), + Some(&self.app_win.clone().upcast::()), + ); + return; + } } if let Err(e) = set_current_openvrpaths_to_profile(&prof) { alert( @@ -244,13 +247,17 @@ impl App { } pub fn restore_openxr_openvr_files(&self) { + let prof = self.get_selected_profile(); restore_runtime_entrypoint(); - if let Err(e) = set_current_active_runtime_to_steam() { - alert( - "Could not restore Steam active runtime", - Some(&format!("{e}")), - Some(&self.app_win.clone().upcast::()), - ); + // wivrn should take care of this + if prof.xrservice_type != XRServiceType::Wivrn { + if let Err(e) = set_current_active_runtime_to_steam() { + alert( + "Could not restore Steam active runtime", + Some(&format!("{e}")), + Some(&self.app_win.clone().upcast::()), + ); + } } if let Err(e) = set_current_openvrpaths_to_steam() { alert(