diff options
author | bunnei <ericbunnie@gmail.com> | 2014-05-19 04:09:08 +0200 |
---|---|---|
committer | bunnei <ericbunnie@gmail.com> | 2014-05-19 04:09:08 +0200 |
commit | 112904b832210d7b8d165988643acae2f68793e7 (patch) | |
tree | 6b459048cc4ac2262296dc6489cfea744c80b7ae /src/core/hle/service/service.h | |
parent | fix warning (diff) | |
download | yuzu-112904b832210d7b8d165988643acae2f68793e7.tar yuzu-112904b832210d7b8d165988643acae2f68793e7.tar.gz yuzu-112904b832210d7b8d165988643acae2f68793e7.tar.bz2 yuzu-112904b832210d7b8d165988643acae2f68793e7.tar.lz yuzu-112904b832210d7b8d165988643acae2f68793e7.tar.xz yuzu-112904b832210d7b8d165988643acae2f68793e7.tar.zst yuzu-112904b832210d7b8d165988643acae2f68793e7.zip |
Diffstat (limited to 'src/core/hle/service/service.h')
-rw-r--r-- | src/core/hle/service/service.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h index 35735a00b..450a439fe 100644 --- a/src/core/hle/service/service.h +++ b/src/core/hle/service/service.h @@ -63,14 +63,16 @@ public: } /// Allocates a new handle for the service - Handle NewHandle() { - Handle handle = (m_handles.size() << 16) | 0;//m_handle; + Handle CreateHandle(KernelObject *obj) { + Handle handle = g_kernel_objects.Create(obj); m_handles.push_back(handle); return handle; } /// Frees a handle from the service - void DeleteHandle(Handle handle) { + template <class T> + void DeleteHandle(const Handle handle) { + g_kernel_objects.Destroy<T>(handle); m_handles.erase(std::remove(m_handles.begin(), m_handles.end(), handle), m_handles.end()); } @@ -111,8 +113,8 @@ protected: private: - std::vector<Handle> m_handles; - std::map<u32, FunctionInfo> m_functions; + std::vector<Handle> m_handles; + std::map<u32, FunctionInfo> m_functions; }; |