mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Fix blur caused by fractional DPI scaling.
This commit is contained in:
parent
9503280f33
commit
4892c32b40
@ -90,9 +90,11 @@
|
||||
var preloadElement = document.getElementById('preload');
|
||||
|
||||
function resizeHandler() {
|
||||
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';
|
||||
let w = Math.floor(Math.floor(window.innerWidth * window.devicePixelRatio) / window.devicePixelRatio);
|
||||
let h = Math.floor(Math.floor(window.innerHeight * window.devicePixelRatio) / window.devicePixelRatio);
|
||||
Module.ccall('nativeResize', 'number', ['number', 'number'], [w * window.devicePixelRatio, h * window.devicePixelRatio]);
|
||||
Module.canvas.style.width = w + 'px';
|
||||
Module.canvas.style.height = h + 'px';
|
||||
}
|
||||
|
||||
var Module = {
|
||||
|
Loading…
Reference in New Issue
Block a user