mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
Do not crash on resize when application has not started yet.
This commit is contained in:
parent
dc6c3962d3
commit
9bc8580f99
@ -92,7 +92,9 @@
|
||||
function resizeHandler() {
|
||||
let w = Math.floor(Math.floor(window.innerWidth * window.devicePixelRatio) / window.devicePixelRatio);
|
||||
let h = Math.floor(Math.floor(window.innerHeight * window.devicePixelRatio) / window.devicePixelRatio);
|
||||
if(preloadElement.hidden === true) {
|
||||
Module.ccall('nativeResize', 'number', ['number', 'number'], [w * window.devicePixelRatio, h * window.devicePixelRatio]);
|
||||
}
|
||||
Module.canvas.style.width = w + 'px';
|
||||
Module.canvas.style.height = h + 'px';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user