diff options
author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2014-12-29 13:55:30 +0100 |
---|---|---|
committer | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2015-01-09 22:43:52 +0100 |
commit | 8ad41775ccae67e54e9f03cbe054d7562b1c66ce (patch) | |
tree | 79d176bd9805cae0a2cfdd12e4c91c108bec0c8d /src/core/hle/kernel/event.cpp | |
parent | Kernel: Don't re-assign object's handle when duplicating one (diff) | |
download | yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.gz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.bz2 yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.lz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.xz yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.tar.zst yuzu-8ad41775ccae67e54e9f03cbe054d7562b1c66ce.zip |
Diffstat (limited to 'src/core/hle/kernel/event.cpp')
-rw-r--r-- | src/core/hle/kernel/event.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 697e08681..271190dbe 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -53,7 +53,7 @@ public: * @return Result of operation, 0 on success, otherwise error code */ ResultCode SetPermanentLock(Handle handle, const bool permanent_locked) { - Event* evt = g_handle_table.Get<Event>(handle); + Event* evt = g_handle_table.Get<Event>(handle).get(); if (evt == nullptr) return InvalidHandle(ErrorModule::Kernel); evt->permanent_locked = permanent_locked; @@ -67,7 +67,7 @@ ResultCode SetPermanentLock(Handle handle, const bool permanent_locked) { * @return Result of operation, 0 on success, otherwise error code */ ResultCode SetEventLocked(const Handle handle, const bool locked) { - Event* evt = g_handle_table.Get<Event>(handle); + Event* evt = g_handle_table.Get<Event>(handle).get(); if (evt == nullptr) return InvalidHandle(ErrorModule::Kernel); if (!evt->permanent_locked) { @@ -82,13 +82,13 @@ ResultCode SetEventLocked(const Handle handle, const bool locked) { * @return Result of operation, 0 on success, otherwise error code */ ResultCode SignalEvent(const Handle handle) { - Event* evt = g_handle_table.Get<Event>(handle); + Event* evt = g_handle_table.Get<Event>(handle).get(); if (evt == nullptr) return InvalidHandle(ErrorModule::Kernel); // Resume threads waiting for event to signal bool event_caught = false; for (size_t i = 0; i < evt->waiting_threads.size(); ++i) { - Thread* thread = Kernel::g_handle_table.Get<Thread>(evt->waiting_threads[i]); + Thread* thread = Kernel::g_handle_table.Get<Thread>(evt->waiting_threads[i]).get(); if (thread != nullptr) thread->ResumeFromWait(); @@ -112,7 +112,7 @@ ResultCode SignalEvent(const Handle handle) { * @return Result of operation, 0 on success, otherwise error code */ ResultCode ClearEvent(Handle handle) { - Event* evt = g_handle_table.Get<Event>(handle); + Event* evt = g_handle_table.Get<Event>(handle).get(); if (evt == nullptr) return InvalidHandle(ErrorModule::Kernel); if (!evt->permanent_locked) { |