summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/service.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-21 13:04:08 +0100
committerYuri Kunde Schlesner <yuriks@yuriks.net>2014-12-28 14:52:55 +0100
commit7e2903cb74050d846f2da951dff7e84aee13761b (patch)
tree621c9245d2dd393a9569b1b4192f50a27d831972 /src/core/hle/service/service.h
parentKernel: Replace GetStaticHandleType by HANDLE_TYPE constants (diff)
downloadyuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar.gz
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar.bz2
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar.lz
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar.xz
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.tar.zst
yuzu-7e2903cb74050d846f2da951dff7e84aee13761b.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 9d5828fd0..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_handle_table.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_handle_table.Destroy<T>(handle);
+ Kernel::g_handle_table.Close(handle);
m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end());
}