Fixing thread ID.

This commit is contained in:
Ben Vanik
2015-05-18 21:24:14 -07:00
parent 8bfc43bb0d
commit b119aa50f5
5 changed files with 9 additions and 9 deletions

View File

@@ -106,8 +106,8 @@ uint32_t XThread::GetCurrentThreadHandle() {
return thread->handle();
}
uint32_t XThread::GetCurrentThreadId(const uint8_t* thread_state_block) {
return xe::load_and_swap<uint32_t>(thread_state_block + 0x14C);
uint32_t XThread::GetCurrentThreadId(const uint8_t* pcr) {
return xe::load_and_swap<uint32_t>(pcr + 0x2D8 + 0x14C);
}
uint32_t XThread::last_error() {

View File

@@ -33,7 +33,7 @@ class XThread : public XObject {
static XThread* GetCurrentThread();
static uint32_t GetCurrentThreadHandle();
static uint32_t GetCurrentThreadId(const uint8_t* thread_state_block);
static uint32_t GetCurrentThreadId(const uint8_t* pcr);
uint32_t pcr_ptr() const { return pcr_address_; }
uint32_t thread_state_ptr() const { return thread_state_address_; }