Skip to content

Commit eb1831a

Browse files
committedAug 25, 2024·
Remove break/continue, add a new endpoint to get state
1 parent 644727d commit eb1831a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎src/frontend/http_api.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,10 @@ void http_api_init() {
186186
HTTP_OK;
187187
});
188188

189-
svr.Get("/control/break-continue", [&](const httplib::Request& req, httplib::Response& res) {
190-
n64sys.debugger_state.broken = !n64sys.debugger_state.broken;
191-
HTTP_OK;
189+
svr.Get("/control/state", [&](const httplib::Request& req, httplib::Response& res) {
190+
json result;
191+
result["running"] = !n64sys.debugger_state.broken;
192+
res.set_content(result.dump(), "application/json");
192193
});
193194

194195
svr.Get("/control/quit", [&](const httplib::Request& req, httplib::Response& res) {

0 commit comments

Comments
 (0)
Please sign in to comment.