mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-25 23:55:38 +00:00
Added an emulator metadata property value for the text element.
This commit is contained in:
parent
16099aef58
commit
ace7dde017
|
@ -894,6 +894,15 @@ void GamelistView::updateView(const CursorState& state)
|
|||
return file->metadata.get("playcount");
|
||||
else if (metadata == "altemulator")
|
||||
return file->metadata.get("altemulator");
|
||||
else if (metadata == "emulator")
|
||||
return (file->metadata.get("altemulator") != "" ?
|
||||
file->metadata.get("altemulator") :
|
||||
(file->getSystem()->getAlternativeEmulator() != "" ?
|
||||
file->getSystem()->getAlternativeEmulator() :
|
||||
file->getSystem()
|
||||
->getSystemEnvData()
|
||||
->mLaunchCommands.front()
|
||||
.second));
|
||||
else if (metadata == "systemName")
|
||||
return file->getSystem()->getName();
|
||||
else if (metadata == "systemFullname")
|
||||
|
|
|
@ -1296,6 +1296,17 @@ void SystemView::updateGameSelectors()
|
|||
text->setValue(games.at(gameSelectorEntry)->metadata.get("playcount"));
|
||||
else if (metadata == "altemulator")
|
||||
text->setValue(games.at(gameSelectorEntry)->metadata.get("altemulator"));
|
||||
else if (metadata == "emulator")
|
||||
text->setValue(
|
||||
games.at(gameSelectorEntry)->metadata.get("altemulator") != "" ?
|
||||
games.at(gameSelectorEntry)->metadata.get("altemulator") :
|
||||
(games.at(gameSelectorEntry)->getSystem()->getAlternativeEmulator() != "" ?
|
||||
games.at(gameSelectorEntry)->getSystem()->getAlternativeEmulator() :
|
||||
games.at(gameSelectorEntry)
|
||||
->getSystem()
|
||||
->getSystemEnvData()
|
||||
->mLaunchCommands.front()
|
||||
.second));
|
||||
else if (metadata == "systemName")
|
||||
text->setValue(games.at(gameSelectorEntry)->getSystem()->getName());
|
||||
else if (metadata == "systemFullname")
|
||||
|
|
|
@ -104,12 +104,10 @@ private:
|
|||
"gamecountFavoritesNoText"};
|
||||
|
||||
static inline std::vector<std::string> supportedMetadataTypes {
|
||||
"name", "description", "rating",
|
||||
"developer", "publisher", "genre",
|
||||
"players", "favorite", "completed",
|
||||
"kidgame", "broken", "playcount",
|
||||
"controller", "altemulator", "systemName",
|
||||
"systemFullname", "sourceSystemName", "sourceSystemFullname"};
|
||||
"name", "description", "rating", "developer", "publisher",
|
||||
"genre", "players", "favorite", "completed", "kidgame",
|
||||
"broken", "playcount", "controller", "altemulator", "emulator",
|
||||
"systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"};
|
||||
|
||||
Renderer* mRenderer;
|
||||
std::string mDefaultValue;
|
||||
|
|
Loading…
Reference in a new issue