mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Debugger: Make version API params optional.
They still have types, so some will fail such as an array.
This commit is contained in:
parent
16bca6fe8b
commit
69f67fa73f
1 changed files with 9 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue