diff --git a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp index 369e70e688..18f311c135 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSaveData.cpp @@ -109,14 +109,6 @@ __noinline s32 savedata_op( std::string base_dir = "/dev_hdd0/home/00000001/savedata/"; // TODO: Get the path of the current or specified user vm::stackvar result(CPU); - vm::stackvar listGet(CPU); - vm::stackvar listSet(CPU); - vm::stackvar fixedSet(CPU); - vm::stackvar statGet(CPU); - vm::stackvar statSet(CPU); - vm::stackvar fileGet(CPU); - vm::stackvar fileSet(CPU); - vm::stackvar doneGet(CPU); result->userdata = userdata; // probably should be assigned only once (allows the callback to change it) @@ -126,6 +118,8 @@ __noinline s32 savedata_op( { std::vector save_entries; + vm::stackvar listGet(CPU); + listGet->dirNum = 0; listGet->dirListNum = 0; listGet->dirList.set(setBuf->buf.addr()); @@ -205,6 +199,8 @@ __noinline s32 savedata_op( if (funcList) { + vm::stackvar listSet(CPU); + // List Callback funcList(CPU, result, listGet, listSet); @@ -230,7 +226,7 @@ __noinline s32 savedata_op( // Focus save data s32 focused = -1; - switch (const u32 pos_type = listSet->focusPosition.value()) + switch (const u32 pos_type = listSet->focusPosition) { case CELL_SAVEDATA_FOCUSPOS_DIRNAME: { @@ -314,6 +310,8 @@ __noinline s32 savedata_op( if (funcFixed) { + vm::stackvar fixedSet(CPU); + // Fixed Callback funcFixed(CPU, result, listGet, fixedSet); @@ -349,6 +347,9 @@ __noinline s32 savedata_op( } // get save stats + vm::stackvar statGet(CPU); + vm::stackvar statSet(CPU); + std::string dir_path = base_dir + save_entry.dirName + "/"; std::string sfo_path = dir_path + "PARAM.SFO"; @@ -452,7 +453,7 @@ __noinline s32 savedata_op( psf.SetString("TITLE", statSet->setParam->title); } - switch (const auto mode = statSet->reCreateMode.value() & 0xffff) + switch (const auto mode = statSet->reCreateMode & 0xffff) { case CELL_SAVEDATA_RECREATE_NO: case CELL_SAVEDATA_RECREATE_NO_NOBROKEN: @@ -497,6 +498,9 @@ __noinline s32 savedata_op( } // Enter the loop where the save files are read/created/deleted + vm::stackvar fileGet(CPU); + vm::stackvar fileSet(CPU); + fileGet->excSize = 0; memset(fileGet->reserved, 0, sizeof(fileGet->reserved)); @@ -516,7 +520,7 @@ __noinline s32 savedata_op( std::string filepath = dir_path; - switch (const auto type = fileSet->fileType.value()) + switch (const auto type = fileSet->fileType) { case CELL_SAVEDATA_FILETYPE_SECUREFILE: case CELL_SAVEDATA_FILETYPE_NORMALFILE: @@ -558,7 +562,7 @@ __noinline s32 savedata_op( std::unique_ptr file; - switch (const auto op = fileSet->fileOperation.value()) + switch (const auto op = fileSet->fileOperation) { case CELL_SAVEDATA_FILEOP_READ: { diff --git a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp index 6bf4e90285..d9d57da787 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellSync.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellSync.cpp @@ -985,7 +985,7 @@ s32 syncLFQueueInitialize(vm::ptr queue, vm::ptr buffer, u3 if (old_value == 2) { - if (queue->m_size != size || queue->m_depth != depth || queue->m_buffer.addr().value() != buffer.addr()) + if (queue->m_size != size || queue->m_depth != depth || queue->m_buffer != buffer) { return CELL_SYNC_ERROR_INVAL; } diff --git a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp index 47aef7b960..f729a19429 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellVdec.cpp @@ -713,7 +713,7 @@ s32 cellVdecGetPicture(u32 handle, vm::ptr format, vm:: std::unique_ptr alpha_plane; - switch (const auto type = format->formatType.value()) + switch (const auto type = format->formatType) { case CELL_VDEC_PICFMT_ARGB32_ILV: out_f = AV_PIX_FMT_ARGB; alpha_plane.reset(new u8[w * h]); break; case CELL_VDEC_PICFMT_RGBA32_ILV: out_f = AV_PIX_FMT_RGBA; alpha_plane.reset(new u8[w * h]); break; diff --git a/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.cpp b/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.cpp index b3399303c3..e40550a097 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_ppu_thread.cpp @@ -12,7 +12,7 @@ SysCallBase sys_ppu_thread("sys_ppu_thread"); void _sys_ppu_thread_exit(PPUThread& CPU, u64 errorcode) { - sys_ppu_thread.Warning("_sys_ppu_thread_exit(errorcode=0x%llx)", errorcode); + sys_ppu_thread.Log("_sys_ppu_thread_exit(errorcode=0x%llx)", errorcode); CPU.SetExitStatus(errorcode); CPU.Stop(); @@ -212,7 +212,7 @@ s32 _sys_ppu_thread_create(vm::ptr thread_id, vm::ptr p ppu.SetPrio(prio); ppu.SetStackSize(stacksize < 0x4000 ? 0x4000 : stacksize); // (hack) adjust minimal stack size ppu.SetJoinable(is_joinable); - ppu.SetName(threadname.get_ptr()); + ppu.SetName(threadname ? threadname.get_ptr() : ""); ppu.Run(); ppu.GPR[3] = arg;