Don't stretch portrait games

This commit is contained in:
Sergey Stepanov 2024-03-07 17:25:26 +03:00
parent 608da9f64b
commit 84d2261391
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B

View file

@ -180,9 +180,9 @@ const stream = (() => {
state.aspect = a
const a2 = ww / hh
const a2 = (ww / hh).toFixed(6)
state.screen.style['object-fit'] = a.toFixed(6) !== a2.toFixed(6) ? 'fill' : fit
state.screen.style['object-fit'] = a > 1 && a.toFixed(6) !== a2 ? 'fill' : fit
state.h = hh
state.w = Math.floor(hh * a)
state.screen.setAttribute('width', '' + ww)