mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Make the crash handler work on wine properly (#1636)
* add LoadMethod to DalamudStartInfo * add to_wstring utility function * append full injector launch args for VEH * remove usage of std::chrono::zoned_time * fix injector arguments in crash handler restart * enable VEH on wine * remove dead wine detection code * write out tspack with std::fstream * fix off-by-one error in get_window_string() * remove usage of std::chrono when writing tspack * do not deadlock on crashing DalamudCrashHandler
This commit is contained in:
parent
16bc6b86e5
commit
386e5f245c
11 changed files with 148 additions and 77 deletions
|
|
@ -68,10 +68,25 @@ void from_json(const nlohmann::json& json, DalamudStartInfo::ClientLanguage& val
|
|||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& json, DalamudStartInfo::LoadMethod& value) {
|
||||
if (json.is_number_integer()) {
|
||||
value = static_cast<DalamudStartInfo::LoadMethod>(json.get<int>());
|
||||
|
||||
}
|
||||
else if (json.is_string()) {
|
||||
const auto langstr = unicode::convert<std::string>(json.get<std::string>(), &unicode::lower);
|
||||
if (langstr == "entrypoint")
|
||||
value = DalamudStartInfo::LoadMethod::Entrypoint;
|
||||
else if (langstr == "inject")
|
||||
value = DalamudStartInfo::LoadMethod::DllInject;
|
||||
}
|
||||
}
|
||||
|
||||
void from_json(const nlohmann::json& json, DalamudStartInfo& config) {
|
||||
if (!json.is_object())
|
||||
return;
|
||||
|
||||
config.DalamudLoadMethod = json.value("LoadMethod", config.DalamudLoadMethod);
|
||||
config.WorkingDirectory = json.value("WorkingDirectory", config.WorkingDirectory);
|
||||
config.ConfigurationPath = json.value("ConfigurationPath", config.ConfigurationPath);
|
||||
config.PluginDirectory = json.value("PluginDirectory", config.PluginDirectory);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue