Misc: Use C++23 elifdef/elifndef

And drop macros for platforms not supported in the public repo.
This commit is contained in:
Stenzek committed 2026-09-21 14:22:01 +10:00
1 parent 61f954854a
commit 24ecfdd94f
53 files changed
+187 -749

No files matched your search

+1 -4
View File
@@ -374,7 +374,7 @@ void Timer::HybridSleep(std::uint64_t ns, std::uint64_t min_sleep_time)
void Timer::NanoSleep(std::uint64_t ns)
{
#if defined(_WIN32)
#ifdef _WIN32
HANDLE timer = GetSleepTimer();
if (timer)
{
@@ -389,9 +389,6 @@ void Timer::NanoSleep(std::uint64_t ns)
{
Sleep(static_cast<std::uint32_t>(ns / 1000000));
}
#elif defined(__ANDROID__)
// Round down to the next millisecond.
usleep(static_cast<useconds_t>((ns / 1000000) * 1000));
#else
const struct timespec ts = {static_cast<long>(ns / 1000000000ULL), static_cast<long>(ns % 1000000000ULL)};
nanosleep(&ts, nullptr);