From 7be35315da90789c55bbf5731f5c544286a10291 Mon Sep 17 00:00:00 2001 From: Eladash Date: Wed, 18 Mar 2020 16:47:44 +0200 Subject: [PATCH] Fix lv2 sys_lwcond/sys_lwmutex kernel explorer names --- rpcs3/Emu/Cell/Modules/sys_lwcond_.cpp | 2 +- rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_lwcond.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_lwcond.h | 4 ++-- rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp | 2 +- rpcs3/Emu/Cell/lv2/sys_lwmutex.h | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/Modules/sys_lwcond_.cpp b/rpcs3/Emu/Cell/Modules/sys_lwcond_.cpp index 12347ba0d9..db1f892dea 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lwcond_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lwcond_.cpp @@ -18,7 +18,7 @@ error_code sys_lwcond_create(ppu_thread& ppu, vm::ptr lwcond, vm:: attrs->pshared = SYS_SYNC_NOT_PROCESS_SHARED; attrs->name_u64 = attr->name_u64; - if (auto res = g_cfg.core.hle_lwmutex ? sys_cond_create(ppu, out_id, lwmutex->sleep_queue, attrs) : _sys_lwcond_create(ppu, out_id, lwmutex->sleep_queue, lwcond, attr->name_u64)) + if (auto res = g_cfg.core.hle_lwmutex ? sys_cond_create(ppu, out_id, lwmutex->sleep_queue, attrs) : _sys_lwcond_create(ppu, out_id, lwmutex->sleep_queue, lwcond, std::bit_cast>(attr->name_u64))) { return res; } diff --git a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp index 830485f99a..ea7ba4ce1c 100644 --- a/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp +++ b/rpcs3/Emu/Cell/Modules/sys_lwmutex_.cpp @@ -41,7 +41,7 @@ error_code sys_lwmutex_create(ppu_thread& ppu, vm::ptr lwmutex, v attrs->flags = 0; attrs->name_u64 = attr->name_u64; - if (error_code res = g_cfg.core.hle_lwmutex ? sys_mutex_create(ppu, out_id, attrs) : _sys_lwmutex_create(ppu, out_id, protocol, lwmutex, 0x80000001, attr->name_u64)) + if (error_code res = g_cfg.core.hle_lwmutex ? sys_mutex_create(ppu, out_id, attrs) : _sys_lwmutex_create(ppu, out_id, protocol, lwmutex, 0x80000001, std::bit_cast>(attr->name_u64))) { return res; } diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp index 0922b707c1..cfc12e2b4e 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.cpp @@ -13,7 +13,7 @@ error_code _sys_lwcond_create(ppu_thread& ppu, vm::ptr lwcond_id, u32 lwmut { vm::temporary_unlock(ppu); - sys_lwcond.warning(u8"_sys_lwcond_create(lwcond_id=*0x%x, lwmutex_id=0x%x, control=*0x%x, name=0x%llx (“%s”))", lwcond_id, lwmutex_id, control, name, lv2_obj::name64(name)); + sys_lwcond.warning(u8"_sys_lwcond_create(lwcond_id=*0x%x, lwmutex_id=0x%x, control=*0x%x, name=0x%llx (“%s”))", lwcond_id, lwmutex_id, control, name, lv2_obj::name64(std::bit_cast>(name))); u32 protocol; diff --git a/rpcs3/Emu/Cell/lv2/sys_lwcond.h b/rpcs3/Emu/Cell/lv2/sys_lwcond.h index 30ffbd648f..2255c7281b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwcond.h +++ b/rpcs3/Emu/Cell/lv2/sys_lwcond.h @@ -25,7 +25,7 @@ struct lv2_lwcond final : lv2_obj { static const u32 id_base = 0x97000000; - const u64 name; + const be_t name; const u32 lwid; const u32 protocol; vm::ptr control; @@ -35,7 +35,7 @@ struct lv2_lwcond final : lv2_obj std::deque sq; lv2_lwcond(u64 name, u32 lwid, u32 protocol, vm::ptr control) - : name(name) + : name(std::bit_cast>(name)) , lwid(lwid) , protocol(protocol) , control(control) diff --git a/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp b/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp index ea28ee0c3a..1ee7f26915 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp @@ -12,7 +12,7 @@ error_code _sys_lwmutex_create(ppu_thread& ppu, vm::ptr lwmutex_id, u32 pro { vm::temporary_unlock(ppu); - sys_lwmutex.warning(u8"_sys_lwmutex_create(lwmutex_id=*0x%x, protocol=0x%x, control=*0x%x, has_name=0x%x, name=0x%llx (“%s”))", lwmutex_id, protocol, control, has_name, name, lv2_obj::name64(name)); + sys_lwmutex.warning(u8"_sys_lwmutex_create(lwmutex_id=*0x%x, protocol=0x%x, control=*0x%x, has_name=0x%x, name=0x%llx (“%s”))", lwmutex_id, protocol, control, has_name, name, lv2_obj::name64(std::bit_cast>(name))); if (protocol != SYS_SYNC_FIFO && protocol != SYS_SYNC_RETRY && protocol != SYS_SYNC_PRIORITY) { diff --git a/rpcs3/Emu/Cell/lv2/sys_lwmutex.h b/rpcs3/Emu/Cell/lv2/sys_lwmutex.h index d10877cc21..818887293b 100644 --- a/rpcs3/Emu/Cell/lv2/sys_lwmutex.h +++ b/rpcs3/Emu/Cell/lv2/sys_lwmutex.h @@ -57,7 +57,7 @@ struct lv2_lwmutex final : lv2_obj const u32 protocol; const vm::ptr control; - const u64 name; + const be_t name; shared_mutex mutex; atomic_t signaled{0}; @@ -66,7 +66,7 @@ struct lv2_lwmutex final : lv2_obj lv2_lwmutex(u32 protocol, vm::ptr control, u64 name) : protocol(protocol) , control(control) - , name(name) + , name(std::bit_cast>(name)) { } };