mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +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');
|
var preloadElement = document.getElementById('preload');
|
||||||
|
|
||||||
function resizeHandler() {
|
function resizeHandler() {
|
||||||
Module.ccall('nativeResize', 'number', ['number', 'number'], [window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio]);
|
let w = Math.floor(Math.floor(window.innerWidth * window.devicePixelRatio) / window.devicePixelRatio);
|
||||||
Module.canvas.style.width = window.innerWidth + 'px';
|
let h = Math.floor(Math.floor(window.innerHeight * window.devicePixelRatio) / window.devicePixelRatio);
|
||||||
Module.canvas.style.height = window.innerHeight + 'px';
|
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 = {
|
var Module = {
|
||||||
|
Loading…
Reference in New Issue
Block a user