mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 08:11:33 +11:00
Better error if we run out of VRam
This commit is contained in:
parent
c25cd74f43
commit
9db4230aee
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue