Exemple #1
0
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;
}
Exemple #2
0
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);
	});
}
Exemple #3
0
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;
}