summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-30 10:34:50 +0100
committerbunnei <bunneidev@gmail.com>2021-01-11 23:23:16 +0100
commit82f6037ec2c56788f7a387a45cccc8bda995619a (patch)
treef9f3167bf4020dc849ea4ebdbbfa2f0e12cff113
parentcore: hle: Integrate new KConditionVariable and KAddressArbiter implementations. (diff)
downloadyuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar.gz
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar.bz2
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar.lz
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar.xz
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.tar.zst
yuzu-82f6037ec2c56788f7a387a45cccc8bda995619a.zip
-rw-r--r--src/core/core_timing.cpp1
-rw-r--r--src/core/hle/service/nvflinger/nvflinger.cpp4
2 files changed, 5 insertions, 0 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp
index e6c8461a5..874b5673a 100644
--- a/src/core/core_timing.cpp
+++ b/src/core/core_timing.cpp
@@ -49,6 +49,7 @@ void CoreTiming::ThreadEntry(CoreTiming& instance) {
Common::SetCurrentThreadPriority(Common::ThreadPriority::VeryHigh);
instance.on_thread_init();
instance.ThreadLoop();
+ MicroProfileOnThreadExit();
}
void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) {
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp
index 4b3581949..ceaa93d28 100644
--- a/src/core/hle/service/nvflinger/nvflinger.cpp
+++ b/src/core/hle/service/nvflinger/nvflinger.cpp
@@ -38,6 +38,10 @@ void NVFlinger::SplitVSync() {
system.RegisterHostThread();
std::string name = "yuzu:VSyncThread";
MicroProfileOnThreadCreate(name.c_str());
+
+ // Cleanup
+ SCOPE_EXIT({ MicroProfileOnThreadExit(); });
+
Common::SetCurrentThreadName(name.c_str());
Common::SetCurrentThreadPriority(Common::ThreadPriority::High);
s64 delay = 0;