diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index c04c25b5b..0bb12be93 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -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") diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 9ae3b024b..fb0b8fa3a 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -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") diff --git a/es-core/src/components/TextComponent.h b/es-core/src/components/TextComponent.h index 3642b0030..17e5118fa 100644 --- a/es-core/src/components/TextComponent.h +++ b/es-core/src/components/TextComponent.h @@ -104,12 +104,10 @@ private: "gamecountFavoritesNoText"}; static inline std::vector 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;