From eea5245d783aa045306681d9cc95b078f9d01ab4 Mon Sep 17 00:00:00 2001 From: Alex Janka Date: Thu, 23 Feb 2023 19:15:18 +1100 Subject: [PATCH] =?UTF-8?q?object=20priority=20=F0=9F=98=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/processor/memory/mmio/gpu.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/processor/memory/mmio/gpu.rs b/src/processor/memory/mmio/gpu.rs index a4e656a..52033e7 100644 --- a/src/processor/memory/mmio/gpu.rs +++ b/src/processor/memory/mmio/gpu.rs @@ -266,6 +266,9 @@ impl Gpu { }, oam_location: (i - 0xFE00) as u8, }); + if objs.len() >= 10 { + break; + } } } objs.sort_by_key(|o| { @@ -275,7 +278,6 @@ impl Gpu { v }); objs.reverse(); - objs.truncate(11); objs }