Fix display of game titles, oops

This commit is contained in:
Henrik Rydgård 2024-09-26 12:02:18 +02:00
parent 1b158940ac
commit 50baf6f8e3

View file

@ -344,7 +344,7 @@ void GameButton::Draw(UIContext &dc) {
dc.PushScissor(bounds_);
const std::string currentTitle = ginfo->GetTitle();
if (!currentTitle.empty()) {
title_ = ReplaceAll(title_, "\n", " ");
title_ = ReplaceAll(currentTitle, "\n", " ");
}
dc.MeasureText(dc.GetFontStyle(), 1.0f, 1.0f, title_, &tw, &th, 0);