mirror of
https://github.com/holub/mame
synced 2025-06-28 23:24:23 +03:00
Fix issue enabling/disabling http (nw)
This commit is contained in:
parent
74b24ecefb
commit
b5df96fd37
@ -386,7 +386,7 @@ public:
|
||||
const char *language() const { return value(OPTION_LANGUAGE); }
|
||||
|
||||
// Web server specific optopns
|
||||
bool http() const { return value(OPTION_HTTP); }
|
||||
bool http() const { return bool_value(OPTION_HTTP); }
|
||||
short http_port() const { return int_value(OPTION_HTTP_PORT); }
|
||||
const char *http_root() const { return value(OPTION_HTTP_ROOT); }
|
||||
|
||||
|
@ -1183,6 +1183,8 @@ running_machine::logerror_callback_item::logerror_callback_item(logerror_callbac
|
||||
|
||||
void running_machine::export_http_api()
|
||||
{
|
||||
if (!options().http()) return;
|
||||
|
||||
m_manager.http_server()->on_get("/api/machine", [this](auto response, auto request)
|
||||
{
|
||||
rapidjson::StringBuffer s;
|
||||
|
Loading…
Reference in New Issue
Block a user