HarbourMasters / 2ship2harkinian

Creative Commons Zero v1.0 Universal
904 stars 74 forks source link

Fix crash when toggling alt assets while paused #839

Closed Archez closed 1 week ago

Archez commented 2 weeks ago

This fixes a crash identified by #838 when toggling alt assets while the pause menu is up.

A proper fix will most likely need to happen in LUS pertaining to the texture cache clearing and framebuffer draw rectangle not setting up the rendering state again.

This intermediate fix checks when alt assets get toggled, and when it does, force a new pause menu background to be captured. By doing this we render the game world for one frame, which will leave the render state in a "good" state for the framebuffer draw to rely on. This has the added benefit of having the pause menu background "update" for any new textures applied by alt toggling.

Closes #838

Build Artifacts