Skip to content

Commit

Permalink
Now is correctly reversing the shutdown modules
Browse files Browse the repository at this point in the history
  • Loading branch information
cerealpxl committed Feb 9, 2024
1 parent be898fa commit 0310ad1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Framework/App.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public static void Run(string applicationName, int width, int height, bool fulls
Tick();

// shutdown
for (int i = 0; i < modules.Count; i ++)
for (int i = modules.Count - 1; i >= 0; i --)
modules[i].Shutdown();
modules.Clear();

Expand Down Expand Up @@ -435,7 +435,7 @@ static void Update(TimeSpan delta)
Update(deltaTime);
}

for (int i = modules.Count - 1; i >= 0; i --)
for (int i = 0; i < modules.Count; i ++)
modules[i].Render();

Platform.FosterEndFrame();
Expand Down

0 comments on commit 0310ad1

Please sign in to comment.