summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_auto_object.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-28 23:38:14 +0200
committerbunnei <bunneidev@gmail.com>2021-07-21 03:54:55 +0200
commit929994132a4f39ca4ab2975caf47a2a99a19b518 (patch)
treeb4109845efdac23561d43b3f7ab9478a14532594 /src/core/hle/kernel/k_auto_object.h
parentMerge pull request #6649 from german77/toggle_sdl (diff)
downloadyuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar.gz
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar.bz2
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar.lz
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar.xz
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.tar.zst
yuzu-929994132a4f39ca4ab2975caf47a2a99a19b518.zip
Diffstat (limited to 'src/core/hle/kernel/k_auto_object.h')
-rw-r--r--src/core/hle/kernel/k_auto_object.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h
index 88a052f65..e4fcdbc67 100644
--- a/src/core/hle/kernel/k_auto_object.h
+++ b/src/core/hle/kernel/k_auto_object.h
@@ -85,8 +85,12 @@ private:
KERNEL_AUTOOBJECT_TRAITS(KAutoObject, KAutoObject);
public:
- explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) {}
- virtual ~KAutoObject() = default;
+ explicit KAutoObject(KernelCore& kernel_) : kernel(kernel_) {
+ RegisterWithKernel();
+ }
+ virtual ~KAutoObject() {
+ UnregisterWithKernel();
+ }
static KAutoObject* Create(KAutoObject* ptr);
@@ -166,6 +170,10 @@ public:
}
}
+private:
+ void RegisterWithKernel();
+ void UnregisterWithKernel();
+
protected:
KernelCore& kernel;
std::string name;