(ems) itch.io, readd log window

This commit is contained in:
radius 2016-09-15 23:19:23 -05:00
parent 90a13632ac
commit 247de41ce1
2 changed files with 37 additions and 2 deletions

View File

@ -4,6 +4,7 @@
<meta charset="utf-8">
<title>RetroArch Web Player</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<base target="_parent" />
<!-- Bootstrap core CSS -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.3/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- Font Awesome -->
@ -113,6 +114,18 @@
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-12 form-group btn-group text-xs-center p-t-2">
<div class="card">
<div class="view overlay hm-white-slight" align="center">
<textarea id="output" rows="15"></textarea>
</div>
</div>
</div>
</div>
</div>
<script src="//code.jquery.com/jquery-3.1.0.min.js"></script>
<script src="//rawgit.com/jeresig/jquery.hotkeys/master/jquery.hotkeys.js"></script>

View File

@ -5,7 +5,6 @@
*/
var dropbox = false;
var client = new Dropbox.Client({ key: "il6e10mfd7pgf8r" });
var XFS;
var BrowserFS = browserfs;
var showError = function(error) {
@ -46,6 +45,11 @@ var showError = function(error) {
}
};
function reload()
{
window.top.location.reload();
}
function dropboxInit()
{
document.getElementById('btnRun').disabled = true;
@ -240,7 +244,25 @@ var Module =
arguments: ["-v", "--menu"],
preRun: [],
postRun: [],
print: (function()
{
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text)
{
text = Array.prototype.slice.call(arguments).join(' ');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
};
})(),
printErr: function(text)
{
var text = Array.prototype.slice.call(arguments).join(' ');
var element = document.getElementById('output');
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
},
canvas: document.getElementById('canvas'),
totalDependencies: 0,
monitorRunDependencies: function(left)