Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Commit 7627295

Browse files
committed
Merge branch 'master' into vNext
2 parents 71827b7 + a2bbbb1 commit 7627295

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

86BoxManager/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,18 @@ public struct COPYDATASTRUCT
4545
[DllImport("shell32.dll", SetLastError = true)]
4646
static extern void SetCurrentProcessExplicitAppUserModelID([MarshalAs(UnmanagedType.LPWStr)] string AppID);
4747

48+
[DllImport("user32.dll")]
49+
private static extern bool SetProcessDPIAware();
50+
4851
private static readonly string AppID = "86Box.86Box"; //For grouping windows together in Win7+ taskbar
4952
private static Mutex mutex = null;
5053

5154
[STAThread]
5255
static void Main()
5356
{
57+
if (Environment.OSVersion.Version.Major >= 6)
58+
SetProcessDPIAware();
59+
5460
SetCurrentProcessExplicitAppUserModelID(AppID);
5561
const string name = "86Box Manager";
5662

86BoxManager/dlgSettings.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ private bool SaveSettings()
158158
regkey.Close();
159159

160160
settingsChanged = CheckForChanges();
161-
162-
MessageBox.Show("Settings were successfully saved.", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
163161
}
164162
catch (Exception ex)
165163
{

86BoxManager/frmMain.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,11 @@ private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
509509
lvi.Focused = true;
510510
lvi.Selected = true;
511511
VMForceStop(); //Tell the VM to shut down without asking for user confirmation
512+
Process p = Process.GetProcessById(vm.Pid);
513+
p.WaitForExit(500); //Wait 500 milliseconds for each VM to close
512514
}
513515
}
514516

515-
Thread.Sleep(vmCount * 500); //Wait just a bit to make sure everything goes as planned
516517
}
517518
else if (DialogResult == DialogResult.Cancel)
518519
{
@@ -603,9 +604,12 @@ private void VMStart()
603604

604605
p.Start();
605606
vm.Pid = p.Id;
607+
606608
bool initSuccess = p.WaitForInputIdle(launchTimeout); //Wait for the specified amount of time so hWnd can be obtained
607609

608-
if (!p.MainWindowHandle.Equals(IntPtr.Zero) && initSuccess)
610+
//initSuccess is ignored for now because WaitForInputIdle() likes to return false more often now that
611+
//86Box is compiled with GCC 9.3.0...
612+
if (!p.MainWindowHandle.Equals(IntPtr.Zero) /*&& initSuccess*/)
609613
{
610614
vm.hWnd = p.MainWindowHandle; //Get the window handle of the newly created process
611615
vm.Status = VM.STATUS_RUNNING;

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 86Box Manager
2-
**86Box Manager** is the official (though optional) configuration manager for the [86Box emulator](https://github.com/86Box/86Box). It's released under the MIT license, so it can be freely distributed with 86Box. See the `LICENSE` file for license information and `AUTHORS` for a complete list of contributors and authors.
2+
**86Box Manager** is the official but optional configuration manager for the [86Box emulator](https://github.com/86Box/86Box). It's released under the MIT license, so it can be freely distributed with 86Box. See the `LICENSE` file for license information and `AUTHORS` for a complete list of contributors and authors.
33

4-
It's written in C# with Windows Forms using Visual Studio 2017. Please see the [wiki](https://github.com/86Box/86BoxManager/wiki) for additional information.
4+
It's written in C# with Windows Forms. Please see the [wiki](https://github.com/86Box/86BoxManager/wiki) for additional information.
55

66
## Features
77
* Powerful, lightweight and completely optional
@@ -28,7 +28,7 @@ If you have any issues, questions, suggestions, etc., please follow the [trouble
2828

2929
## How to build
3030
1. Clone the repo
31-
2. Open `86BoxManager.sln` solution file in Visual Studio 2017
31+
2. Open `86BoxManager.sln` solution file in Visual Studio
3232
3. Make your changes
3333
4. Choose the `Release` configuration and `x86` platform/CPU
3434
5. Build the solution

0 commit comments

Comments
 (0)