本文整理汇总了C++中vm::ptr::callback方法的典型用法代码示例。如果您正苦于以下问题:C++ ptr::callback方法的具体用法?C++ ptr::callback怎么用?C++ ptr::callback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vm::ptr
的用法示例。
在下文中一共展示了ptr::callback方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
s32 cellSailPlayerInitialize2(
vm::ptr<CellSailPlayer> pSelf,
vm::ptr<CellSailMemAllocator> pAllocator,
vm::ptr<CellSailPlayerFuncNotified> pCallback,
vm::ptr<void> callbackArg,
vm::ptr<CellSailPlayerAttribute> pAttribute,
vm::ptr<CellSailPlayerResource> pResource)
{
cellSail.warning("cellSailPlayerInitialize2(pSelf=*0x%x, pAllocator=*0x%x, pCallback=*0x%x, callbackArg=*0x%x, pAttribute=*0x%x, pResource=*0x%x)",
pSelf, pAllocator, pCallback, callbackArg, pAttribute, pResource);
pSelf->allocator = *pAllocator;
pSelf->callback = pCallback;
pSelf->callbackArg = callbackArg;
pSelf->attribute = *pAttribute;
pSelf->resource = *pResource;
pSelf->booted = false;
pSelf->paused = true;
Emu.GetCallbackManager().Async([=](PPUThread& ppu)
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED;
event.u32x2.minor = 0;
pSelf->callback(ppu, pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_INITIALIZED, 0);
});
return CELL_OK;
}
示例2: playerBoot
void playerBoot(vm::ptr<CellSailPlayer> pSelf, u64 userParam)
{
Emu.GetCallbackManager().Async([=](PPUThread& ppu)
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED;
event.u32x2.minor = 0;
pSelf->callback(ppu, pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION, 0);
});
// TODO: Do stuff here
pSelf->booted = true;
Emu.GetCallbackManager().Async([=](PPUThread& ppu)
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_CALL_COMPLETED;
event.u32x2.minor = CELL_SAIL_PLAYER_CALL_BOOT;
pSelf->callback(ppu, pSelf->callbackArg, event, 0, 0);
});
}
示例3: cellSailPlayerBoot
s32 cellSailPlayerBoot(ppu_thread& ppu, vm::ptr<CellSailPlayer> pSelf, u64 userParam)
{
cellSail.warning("cellSailPlayerBoot(pSelf=*0x%x, userParam=%d)", pSelf, userParam);
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED;
event.u32x2.minor = 0;
pSelf->callback(ppu, pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION, 0);
};
// TODO: Do stuff here
pSelf->booted = true;
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_CALL_COMPLETED;
event.u32x2.minor = CELL_SAIL_PLAYER_CALL_BOOT;
pSelf->callback(ppu, pSelf->callbackArg, event, 0, 0);
};
return CELL_OK;
}