warning when compiled without profiling when attempting to enable
This commit is contained in:
62
shell.html
62
shell.html
@@ -1,62 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title>Emscripten-Generated Code</title>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
#canvas-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
canvas {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type='text/javascript'>
|
||||
window.onload = function () { window.focus(); }
|
||||
window.onclick = function () { window.focus(); }
|
||||
</script>
|
||||
|
||||
<div id="canvas-container">
|
||||
<canvas class="game" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var Module = {
|
||||
preRun: [],
|
||||
postRun: [],
|
||||
print: (function() {
|
||||
return function(text) {
|
||||
text = Array.prototype.slice.call(arguments).join(' ');
|
||||
console.log(text);
|
||||
};
|
||||
})(),
|
||||
printErr: function(text) {
|
||||
text = Array.prototype.slice.call(arguments).join(' ');
|
||||
console.error(text);
|
||||
},
|
||||
canvas: (function() {
|
||||
var canvas = document.getElementById('canvas');
|
||||
canvas.addEventListener("webglcontextlost", function(e) { alert('FIXME: WebGL context lost, please reload the page'); e.preventDefault(); }, false);
|
||||
return canvas;
|
||||
})(),
|
||||
setStatus: function(text) { },
|
||||
monitorRunDependencies: function(left) { },
|
||||
};
|
||||
window.onerror = function(event) {
|
||||
console.log("onerror: " + event.message);
|
||||
};
|
||||
</script>
|
||||
{{{ SCRIPT }}}
|
||||
</body>
|
||||
</html>
|
||||
@@ -933,6 +933,9 @@ int main(int argc, char **argv)
|
||||
/* Check for --profile flag */
|
||||
if (argc > 1 && strcmp(argv[1], "--profile") == 0) {
|
||||
profile_enabled = 1; script_start = 2;
|
||||
#ifndef TRACY_ENABLE
|
||||
printf("Warning: --profile flag was specified but Tracy profiling is not compiled in\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!SDL_Init(SDL_INIT_EVENTS | SDL_INIT_GAMEPAD)) {
|
||||
|
||||
Reference in New Issue
Block a user