mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Safer handling of NONE
This commit is contained in:
parent
3563d625b9
commit
a28ae79ef7
2 changed files with 6 additions and 0 deletions
|
@ -171,6 +171,8 @@ void OnScreenDisplay::ShowLeaderboardTracker(int leaderboardTrackerID, const cha
|
||||||
if (show) {
|
if (show) {
|
||||||
// Just an update.
|
// Just an update.
|
||||||
entry.text = trackerText ? trackerText : "";
|
entry.text = trackerText ? trackerText : "";
|
||||||
|
// Bump the end-time, in case it was fading out.
|
||||||
|
entry.endTime = now + forever_s;
|
||||||
} else {
|
} else {
|
||||||
// Keep the current text, hide and eventually delete it.
|
// Keep the current text, hide and eventually delete it.
|
||||||
entry.endTime = now + (double)FadeoutTime();
|
entry.endTime = now + (double)FadeoutTime();
|
||||||
|
|
|
@ -281,6 +281,10 @@ void OnScreenMessagesView::Draw(UIContext &dc) {
|
||||||
auto &measuredEntry = measuredEntries[i];
|
auto &measuredEntry = measuredEntries[i];
|
||||||
|
|
||||||
ScreenEdgePosition pos = typeEdges[(size_t)entry.type];
|
ScreenEdgePosition pos = typeEdges[(size_t)entry.type];
|
||||||
|
if (pos == ScreenEdgePosition::VALUE_COUNT) {
|
||||||
|
// NONE.
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
measuredEntry.align = 0;
|
measuredEntry.align = 0;
|
||||||
measuredEntry.align2 = 0;
|
measuredEntry.align2 = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue