diff --git a/UnrealVR/MainWindow.xaml.cs b/UnrealVR/MainWindow.xaml.cs index 3de2f65..a1a804b 100644 --- a/UnrealVR/MainWindow.xaml.cs +++ b/UnrealVR/MainWindow.xaml.cs @@ -360,6 +360,13 @@ private void Update_InjectorConnectionStatus() { lastFrontendSignal = now; } } else { + if (m_connected && m_commandLineAttachExe.Length != 0) + { + // If we launched with an attached game exe, we shut ourselves down once that game closes. + Application.Current.Shutdown(); + return; + } + m_connectionStatus.Text = UnrealVRConnectionStatus.NoInstanceDetected; m_connected = false; Hide_ConnectionOptions();