From f091bbf0fd346bb35afd4ebb9ef0a382b15bd3be Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 23 Aug 2023 15:06:14 +0900 Subject: [PATCH] Reverse order of draw in ScreenStack Draws should be in order from bottom to top. --- src/screen.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/screen.cc b/src/screen.cc index df17293..1a8dd78 100644 --- a/src/screen.cc +++ b/src/screen.cc @@ -62,8 +62,7 @@ void ScreenStack::update(float dt) { } void ScreenStack::draw() { - auto idx = stack.size(); - while (idx > 0 && stack.at(--idx)->draw()) { + for (auto idx = 0; idx < size.size() && stack.at(idx)->draw(); ++idx) { } }