mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Turn on random access for Syzygy files in Windows (#1840)
* This is the Windows version of https://github.com/official-stockfish/Stockfish/pull/1829 No functional change.
This commit is contained in:
committed by
Marco Costalba
parent
59d32f8edd
commit
ae5d2c38e1
@@ -224,8 +224,9 @@ public:
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
// Note FILE_FLAG_RANDOM_ACCESS is only a hint to Windows and as such may get ignored.
|
||||||
HANDLE fd = CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
|
HANDLE fd = CreateFile(fname.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
|
||||||
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
|
OPEN_EXISTING, FILE_FLAG_RANDOM_ACCESS, nullptr);
|
||||||
|
|
||||||
if (fd == INVALID_HANDLE_VALUE)
|
if (fd == INVALID_HANDLE_VALUE)
|
||||||
return *baseAddress = nullptr, nullptr;
|
return *baseAddress = nullptr, nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user