summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-29 03:11:55 +0100
committerbunnei <bunneidev@gmail.com>2014-12-29 03:11:55 +0100
commit77363d9590ed544cf714f26c575e98b7858e18e1 (patch)
treea48225a3b62bb3d72d94289b6e34326cbed4f5cc /src/core/hle/service/service.h
parentMerge pull request #357 from bunnei/dyncom-pkhbt-pkhtb (diff)
parentKernel: New handle manager (diff)
downloadyuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar.gz
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar.bz2
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar.lz
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar.xz
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.tar.zst
yuzu-77363d9590ed544cf714f26c575e98b7858e18e1.zip
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r--src/core/hle/service/service.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index 0616822fa..28b4ccd17 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -54,7 +54,8 @@ public:
/// Allocates a new handle for the service
Handle CreateHandle(Kernel::Object *obj) {
- Handle handle = Kernel::g_object_pool.Create(obj);
+ // TODO(yuriks): Fix error reporting
+ Handle handle = Kernel::g_handle_table.Create(obj).ValueOr(INVALID_HANDLE);
m_handles.push_back(handle);
return handle;
}
@@ -62,7 +63,7 @@ public:
/// Frees a handle from the service
template <class T>
void DeleteHandle(const Handle handle) {
- Kernel::g_object_pool.Destroy<T>(handle);
+ Kernel::g_handle_table.Close(handle);
m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end());
}