8000 Twice as much memory was allocated when initializing stage.Grid (and … · python-ugame/circuitpython-stage@64aaa13 · GitHub
[go: up one dir, main page]

Skip to content

Commit 64aaa13

Browse files
t-ikegamideshipu
authored andcommitted
Twice as much memory was allocated when initializing stage.Grid (and stage.WallGrid).
1 parent 40d8a03 commit 64aaa13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def __init__(self, bank, width=8, height=8, palette=None, buffer=None):
420420
self.height = height
421421
self.bank = bank
422422
self.palette = palette or bank.palette
423-
self.buffer = buffer or bytearray(self.stride * height)
423+
self.buffer = buffer or bytearray((self.stride * height)>>1)
424424
self.layer = _stage.Layer(self.stride, self.height, self.bank.buffer,
425425
self.palette, self.buffer)
426426

0 commit comments

Comments
 (0)
0