warning when compiled without profiling when attempting to enable

This commit is contained in:
2025-07-18 06:31:11 -05:00
parent 7bfd244bf2
commit f49d4180ed
2 changed files with 3 additions and 62 deletions

View File

@@ -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>

View File

@@ -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)) {