You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2025. It is now read-only.
Fixed issue #37
Added missing "VM not found" error for -S parameter
Code clean up
Updated copyright year to include 2019
Please note: this is not the final 1.3.3 commit, there are some further registry related changes that need to be done
{ //Then check if any instances of 86Box are already running and warn the user
125
-
pname = Process.GetProcessesByName("86box");
126
-
if (pname.Length > 0)
127
-
{
128
-
DialogResult result = MessageBox.Show("At least one instance of 86box is already running. It's not recommended that you run 86Box.exe directly outside of Manager. Do you want to continue at your own risk?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
RegistryKeyregkey=Registry.CurrentUser.OpenSubKey(@"SOFTWARE\86Box");//Open the key as read only
104
+
RegistryKeyregkey=Registry.CurrentUser.OpenSubKey(@"SOFTWARE\86Box",false);//Open the key as read only
105
+
106
+
//If the key doesn't exist yet, fallback to defaults
103
107
if(regkey==null)
104
-
{//Key doesn't exist yet, fallback to defaults
108
+
{
109
+
MessageBox.Show("86Box Manager settings could not be loaded. This is normal if you're running 86Box Manager for the first time. Default values will be used.","Warning",MessageBoxButtons.OK,MessageBoxIcon.Warning);
MessageBox.Show("The virtual machine \""+Program.args[2]+"\" could not be found. It may have been removed or the specified name is incorrect.","Virtual machine not found",MessageBoxButtons.OK,MessageBoxIcon.Error);
MessageBox.Show("86Box Manager settings could not be loaded. This is normal if you're running 86Box Manager for the first time. Default values will be used.","Warning",MessageBoxButtons.OK,MessageBoxIcon.Warning);
195
209
196
-
//This check is necessary in case the tailing backslash is not present!
210
+
//If the key doesn't exist, create it and then reopen it
MessageBox.Show("86Box Manager settings are missing or corrupted. This is normal if you're running 86Box Manager for the first time. Please (re)configure the settings now.","Warning",MessageBoxButtons.OK,MessageBoxIcon.Warning);
215
-
dlgSettingsdlg=newdlgSettings();
216
-
dlg.ShowDialog();
217
-
LoadSettings();
218
245
}
246
+
247
+
regkey.Close();
219
248
}
220
249
250
+
//TODO: Rewrite
221
251
//Load the VMs from the registry
222
252
privatevoidLoadVMs()
223
253
{
@@ -526,6 +556,10 @@ private void VMStart()
526
556
}
527
557
}
528
558
}
559
+
catch(Win32Exceptionex)
560
+
{
561
+
MessageBox.Show("Cannot find 86Box.exe. Make sure your settings are correct and try again.","Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
562
+
}
529
563
catch(Exceptionex)
530
564
{
531
565
MessageBox.Show("An error has occurred. Please provide the following information to the developer:\n"+ex.Message+"\n"+ex.StackTrace,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
@@ -1003,7 +1037,7 @@ protected override void WndProc(ref Message m)
1003
1037
}
1004
1038
else
1005
1039
{
1006
-
MessageBox.Show("The virtual machine \""+ds.Data+"\" could not be found. It may have been removed or the specified name is invalid.","Virtual machine not found",MessageBoxButtons.OK,MessageBoxIcon.Error);
1040
+
MessageBox.Show("The virtual machine \""+ds.Data+"\" could not be found. It may have been removed or the specified name is incorrect.","Virtual machine not found",MessageBoxButtons.OK,MessageBoxIcon.Error);
0 commit comments