Merge pull request #6114 from RobLoach/patch-27

emscripten: Remove output textarea
This commit is contained in:
Twinaphex 2018-01-15 17:02:50 +01:00 committed by GitHub
commit d8a5958e21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,9 +34,6 @@
<input type="textbox" id="latency" size="3" maxlength="3" value="96"> <label for="latency" id="latency-label">Audio latency (ms) (increase if you hear pops at fullspeed, can only be done before loading game)</label> <input type="textbox" id="latency" size="3" maxlength="3" value="96"> <label for="latency" id="latency-label">Audio latency (ms) (increase if you hear pops at fullspeed, can only be done before loading game)</label>
</div> </div>
<hr/>
<textarea class="emscripten" id="output" rows="8"></textarea>
<hr>
<div class="emscripten" id="controls"> <div class="emscripten" id="controls">
Controls:<br> Controls:<br>
<br> <br>
@ -111,22 +108,17 @@
postRun: [], postRun: [],
print: (function() print: (function()
{ {
var element = document.getElementById('output');
element.value = ''; // clear browser cache
return function(text) return function(text)
{ {
text = Array.prototype.slice.call(arguments).join(' '); text = Array.prototype.slice.call(arguments).join(' ');
element.value += text + "\n"; console.log(text);
element.scrollTop = 99999; // focus on bottom
}; };
})(), })(),
printErr: function(text) printErr: function(text)
{ {
var text = Array.prototype.slice.call(arguments).join(' '); var errArgs = Array.prototype.slice.call(arguments).join(' ');
var element = document.getElementById('output'); console.error(errArgs);
element.value += text + "\n";
element.scrollTop = 99999; // focus on bottom
}, },
canvas: document.getElementById('canvas'), canvas: document.getElementById('canvas'),