Skip to content

Commit

Permalink
Merge pull request #1 from praydog/attached-shutdown
Browse files Browse the repository at this point in the history
Shutdown if attached game closes
  • Loading branch information
praydog authored Oct 9, 2023
2 parents 0b18b49 + a999bf9 commit 62c5347
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions UnrealVR/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ private void Update_InjectorConnectionStatus() {
lastFrontendSignal = now;
}
} else {
if (m_connected && !string.IsNullOrEmpty(m_commandLineAttachExe))
{
// 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();
Expand Down

0 comments on commit 62c5347

Please sign in to comment.