vm::var improved, cleanup

Mostly vm::var initialization introduced.
Added vm::make_var function.
This commit is contained in:
Nekotekina 2015-09-26 23:46:04 +03:00
parent cc02a147d3
commit a974ee009e
116 changed files with 2763 additions and 3019 deletions

View file

@ -12,23 +12,23 @@ extern Module<> cellSail;
void playerBoot(vm::ptr<CellSailPlayer> pSelf, u64 userParam)
{
Emu.GetCallbackManager().Async([=](CPUThread& cpu)
Emu.GetCallbackManager().Async([=](PPUThread& ppu)
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED;
event.u32x2.minor = 0;
pSelf->callback(static_cast<PPUThread&>(cpu), pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION, 0);
pSelf->callback(ppu, pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION, 0);
});
// TODO: Do stuff here
pSelf->booted = true;
Emu.GetCallbackManager().Async([=](CPUThread& cpu)
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(static_cast<PPUThread&>(cpu), pSelf->callbackArg, event, 0, 0);
pSelf->callback(ppu, pSelf->callbackArg, event, 0, 0);
});
}
@ -633,12 +633,12 @@ s32 cellSailPlayerInitialize2(
pSelf->booted = false;
pSelf->paused = true;
Emu.GetCallbackManager().Async([=](CPUThread& cpu)
Emu.GetCallbackManager().Async([=](PPUThread& ppu)
{
CellSailEvent event;
event.u32x2.major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED;
event.u32x2.minor = 0;
pSelf->callback(static_cast<PPUThread&>(cpu), pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_INITIALIZED, 0);
pSelf->callback(ppu, pSelf->callbackArg, event, CELL_SAIL_PLAYER_STATE_INITIALIZED, 0);
});
return CELL_OK;