mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Support hidpi.
This commit is contained in:
@@ -91,7 +91,9 @@
|
||||
var canvasElement = document.getElementById('canvas');
|
||||
|
||||
function resizeHandler() {
|
||||
Module.ccall('nativeResize', 'number', ['number', 'number'], [window.innerWidth, window.innerHeight]);
|
||||
Module.ccall('nativeResize', 'number', ['number', 'number'], [window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio]);
|
||||
Module.canvas.style.width = window.innerWidth + 'px';
|
||||
Module.canvas.style.height = window.innerHeight + 'px';
|
||||
}
|
||||
|
||||
var Module = {
|
||||
|
||||
Reference in New Issue
Block a user