Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update the pixel_shader usage of OnDiskBitmap
  • Loading branch information
lesamouraipourpre committed Jul 11, 2021
commit 87244710f60dd188fce02d78110eaa4b018d4d4a
9 changes: 8 additions & 1 deletion adafruit_pyoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,14 @@ def set_background(self, filename, *, with_fade=True):
self._background_file = open(self._gamedirectory + "/" + filename, "rb")
background = displayio.OnDiskBitmap(self._background_file)
self._background_sprite = displayio.TileGrid(
background, pixel_shader=displayio.ColorConverter(), x=0, y=0
background,
pixel_shader=getattr(
background, "pixel_shader", displayio.ColorConverter()
),
# TODO: Once CP6 is no longer supported, replace the above line with below
# pixel_shader=background.pixel_shader,
x=0,
y=0,
)
self._background_group.append(self._background_sprite)
if with_fade:
Expand Down