summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author R. Belmont <rb6502@users.noreply.github.com>2013-09-24 14:02:47 +0000
committer R. Belmont <rb6502@users.noreply.github.com>2013-09-24 14:02:47 +0000
commit6e06426096420f20abb4e7f173b65c2d352f70a2 (patch)
treed4c905970e0f67f60bca2e64a80233f945ee5fd1 /src
parent9197a7adafe105279c98b465bee1ef1e1c4d7c45 (diff)
web: Fix web options reading from ini, improved load/save state UI [Firehawke]
Diffstat (limited to 'src')
-rw-r--r--src/emu/emuopts.c2
-rw-r--r--src/emu/mame.c8
-rw-r--r--src/emu/webengine.c2
3 files changed, 10 insertions, 2 deletions
diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c
index dd3a54af3e3..9146a36f3a5 100644
--- a/src/emu/emuopts.c
+++ b/src/emu/emuopts.c
@@ -202,7 +202,7 @@ const options_entry emu_options::s_option_entries[] =
{ OPTION_AUTOBOOT_DELAY, "2", OPTION_INTEGER, "timer delay in sec to trigger command execution on autoboot" },
{ OPTION_AUTOBOOT_SCRIPT ";script", NULL, OPTION_STRING, "lua script to execute after machine boot" },
{ OPTION_HTTP, "0", OPTION_BOOLEAN, "enable local http server" },
- { OPTION_HTTP_PORT, "8080", OPTION_INTEGER, "http server listener port" },
+ { OPTION_HTTP_PORT, "8080", OPTION_STRING, "http server listener port" },
{ OPTION_HTTP_PATH, "web", OPTION_STRING, "path to web files" },
{ NULL }
};
diff --git a/src/emu/mame.c b/src/emu/mame.c
index b58aa4b05a8..e66d98dbbc4 100644
--- a/src/emu/mame.c
+++ b/src/emu/mame.c
@@ -148,6 +148,14 @@ int mame_execute(emu_options &options, osd_interface &osd)
bool exit_pending = false;
int error = MAMERR_NONE;
+ // We need to preprocess the config files once to determine the web server's configuration
+ if (options.read_config())
+ {
+ options.revert(OPTION_PRIORITY_INI);
+ astring errors;
+ options.parse_standard_inis(errors);
+ }
+
web_engine web(options);
while (error == MAMERR_NONE && !exit_pending)
diff --git a/src/emu/webengine.c b/src/emu/webengine.c
index 3fcb71970cb..2c3ac85eea7 100644
--- a/src/emu/webengine.c
+++ b/src/emu/webengine.c
@@ -44,6 +44,7 @@
#include "web/mongoose.h"
#include "web/json/json.h"
+
//**************************************************************************
// WEB ENGINE
//**************************************************************************
@@ -318,7 +319,6 @@ int web_engine::begin_request_handler(struct mg_connection *conn)
return 0;
}
-
void *web_engine::websocket_keepalive()
{
while(!m_exiting_core)