web: Fix rendering issues on WebKit-based phones in portrait mode, added pause/unpause toggle. [Firehawke]

This commit is contained in:
R. Belmont 2013-09-20 03:20:28 +00:00
parent 894c6f0b55
commit 3abb78edd2
3 changed files with 10 additions and 2 deletions

View File

@ -182,6 +182,13 @@ int web_engine::begin_request_handler(struct mg_connection *conn)
{
m_machine->schedule_exit();
}
else if(!strcmp(cmd_name,"togglepause"))
{
if (m_machine->paused())
m_machine->resume();
else
m_machine->pause();
}
// Send HTTP reply to the client
mg_printf(conn,

View File

@ -1,3 +1,4 @@
<a href="javascript:executeCommands('togglepause');" data-role="button">Toggle Pause</a>
<a href="javascript:executeCommands('softreset');" data-role="button">Soft reset</a>
<a href="javascript:executeCommands('hardreset');" data-role="button">Hard reset</a>
<a href="javascript:executeCommands('exit');" data-role="button">Exit</a>

View File

@ -123,8 +123,8 @@
<!-- Home -->
<div data-role="page" id="page1">
<div data-theme="a" data-role="header">
<div style="width: 320px; height: 120px; position: relative;">
<img src="images/logo-mame-small.png" alt="image" style="position: absolute; top: 50%; left: 50%; margin-left: 0px; margin-top: -50px">
<div style="width: 100%; height: 120px; position: relative;">
<img src="images/logo-mame-small.png" alt="image" style="position: absolute; top: 50%; left: 50%; margin-left: -158px; margin-top: -50px">
</div>
<a data-role="button" href="#page1" data-icon="home" data-iconpos="left" class="ui-btn-right">Home </a>
<div data-role="navbar" data-iconpos="top">