From 84d226139145dbadfbeb81cfd16b6e8b4546220f Mon Sep 17 00:00:00 2001 From: Sergey Stepanov Date: Thu, 7 Mar 2024 17:25:26 +0300 Subject: [PATCH] Don't stretch portrait games --- web/js/stream/stream.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/js/stream/stream.js b/web/js/stream/stream.js index d8c901bad..c5dcf4782 100644 --- a/web/js/stream/stream.js +++ b/web/js/stream/stream.js @@ -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)