mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Config initialization moved to HandleDebuggerRequest
This commit is contained in:
parent
311687a673
commit
af8480683a
2 changed files with 8 additions and 5 deletions
|
@ -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<std::string, DebuggerEventHandler> eventHandlers;
|
||||
std::vector<DebuggerSubscriber *> 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"))
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue