Add injector option to not apply any exception handlers (#1541)

* Add injector option to not apply any exception handlers

* Log as warning if NoExceptionHandlers is set
This commit is contained in:
srkizer 2023-12-07 14:06:39 +09:00 committed by GitHub
parent 70249a4db0
commit 5777745ab3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 18 additions and 37 deletions

View file

@ -103,6 +103,7 @@ void from_json(const nlohmann::json& json, DalamudStartInfo& config) {
}
config.CrashHandlerShow = json.value("CrashHandlerShow", config.CrashHandlerShow);
config.NoExceptionHandlers = json.value("NoExceptionHandlers", config.NoExceptionHandlers);
}
void DalamudStartInfo::from_envvars() {

View file

@ -49,6 +49,7 @@ struct DalamudStartInfo {
std::set<std::string> BootUnhookDlls{};
bool CrashHandlerShow = false;
bool NoExceptionHandlers = false;
friend void from_json(const nlohmann::json&, DalamudStartInfo&);
void from_envvars();

View file

@ -133,7 +133,9 @@ DWORD WINAPI InitializeImpl(LPVOID lpParam, HANDLE hMainThreadContinue) {
// ============================== VEH ======================================== //
logging::I("Initializing VEH...");
if (utils::is_running_on_wine()) {
if (g_startInfo.NoExceptionHandlers) {
logging::W("=> Exception handlers are disabled from DalamudStartInfo.");
} else if (utils::is_running_on_wine()) {
logging::I("=> VEH was disabled, running on wine");
} else if (g_startInfo.BootVehEnabled) {
if (veh::add_handler(g_startInfo.BootVehFull, g_startInfo.WorkingDirectory))