mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
web: Fix rendering issues on WebKit-based phones in portrait mode, added pause/unpause toggle. [Firehawke]
This commit is contained in:
parent
894c6f0b55
commit
3abb78edd2
@ -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,
|
||||
|
@ -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>
|
||||
|
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user