summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index 391e833c0..a1bc6c5d8 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -6,6 +6,7 @@
6 6
7#include "common/common.h" 7#include "common/common.h"
8 8
9#include "core/arm/arm_interface.h"
9#include "core/core.h" 10#include "core/core.h"
10#include "core/hle/kernel/kernel.h" 11#include "core/hle/kernel/kernel.h"
11#include "core/hle/kernel/thread.h" 12#include "core/hle/kernel/thread.h"
@@ -13,7 +14,7 @@
13 14
14namespace Kernel { 15namespace Kernel {
15 16
16Handle g_main_thread = 0; 17Thread* g_main_thread = nullptr;
17HandleTable g_handle_table; 18HandleTable g_handle_table;
18u64 g_program_id = 0; 19u64 g_program_id = 0;
19 20
@@ -80,8 +81,7 @@ bool HandleTable::IsValid(Handle handle) const {
80 81
81Object* HandleTable::GetGeneric(Handle handle) const { 82Object* HandleTable::GetGeneric(Handle handle) const {
82 if (handle == CurrentThread) { 83 if (handle == CurrentThread) {
83 // TODO(yuriks) Directly return the pointer once this is possible. 84 return GetCurrentThread();
84 handle = GetCurrentThreadHandle();
85 } else if (handle == CurrentProcess) { 85 } else if (handle == CurrentProcess) {
86 LOG_ERROR(Kernel, "Current process (%08X) pseudo-handle not supported", CurrentProcess); 86 LOG_ERROR(Kernel, "Current process (%08X) pseudo-handle not supported", CurrentProcess);
87 return nullptr; 87 return nullptr;