当前位置: 首页>>代码示例>>C++>>正文


C++ ptr::callback方法代码示例

本文整理汇总了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;
}
开发者ID:976717326,项目名称:rpcs3,代码行数:29,代码来源:cellSail.cpp

示例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);
	});
}
开发者ID:976717326,项目名称:rpcs3,代码行数:21,代码来源:cellSail.cpp

示例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;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:23,代码来源:cellSail.cpp


注:本文中的vm::ptr::callback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。