Better error if we run out of VRam

This commit is contained in:
Gwilym Inzani 2023-08-29 15:34:07 +01:00
parent c25cd74f43
commit 9db4230aee

View file

@ -302,7 +302,7 @@ impl VRamManager {
let new_reference: NonNull<u32> = let new_reference: NonNull<u32> =
unsafe { TILE_ALLOCATOR.alloc(layout_of(tile_set.format)) } unsafe { TILE_ALLOCATOR.alloc(layout_of(tile_set.format)) }
.unwrap() .expect("Ran out of video RAM for tiles")
.cast(); .cast();
let tile_reference = TileReference(new_reference); let tile_reference = TileReference(new_reference);
reference.or_insert(tile_reference); reference.or_insert(tile_reference);