diff --git a/UEVR/GameAutoStartExplanationDialog.xaml b/UEVR/GameAutoStartExplanationDialog.xaml
new file mode 100644
index 0000000..e4a009b
--- /dev/null
+++ b/UEVR/GameAutoStartExplanationDialog.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/UEVR/GameAutoStartExplanationDialog.xaml.cs b/UEVR/GameAutoStartExplanationDialog.xaml.cs
new file mode 100644
index 0000000..d225abe
--- /dev/null
+++ b/UEVR/GameAutoStartExplanationDialog.xaml.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace UEVR {
+ public partial class GameAutoStartExplanationDialog : Window {
+ public bool HideAutostartWarning { get; private set; }
+ public bool DialogResultStartGame { get; private set; }
+
+ public GameAutoStartExplanationDialog() {
+ InitializeComponent();
+ }
+
+ private void btnStartGame_Click(object sender, RoutedEventArgs e) {
+ HideAutostartWarning = chkRememberChoice.IsChecked == true;
+ DialogResultStartGame = true;
+ this.Close();
+ }
+
+ private void btnWaitForGameStart_Click(object sender, RoutedEventArgs e) {
+ HideAutostartWarning = chkRememberChoice.IsChecked == true;
+ DialogResultStartGame = false;
+ this.Close();
+ }
+ }
+}
diff --git a/UEVR/MainWindow.xaml b/UEVR/MainWindow.xaml
index 12a2f34..b20797b 100644
--- a/UEVR/MainWindow.xaml
+++ b/UEVR/MainWindow.xaml
@@ -157,6 +157,10 @@
+
+
+
+
diff --git a/UEVR/MainWindow.xaml.cs b/UEVR/MainWindow.xaml.cs
index d348600..56be704 100644
--- a/UEVR/MainWindow.xaml.cs
+++ b/UEVR/MainWindow.xaml.cs
@@ -178,6 +178,7 @@ public partial class MainWindow : Window {
private string? m_commandLineLaunchArgs = null;
private int m_commandLineDelayInjection = 0;
private bool m_ignoreFutureVDWarnings = false;
+ private bool m_gameAutostartExplanationShown = false;
[System.Runtime.InteropServices.DllImport("user32.dll")]
public static extern void SwitchToThisWindow(IntPtr hWnd, bool fAltTab);
@@ -238,6 +239,8 @@ private void MainWindow_Loaded(object sender, RoutedEventArgs e) {
m_nullifyVRPluginsCheckbox.IsChecked = m_mainWindowSettings.NullifyVRPluginsCheckbox;
m_ignoreFutureVDWarnings = m_mainWindowSettings.IgnoreFutureVDWarnings;
m_focusGameOnInjectionCheckbox.IsChecked = m_mainWindowSettings.FocusGameOnInjection;
+ m_gameAutoStartCheckbox.IsChecked = m_mainWindowSettings.GameAutoStart;
+ m_gameAutostartExplanationShown = m_mainWindowSettings.GameAutoStartExplanationShown;
m_updateTimer.Tick += (sender, e) => Dispatcher.Invoke(MainWindow_Update);
m_updateTimer.Start();
@@ -293,6 +296,25 @@ private void Update_InjectStatus() {
TimeSpan oneSecond = TimeSpan.FromSeconds(1);
if (m_commandLineLaunchExe != null && !m_launchExeDone) {
+ if(m_gameAutostartExplanationShown == false) {
+ var dialog = new GameAutoStartExplanationDialog();
+ dialog.ShowDialog();
+
+ m_gameAutostartExplanationShown = dialog.HideAutostartWarning;
+
+ if(m_gameAutostartExplanationShown) {
+ m_gameAutoStartCheckbox.IsChecked = dialog.DialogResultStartGame;
+ }
+
+ if(!dialog.DialogResultStartGame) {
+ m_launchExeDone = true;
+ return;
+ }
+ } else if(m_gameAutoStartCheckbox.IsChecked == false) {
+ m_launchExeDone = true;
+ return;
+ }
+
if(m_commandLineAttachExePath != null && m_commandLineAttachExe != null) {
if(!IsUnrealEngineGame(m_commandLineAttachExePath, m_commandLineAttachExe)) {
var result = MessageBox.Show(m_lastSelectedProcessName + " does not appear to be an Unreal Engine title.\n" +
@@ -678,6 +700,8 @@ private void MainWindow_Closing(object sender, System.ComponentModel.CancelEvent
m_mainWindowSettings.NullifyVRPluginsCheckbox = m_nullifyVRPluginsCheckbox.IsChecked == true;
m_mainWindowSettings.IgnoreFutureVDWarnings = m_ignoreFutureVDWarnings;
m_mainWindowSettings.FocusGameOnInjection = m_focusGameOnInjectionCheckbox.IsChecked == true;
+ m_mainWindowSettings.GameAutoStart = m_gameAutoStartCheckbox.IsChecked == true;
+ m_mainWindowSettings.GameAutoStartExplanationShown = m_gameAutostartExplanationShown;
m_mainWindowSettings.Save();
}
diff --git a/UEVR/MainWindowSettings.cs b/UEVR/MainWindowSettings.cs
index 4ac4d09..723ad29 100644
--- a/UEVR/MainWindowSettings.cs
+++ b/UEVR/MainWindowSettings.cs
@@ -42,5 +42,19 @@ public bool FocusGameOnInjection
get { return (bool)this["FocusGameOnInjection"]; }
set { this["FocusGameOnInjection"] = value; }
}
+
+ [UserScopedSettingAttribute()]
+ [DefaultSettingValueAttribute("true")]
+ public bool GameAutoStart {
+ get { return (bool)this["GameAutoStart"]; }
+ set { this["GameAutoStart"] = value; }
+ }
+
+ [UserScopedSettingAttribute()]
+ [DefaultSettingValueAttribute("false")]
+ public bool GameAutoStartExplanationShown {
+ get { return (bool)this["GameAutoStartExplanationShown"]; }
+ set { this["GameAutoStartExplanationShown"] = value; }
+ }
}
}