summaryrefslogtreecommitdiff
path: root/lib/VNWeb
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-12-03 10:59:44 +0100
committerYorhel <git@yorhel.nl>2020-12-03 10:59:45 +0100
commitaafa08d938e7b8ace089e8e4dd9e5667bd852e5f (patch)
treeeafdd70d841533e905f34d5652f708f0db84fa04 /lib/VNWeb
parentf73619197b890665d2d9f78f7cf38928e114f312 (diff)
Releases::Lib: Only use aspect ratio icons if the ratio actually matches
And use 'custom' for everything else. https://vndb.org/t2520.514
Diffstat (limited to 'lib/VNWeb')
-rw-r--r--lib/VNWeb/Releases/Lib.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/VNWeb/Releases/Lib.pm b/lib/VNWeb/Releases/Lib.pm
index 2694cfb9..207faba8 100644
--- a/lib/VNWeb/Releases/Lib.pm
+++ b/lib/VNWeb/Releases/Lib.pm
@@ -87,9 +87,10 @@ sub release_row_ {
icon_ 'doujin', 'Doujin' if !$r->{patch} && $r->{doujin};
icon_ 'commercial', 'Commercial' if !$r->{patch} && !$r->{doujin};
if($r->{reso_y}) {
- my $type = $r->{reso_y} == 1 ? 'custom' : $r->{reso_x} / $r->{reso_y} > 4/3 ? '16-9' : '4-3';
+ my $ratio = $r->{reso_x} / $r->{reso_y};
+ my $type = $ratio == 4/3 ? '4-3' : $ratio == 16/9 ? '16-9' : 'custom';
# Ugly workaround: PC-98 has non-square pixels, thus not widescreen
- $type = '4-3' if $type eq '16-9' && grep $_ eq 'p98', $r->{platforms}->@*;
+ $type = '4-3' if $ratio > 4/3 && grep $_ eq 'p98', $r->{platforms}->@*;
icon_ "resolution_$type", resolution $r;
}
icon_ $MEDIUM{ $r->{media}[0]{medium} }{icon}, join ', ', map fmtmedia($_->{medium}, $_->{qty}), $r->{media}->@* if $r->{media}->@*;