mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 11:48:36 +01:00
Cleanup a lot of the bootup state management.
This commit is contained in:
1 parent
e6ea158dcc
commit
088a02bfdb
30 files changed
+239
-257
No files matched your search
@@ -27,7 +27,7 @@ struct GameStatusEvent {
|
||||
JsonWriter j;
|
||||
j.begin();
|
||||
j.writeString("event", ev);
|
||||
if (PSP_IsInited()) {
|
||||
if (PSP_GetBootState() == BootState::Complete) {
|
||||
j.pushDict("game");
|
||||
j.writeString("id", g_paramSFO.GetDiscID());
|
||||
j.writeString("version", g_paramSFO.GetValueString("DISC_VERSION"));
|
||||
@@ -83,10 +83,10 @@ void GameBroadcaster::Broadcast(net::WebSocketServer *ws) {
|
||||
} else if (state == UISTATE_INGAME && prevState_ == UISTATE_PAUSEMENU) {
|
||||
ws->Send(GameStatusEvent{"game.resume"});
|
||||
prevState_ = state;
|
||||
} else if (state == UISTATE_INGAME && PSP_IsInited()) {
|
||||
} else if (state == UISTATE_INGAME && PSP_GetBootState() == BootState::Complete) {
|
||||
ws->Send(GameStatusEvent{"game.start"});
|
||||
prevState_ = state;
|
||||
} else if (state == UISTATE_MENU && !PSP_IsInited() && !PSP_IsQuitting() && !PSP_IsRebooting()) {
|
||||
} else if (state == UISTATE_MENU && PSP_GetBootState() != BootState::Complete) {
|
||||
ws->Send(GameStatusEvent{"game.quit"});
|
||||
prevState_ = state;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user