GUI: Use heuristic for displaying demo names in grid launcher

This commit is contained in:
Eugene Sandulenko 2022-06-08 23:08:05 +02:00
parent caca0bd877
commit 0ee20d377d
No known key found for this signature in database
GPG key ID: 014D387312D34F08

View file

@ -1505,9 +1505,14 @@ void LauncherGrid::updateListing() {
// Strip platform language from the title.
Common::String key = buildQualifiedGameName(engineid, gameid);
if (_launcherChooser->getGameList()->contains(key))
if (_launcherChooser->getGameList()->contains(key)) {
title = _launcherChooser->getGameList()->getVal(key);
// This is not reliable
if (gameid.contains("-demo"))
title += " (Demo)";
}
if (description.empty())
description = Common::String::format("Unknown (target %s, gameid %s)", iter->_key.c_str(), gameid.c_str());