fixed_typemap.hpp: return reference

This commit is contained in:
Nekotekina 2021-03-02 14:59:19 +03:00
parent bbf52f3cea
commit ea5e837bd6
87 changed files with 3028 additions and 2997 deletions

View file

@ -66,11 +66,11 @@ error_code cellRecOpen(vm::cptr<char> pDirName, vm::cptr<char> pFileName, vm::cp
{
cellRec.todo("cellRecOpen(pDirName=%s, pFileName=%s, pParam=*0x%x, container=0x%x, cb=*0x%x, cbUserData=*0x%x)", pDirName, pFileName, pParam, container, cb, cbUserData);
const auto rec = g_fxo->get<rec_info>();
rec->cb = cb;
rec->cbUserData = cbUserData;
auto& rec = g_fxo->get<rec_info>();
rec.cb = cb;
rec.cbUserData = cbUserData;
sysutil_register_cb([=](ppu_thread& ppu) -> s32
sysutil_register_cb([=, &rec](ppu_thread& ppu) -> s32
{
cb(ppu, CELL_REC_STATUS_OPEN, CELL_OK, cbUserData);
return CELL_OK;
@ -83,11 +83,11 @@ error_code cellRecClose(s32 isDiscard)
{
cellRec.todo("cellRecClose(isDiscard=0x%x)", isDiscard);
const auto rec = g_fxo->get<rec_info>();
auto& rec = g_fxo->get<rec_info>();
sysutil_register_cb([=](ppu_thread& ppu) -> s32
sysutil_register_cb([=, &rec](ppu_thread& ppu) -> s32
{
rec->cb(ppu, CELL_REC_STATUS_CLOSE, CELL_OK, rec->cbUserData);
rec.cb(ppu, CELL_REC_STATUS_CLOSE, CELL_OK, rec.cbUserData);
return CELL_OK;
});
@ -103,11 +103,11 @@ error_code cellRecStop()
{
cellRec.todo("cellRecStop()");
const auto rec = g_fxo->get<rec_info>();
auto& rec = g_fxo->get<rec_info>();
sysutil_register_cb([=](ppu_thread& ppu) -> s32
sysutil_register_cb([=, &rec](ppu_thread& ppu) -> s32
{
rec->cb(ppu, CELL_REC_STATUS_STOP, CELL_OK, rec->cbUserData);
rec.cb(ppu, CELL_REC_STATUS_STOP, CELL_OK, rec.cbUserData);
return CELL_OK;
});
@ -118,11 +118,11 @@ error_code cellRecStart()
{
cellRec.todo("cellRecStart()");
const auto rec = g_fxo->get<rec_info>();
auto& rec = g_fxo->get<rec_info>();
sysutil_register_cb([=](ppu_thread& ppu) -> s32
sysutil_register_cb([=, &rec](ppu_thread& ppu) -> s32
{
rec->cb(ppu, CELL_REC_STATUS_START, CELL_OK, rec->cbUserData);
rec.cb(ppu, CELL_REC_STATUS_START, CELL_OK, rec.cbUserData);
return CELL_OK;
});