Reduce usage of exceptions from Boot (#2373)

* wip

* make pretty

* Remove CRT version check from IM

* fix

* Simplify IsDebuggerPresent hook
This commit is contained in:
srkizer 2025-08-15 16:02:32 +09:00 committed by GitHub
parent f613b177a2
commit 9092e36b33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 494 additions and 295 deletions

View file

@ -635,29 +635,6 @@ internal partial class InterfaceManager : IInternalDisposableService
Service<InterfaceManagerWithScene>.ProvideException(ex);
Log.Error(ex, "Could not load ImGui dependencies.");
fixed (void* lpText =
"Dalamud plugins require the Microsoft Visual C++ Redistributable to be installed.\nPlease install the runtime from the official Microsoft website or disable Dalamud.\n\nDo you want to download the redistributable now?")
{
fixed (void* lpCaption = "Dalamud Error")
{
var res = MessageBoxW(
default,
(ushort*)lpText,
(ushort*)lpCaption,
MB.MB_YESNO | MB.MB_TOPMOST | MB.MB_ICONERROR);
if (res == IDYES)
{
var psi = new ProcessStartInfo
{
FileName = "https://aka.ms/vs/16/release/vc_redist.x64.exe",
UseShellExecute = true,
};
Process.Start(psi);
}
}
}
Environment.Exit(-1);
// Doesn't reach here, but to make the compiler not complain