diff --git a/es-app/src/views/GamelistView.cpp b/es-app/src/views/GamelistView.cpp index cc4919ab1..fe7d22ae7 100644 --- a/es-app/src/views/GamelistView.cpp +++ b/es-app/src/views/GamelistView.cpp @@ -914,6 +914,12 @@ void GamelistView::updateView(const CursorState& state) ->getSystemEnvData() ->mLaunchCommands.front() .second)); + else if (metadata == "physicalName") + return file->getType() == PLACEHOLDER ? + "" : + Utils::FileSystem::getStem(file->getFileName()); + else if (metadata == "physicalNameExtension") + return file->getType() == PLACEHOLDER ? "" : file->getFileName(); 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 b7066687f..dee557371 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -1277,6 +1277,11 @@ void SystemView::updateGameSelectors() ->getSystemEnvData() ->mLaunchCommands.front() .second)); + else if (metadata == "physicalName") + text->setValue( + Utils::FileSystem::getStem(games.at(gameSelectorEntry)->getFileName())); + else if (metadata == "physicalNameExtension") + text->setValue(games.at(gameSelectorEntry)->getFileName()); 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 78a81dfb3..7e180746b 100644 --- a/es-core/src/components/TextComponent.h +++ b/es-core/src/components/TextComponent.h @@ -126,11 +126,28 @@ private: "gamecountFavorites", "gamecountFavoritesNoText"}; - static inline std::vector supportedMetadataTypes { - "name", "description", "rating", "developer", "publisher", - "genre", "players", "favorite", "completed", "kidgame", - "broken", "playcount", "controller", "altemulator", "emulator", - "manual", "systemName", "systemFullname", "sourceSystemName", "sourceSystemFullname"}; + static inline std::vector supportedMetadataTypes {"name", + "description", + "rating", + "developer", + "publisher", + "genre", + "players", + "favorite", + "completed", + "kidgame", + "broken", + "playcount", + "controller", + "altemulator", + "emulator", + "manual", + "physicalName", + "physicalNameExtension", + "systemName", + "systemFullname", + "sourceSystemName", + "sourceSystemFullname"}; Renderer* mRenderer; std::string mDefaultValue;