mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-24 13:41:49 +01:00
Merge 8f31f7e75f into bef50438f5
This commit is contained in:
commit
1f63579be8
1 changed files with 8 additions and 1 deletions
|
|
@ -1078,7 +1078,14 @@ int main() {
|
|||
window_log_str = log.str();
|
||||
|
||||
print_exception_info_extended(exinfo.ExceptionPointers, exinfo.ContextRecord, log);
|
||||
std::wofstream(logPath) << log.str();
|
||||
if (const auto temp = ws_to_u8(log.str()); !temp.empty()) {
|
||||
std::ofstream(logPath, std::ios::binary).write(temp.data(), temp.size());
|
||||
} else {
|
||||
// for some reason couldn't be converted to UTF-8; write in UTF-16
|
||||
const auto temp2 = log.str();
|
||||
const auto temp3 = std::span(reinterpret_cast<const char*>(temp2.data()), temp2.size() * sizeof(temp2[0]));
|
||||
std::ofstream(logPath, std::ios::binary).write(temp3.data(), temp3.size());
|
||||
}
|
||||
|
||||
TASKDIALOGCONFIG config = { 0 };
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue