mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-05-29 00:21:34 +08:00
Debugger: Make version API params optional.
They still have types, so some will fail such as an array.
This commit is contained in:
committed by
GitHub
parent
16bca6fe8b
commit
69f67fa73f
@@ -97,14 +97,15 @@ void WebSocketGameStatus(DebuggerRequest &req) {
|
||||
void WebSocketVersion(DebuggerRequest &req) {
|
||||
JsonWriter &json = req.Respond();
|
||||
|
||||
std::string version;
|
||||
if (req.ParamString("version", &version)) {
|
||||
req.client->version = version;
|
||||
}
|
||||
std::string name;
|
||||
if (req.ParamString("name", &name)) {
|
||||
req.client->name = name;
|
||||
}
|
||||
std::string version = req.client->version;
|
||||
if (!req.ParamString("version", &version, DebuggerParamType::OPTIONAL_LOOSE))
|
||||
return;
|
||||
std::string name = req.client->name;
|
||||
if (!req.ParamString("name", &name, DebuggerParamType::OPTIONAL_LOOSE))
|
||||
return;
|
||||
|
||||
req.client->version = version;
|
||||
req.client->name = name;
|
||||
|
||||
json.writeString("name", "PPSSPP");
|
||||
json.writeString("version", PPSSPP_GIT_VERSION);
|
||||
|
||||
Reference in New Issue
Block a user