Skip to content

Commit

Permalink
Merge pull request #4059 from bylaws/log
Browse files Browse the repository at this point in the history
Windows: Don't assume the log file was successfully opened
  • Loading branch information
Sonicadvance1 authored Sep 11, 2024
2 parents 2672e06 + 0b0e15c commit f20e626
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Windows/Common/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static void MsgHandler(LogMan::DebugLevels Level, const char* Message) {
const auto Output = fextl::fmt::format("[{}][{:X}] {}\n", LogMan::DebugLevelStr(Level), GetCurrentThreadId(), Message);
if (WineDbgOut) {
WineDbgOut(Output.c_str());
} else {
} else if (LogFile) {
fwrite(Output.c_str(), 1, Output.size(), LogFile);
}
}
Expand All @@ -26,7 +26,7 @@ static void AssertHandler(const char* Message) {
const auto Output = fextl::fmt::format("[ASSERT] {}\n", Message);
if (WineDbgOut) {
WineDbgOut(Output.c_str());
} else {
} else if (LogFile) {
fwrite(Output.c_str(), 1, Output.size(), LogFile);
}
}
Expand Down

0 comments on commit f20e626

Please sign in to comment.