summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nvflinger/nvflinger.h
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2021-10-06 20:02:31 +0200
committerGitHub <noreply@github.com>2021-10-06 20:02:31 +0200
commitf84328934f5e09894a69d9fa1d2f6a34c715321b (patch)
treeeafe64da6ca2bb195cf5523d3fa13f89f117f897 /src/core/hle/service/nvflinger/nvflinger.h
parentMerge pull request #7090 from Moonlacer/tas_spacing_addition (diff)
parentnvflinger: Use jthread and stop_token for VSync thread (diff)
downloadyuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.gz
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.bz2
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.lz
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.xz
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.tar.zst
yuzu-f84328934f5e09894a69d9fa1d2f6a34c715321b.zip
Diffstat (limited to 'src/core/hle/service/nvflinger/nvflinger.h')
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h
index 6d84cafb4..7935cf773 100644
--- a/src/core/hle/service/nvflinger/nvflinger.h
+++ b/src/core/hle/service/nvflinger/nvflinger.h
@@ -4,13 +4,10 @@
#pragma once
-#include <atomic>
#include <list>
#include <memory>
#include <mutex>
#include <optional>
-#include <string>
-#include <string_view>
#include <thread>
#include <vector>
@@ -109,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;
@@ -133,9 +128,7 @@ 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;
};