diff options
author | Liam <byteslice@airmail.cc> | 2023-10-11 19:12:02 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-10-20 08:34:15 +0200 |
commit | f21058a6c0aa825d42014d7073d7074ba28df775 (patch) | |
tree | f75fb4141b3d6e50a5927b989609a422559e6b12 /src/core/hle/kernel/k_page_group.h | |
parent | kernel: update KMemoryRegionType values (diff) | |
download | yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar.gz yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar.bz2 yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar.lz yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar.xz yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.tar.zst yuzu-f21058a6c0aa825d42014d7073d7074ba28df775.zip |
Diffstat (limited to 'src/core/hle/kernel/k_page_group.h')
-rw-r--r-- | src/core/hle/kernel/k_page_group.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_page_group.h b/src/core/hle/kernel/k_page_group.h index b32909f05..de9d63a8d 100644 --- a/src/core/hle/kernel/k_page_group.h +++ b/src/core/hle/kernel/k_page_group.h @@ -183,12 +183,17 @@ private: class KScopedPageGroup { public: - explicit KScopedPageGroup(const KPageGroup* gp) : m_pg(gp) { + explicit KScopedPageGroup(const KPageGroup* gp, bool not_first = true) : m_pg(gp) { if (m_pg) { - m_pg->Open(); + if (not_first) { + m_pg->Open(); + } else { + m_pg->OpenFirst(); + } } } - explicit KScopedPageGroup(const KPageGroup& gp) : KScopedPageGroup(std::addressof(gp)) {} + explicit KScopedPageGroup(const KPageGroup& gp, bool not_first = true) + : KScopedPageGroup(std::addressof(gp), not_first) {} ~KScopedPageGroup() { if (m_pg) { m_pg->Close(); |