mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-08-26 07:25:14 +02:00
Debugger: Add version event for future proofing.
Game isn't precisely right, but it's close enough.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
void *WebSocketGameInit(DebuggerEventHandlerMap &map) {
|
||||
map["game.status"] = &WebSocketGameStatus;
|
||||
map["version"] = &WebSocketVersion;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -49,3 +50,18 @@ void WebSocketGameStatus(DebuggerRequest &req) {
|
||||
}
|
||||
json.writeBool("paused", GetUIState() == UISTATE_PAUSEMENU);
|
||||
}
|
||||
|
||||
// Notify debugger version info (version)
|
||||
//
|
||||
// Parameters:
|
||||
// - name: string indicating name of app or tool.
|
||||
// - version: string version.
|
||||
//
|
||||
// Response (same event name):
|
||||
// - name: string, "PPSSPP" unless some special build.
|
||||
// - version: string, typically starts with "v" and may have git build info.
|
||||
void WebSocketVersion(DebuggerRequest &req) {
|
||||
JsonWriter &json = req.Respond();
|
||||
json.writeString("name", "PPSSPP");
|
||||
json.writeString("version", PPSSPP_GIT_VERSION);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user