diff --git a/rpcs3/Emu/Cell/Modules/cellSearch.cpp b/rpcs3/Emu/Cell/Modules/cellSearch.cpp index 67668d45b5..691393ec74 100644 --- a/rpcs3/Emu/Cell/Modules/cellSearch.cpp +++ b/rpcs3/Emu/Cell/Modules/cellSearch.cpp @@ -42,7 +42,7 @@ void fmt_class_string::format(std::string& out, u64 arg) }); } -struct search_t +struct search_info { vm::ptr func; vm::ptr userData; @@ -61,7 +61,7 @@ error_code cellSearchInitialize(CellSearchMode mode, u32 container, vm::ptr(); + const auto search = g_fxo->get(); search->func = func; search->userData = userData; @@ -78,10 +78,10 @@ error_code cellSearchFinalize() { cellSearch.warning("cellSearchFinalize()"); + const auto search = g_fxo->get(); + sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - search->func(ppu, CELL_SEARCH_EVENT_FINALIZE_RESULT, CELL_OK, vm::null, search->userData); return CELL_OK; }); @@ -98,12 +98,12 @@ error_code cellSearchStartListSearch(CellSearchListSearchType type, CellSearchSo return CELL_SEARCH_ERROR_PARAM; } + const auto search = g_fxo->get(); + *outSearchId = idm::make(); sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - vm::var resultParam; resultParam->searchId = *outSearchId; resultParam->resultNum = 0; // TODO @@ -124,12 +124,12 @@ error_code cellSearchStartContentSearchInList(vm::cptr list return CELL_SEARCH_ERROR_PARAM; } + const auto search = g_fxo->get(); + *outSearchId = idm::make(); sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - vm::var resultParam; resultParam->searchId = *outSearchId; resultParam->resultNum = 0; // TODO @@ -150,12 +150,12 @@ error_code cellSearchStartContentSearch(CellSearchContentSearchType type, CellSe return CELL_SEARCH_ERROR_PARAM; } + const auto search = g_fxo->get(); + *outSearchId = idm::make(); sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - vm::var resultParam; resultParam->searchId = *outSearchId; resultParam->resultNum = 0; // TODO @@ -176,12 +176,12 @@ error_code cellSearchStartSceneSearchInVideo(vm::cptr video return CELL_SEARCH_ERROR_PARAM; } + const auto search = g_fxo->get(); + *outSearchId = idm::make(); sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - vm::var resultParam; resultParam->searchId = *outSearchId; resultParam->resultNum = 0; // TODO @@ -202,12 +202,12 @@ error_code cellSearchStartSceneSearch(CellSearchSceneSearchType searchType, vm:: return CELL_SEARCH_ERROR_PARAM; } + const auto search = g_fxo->get(); + *outSearchId = idm::make(); sysutil_register_cb([=](ppu_thread& ppu) -> s32 { - const auto search = fxm::get_always(); - vm::var resultParam; resultParam->searchId = *outSearchId; resultParam->resultNum = 0; // TODO