File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -306,11 +306,11 @@ const GodotDisplayScreen = {
306306 const scale = GodotDisplayScreen . getPixelRatio ( ) ;
307307 if ( isFullscreen || wantsFullWindow ) {
308308 // We need to match screen size.
309- width = window . innerWidth * scale ;
310- height = window . innerHeight * scale ;
309+ width = Math . floor ( window . innerWidth * scale ) ;
310+ height = Math . floor ( window . innerHeight * scale ) ;
311311 }
312- const csw = `${ width / scale } px` ;
313- const csh = `${ height / scale } px` ;
312+ const csw = `${ Math . floor ( width / scale ) } px` ;
313+ const csh = `${ Math . floor ( height / scale ) } px` ;
314314 if ( canvas . style . width !== csw || canvas . style . height !== csh || canvas . width !== width || canvas . height !== height ) {
315315 // Size doesn't match.
316316 // Resize canvas, set correct CSS pixel size, update GL.
You can’t perform that action at this time.
0 commit comments