mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Don't stretch portrait games
This commit is contained in:
parent
608da9f64b
commit
84d2261391
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue