1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 23:33:04 +01:00

Fix mingw build

This commit is contained in:
Ted John
2020-04-21 18:20:59 +01:00
parent aefc49440a
commit 62d15e44db
3 changed files with 21 additions and 6 deletions

View File

@@ -109,7 +109,13 @@ FileWatcher::FileWatcher(const std::string& directoryPath)
FileWatcher::~FileWatcher()
{
#ifdef _WIN32
# ifdef __MINGW32__
// TODO CancelIo is documented as not working across a different thread but
// CancelIoEx is not available.
CancelIo(_directoryHandle);
# else
CancelIoEx(_directoryHandle, nullptr);
# endif
CloseHandle(_directoryHandle);
#else
_finished = true;