diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/nvflinger/nvflinger.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index d80fd07ef..7935cf773 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -4,17 +4,15 @@ #pragma once -#include <atomic> #include <list> #include <memory> #include <mutex> #include <optional> -#include <string> -#include <string_view> #include <thread> #include <vector> #include "common/common_types.h" +#include "core/hle/service/kernel_helpers.h" namespace Common { class Event; @@ -108,9 +106,7 @@ private: /// Creates a layer with the specified layer ID in the desired display. void CreateLayerAtId(VI::Display& display, u64 layer_id); - static void VSyncThread(NVFlinger& nv_flinger); - - void SplitVSync(); + void SplitVSync(std::stop_token stop_token); std::shared_ptr<Nvidia::Module> nvdrv; @@ -132,9 +128,9 @@ private: Core::System& system; - std::unique_ptr<std::thread> vsync_thread; - std::unique_ptr<Common::Event> wait_event; - std::atomic<bool> is_running{}; + std::jthread vsync_thread; + + KernelHelpers::ServiceContext service_context; }; } // namespace Service::NVFlinger |