Closed Ala-lala closed 5 years ago
I'm gonna hold off on this PR for a second because this doesn't happen in UQM 0.7.0, let me see what I can gleam from its code to find out if I screwed up or if it's an inherent bug in the latest git snapshot of UQM in general.
I managed to fix this one myself after looking at it real hard.
It was definitely something I introduced in 0.8.0.83, drawing the Modes and Seed in the title bars thinking that DrawSISMessage(NULL) was a catch-all for redrawing the title bar at any time.
I've commit my changes (d3dd52e) so please tell me if it passes scrutiny.
Yep, that looks good (though it'd be better to have an enum
or at least constants for the values of OutfitOrShipyard
). I only used the callback approach because I saw that the original UQM used that approach in a similar situation (drawing the flagship name in the outfitter when it was changed from the settings menu).
The code to redraw your current location in the top bar after exiting the save or load screen drew "Sol" - "Earth" when at the starbase, when it should draw either "Outfit Starship" - "Starbase" or "Shipyard" - "Starbase". This was causing a crash when exiting the save or load screen at the starbase after being transported from Procyon, since
CurStarDescPtr
isNULL
at that time.(I'm not entirely happy with the way I implemented this, but I couldn't think of any better way to do it, and the UQM code already does something similar with
SetNamingCallback
)Here's a save that you can test it with (at Procyon with all required devices).