diff options
author | bunnei <bunneidev@gmail.com> | 2023-07-11 03:54:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-11 03:54:19 +0200 |
commit | ce7c418e0cc05d92c18ad69c7cb37fecfa71b037 (patch) | |
tree | ea1852111c1b3c3c340608ae518fc8711a4fcfe3 /src/core/core_timing.cpp | |
parent | Merge pull request #11050 from SuperSamus/sdl-button-labels (diff) | |
parent | Fix ScratchBuffer moves (diff) | |
download | yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar.gz yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar.bz2 yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar.lz yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar.xz yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.tar.zst yuzu-ce7c418e0cc05d92c18ad69c7cb37fecfa71b037.zip |
Diffstat (limited to 'src/core/core_timing.cpp')
-rw-r--r-- | src/core/core_timing.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index e6112a3c9..b98a0cb33 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp @@ -70,7 +70,7 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) { -> std::optional<std::chrono::nanoseconds> { return std::nullopt; }; ev_lost = CreateEvent("_lost_event", empty_timed_callback); if (is_multicore) { - timer_thread = std::make_unique<std::thread>(ThreadEntry, std::ref(*this)); + timer_thread = std::make_unique<std::jthread>(ThreadEntry, std::ref(*this)); } } @@ -255,7 +255,6 @@ void CoreTiming::ThreadLoop() { #ifdef _WIN32 while (!paused && !event.IsSet() && wait_time > 0) { wait_time = *next_time - GetGlobalTimeNs().count(); - if (wait_time >= timer_resolution_ns) { Common::Windows::SleepForOneTick(); } else { |