chore: dont allocate not-small ?Sprite array on stack
use memset like most other allocations in this emu
This commit is contained in:
parent
628b7688cc
commit
5c7cd72bbb
|
@ -269,7 +269,7 @@ pub const Ppu = struct {
|
||||||
sched.push(.Draw, 240 * 4);
|
sched.push(.Draw, 240 * 4);
|
||||||
|
|
||||||
const sprites = try allocator.create([128]?Sprite);
|
const sprites = try allocator.create([128]?Sprite);
|
||||||
sprites.* = [_]?Sprite{null} ** 128;
|
std.mem.set(?Sprite, sprites, null);
|
||||||
|
|
||||||
return Self{
|
return Self{
|
||||||
.vram = try Vram.init(allocator),
|
.vram = try Vram.init(allocator),
|
||||||
|
|
Loading…
Reference in New Issue