Fix compilation issues that occur when building with bazel (#6008)

This commit is contained in:
PJ Reiniger
2023-12-05 00:18:26 -05:00
committed by GitHub
parent d32c10487c
commit 2676b77873
5 changed files with 4 additions and 5 deletions

View File

@@ -367,12 +367,12 @@ HAL_Bool HAL_Initialize(int32_t timeout, int32_t mode) {
#ifdef _WIN32
TIMECAPS tc;
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
UINT target = min(1, tc.wPeriodMin);
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
timeBeginPeriod(target);
std::atexit([]() {
TIMECAPS tc;
if (timeGetDevCaps(&tc, sizeof(tc)) == TIMERR_NOERROR) {
UINT target = min(1, tc.wPeriodMin);
UINT target = (std::min)(static_cast<UINT>(1), tc.wPeriodMin);
timeEndPeriod(target);
}
});