diff --git a/Core/Debugger/WebSocket.cpp b/Core/Debugger/WebSocket.cpp index 038cbcd531..5bcffa5070 100644 --- a/Core/Debugger/WebSocket.cpp +++ b/Core/Debugger/WebSocket.cpp @@ -148,6 +148,12 @@ void HandleDebuggerRequest(const http::Request &request) { InputBroadcaster input; SteppingBroadcaster stepping; + // By default everything is on + allowed_config.emplace("logger", true); + allowed_config.emplace("game", true); + allowed_config.emplace("stepping", true); + allowed_config.emplace("input", true); + std::unordered_map eventHandlers; std::vector subscriberData; for (auto init : subscribers) { @@ -193,6 +199,7 @@ void HandleDebuggerRequest(const http::Request &request) { // These send events that aren't just responses to requests // The client can explicitly ask not to be notified about some events + // so we check the client settings first if (allowed_config.at("logger")) logger.Broadcast(ws); if (allowed_config.at("game")) diff --git a/Core/Debugger/WebSocket/WebSocketUtils.h b/Core/Debugger/WebSocket/WebSocketUtils.h index d00a4f4366..3df7f7c7d7 100644 --- a/Core/Debugger/WebSocket/WebSocketUtils.h +++ b/Core/Debugger/WebSocket/WebSocketUtils.h @@ -35,11 +35,7 @@ using namespace json; struct WebSocketClientInfo { WebSocketClientInfo() : name(), version(), allowed() { - // By default everything is on - allowed.emplace("logger", true); - allowed.emplace("game", true); - allowed.emplace("stepping", true); - allowed.emplace("input", true); + } std::string name;