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:
parent
0d774623e2
commit
2aec2ea9b1
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue