Offer to restart game from VEH exception handler (#936)

This commit is contained in:
kizer 2022-07-27 04:14:48 +09:00 committed by GitHub
parent 98e421a227
commit 58ceb1dc87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 1279 additions and 616 deletions

View file

@ -615,6 +615,16 @@ namespace Dalamud.Interface.Internal
Service<Dalamud>.Get().Unload();
}
if (ImGui.MenuItem("Restart game"))
{
[DllImport("kernel32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern void RaiseException(uint dwExceptionCode, uint dwExceptionFlags, uint nNumberOfArguments, IntPtr lpArguments);
RaiseException(0x12345678, 0, 0, IntPtr.Zero);
Process.GetCurrentProcess().Kill();
}
if (ImGui.MenuItem("Kill game"))
{
Process.GetCurrentProcess().Kill();