1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Fix for crash in game preview.

This commit is contained in:
Joe R 2021-06-26 08:50:51 -04:00
parent 0d774623e2
commit 2aec2ea9b1

View file

@ -475,8 +475,8 @@ class Images:
class SubsampledImages(Images):
def __init__(self, images, r=2):
size_cap = 100
if images.CARDW / r > size_cap or images.CARDH / r > size_cap:
r = max(images.CARDW, images.CARDH) / size_cap
if images.CARDW // r > size_cap or images.CARDH // r > size_cap:
r = max(images.CARDW, images.CARDH) // size_cap
Images.__init__(self, None, images.cs, r=r)
self._card = self._subsample(images._card, r)