Skip to content

Commit

Permalink
Don't stretch portrait games
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Mar 7, 2024
1 parent 608da9f commit 84d2261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/js/stream/stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 84d2261

Please sign in to comment.