mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Log level/type: Use enum class instead of the awkward namespace trick.
Just a small cleanup I've wanted to do for a long time.
This commit is contained in:
1 parent
308e983a99
commit
1025bbcf89
19 files changed
+162
-170
No files matched your search
@@ -160,14 +160,14 @@ void HandleDebuggerRequest(const http::ServerRequest &request) {
|
||||
ws->SetTextHandler([&](const std::string &t) {
|
||||
JsonReader reader(t.c_str(), t.size());
|
||||
if (!reader.ok()) {
|
||||
ws->Send(DebuggerErrorEvent("Bad message: invalid JSON", LogTypes::LERROR));
|
||||
ws->Send(DebuggerErrorEvent("Bad message: invalid JSON", LogLevel::LERROR));
|
||||
return;
|
||||
}
|
||||
|
||||
const JsonGet root = reader.root();
|
||||
const char *event = root ? root.getString("event", nullptr) : nullptr;
|
||||
if (!event) {
|
||||
ws->Send(DebuggerErrorEvent("Bad message: no event property", LogTypes::LERROR, root));
|
||||
ws->Send(DebuggerErrorEvent("Bad message: no event property", LogLevel::LERROR, root));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ void HandleDebuggerRequest(const http::ServerRequest &request) {
|
||||
}
|
||||
});
|
||||
ws->SetBinaryHandler([&](const std::vector<uint8_t> &d) {
|
||||
ws->Send(DebuggerErrorEvent("Bad message", LogTypes::LERROR));
|
||||
ws->Send(DebuggerErrorEvent("Bad message", LogLevel::LERROR));
|
||||
});
|
||||
|
||||
while (ws->Process(highActivity ? 1.0f / 1000.0f : 1.0f / 60.0f)) {
|
||||
|
||||
Reference in new issue
Block a user