1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 12:33:17 +01:00

Close #16566: Favour WinNT preprocessor version checks over MinGW (#16677)

This commit is contained in:
Silent
2022-03-11 11:59:09 +01:00
committed by GitHub
parent 49fbc30a97
commit 5e725913f8
9 changed files with 40 additions and 88 deletions

View File

@@ -1085,13 +1085,7 @@ void NetworkBase::BeginChatLog()
auto env = GetContext().GetPlatformEnvironment();
auto directory = env->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_CHAT);
_chatLogPath = BeginLog(directory, "", _chatLogFilenameFormat);
# if defined(_WIN32) && !defined(__MINGW32__)
auto pathW = String::ToWideChar(_chatLogPath);
_chat_log_fs.open(pathW.c_str(), std::ios::out | std::ios::app);
# else
_chat_log_fs.open(_chatLogPath, std::ios::out | std::ios::app);
# endif
_chat_log_fs.open(u8path(_chatLogPath), std::ios::out | std::ios::app);
}
void NetworkBase::AppendChatLog(std::string_view s)
@@ -1112,13 +1106,7 @@ void NetworkBase::BeginServerLog()
auto env = GetContext().GetPlatformEnvironment();
auto directory = env->GetDirectoryPath(DIRBASE::USER, DIRID::LOG_SERVER);
_serverLogPath = BeginLog(directory, ServerName, _serverLogFilenameFormat);
# if defined(_WIN32) && !defined(__MINGW32__)
auto pathW = String::ToWideChar(_serverLogPath);
_server_log_fs.open(pathW.c_str(), std::ios::out | std::ios::app | std::ios::binary);
# else
_server_log_fs.open(_serverLogPath, std::ios::out | std::ios::app | std::ios::binary);
# endif
_server_log_fs.open(u8path(_serverLogPath), std::ios::out | std::ios::app | std::ios::binary);
// Log server start event
utf8 logMessage[256];