mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-12-01 10:35:38 +00:00
Made the the text element emulator metadata property work with collections.
This commit is contained in:
parent
ace7dde017
commit
6c3f5e70bd
|
@ -12,16 +12,14 @@
|
||||||
#define ES_APP_FILE_DATA_H
|
#define ES_APP_FILE_DATA_H
|
||||||
|
|
||||||
#include "MetaData.h"
|
#include "MetaData.h"
|
||||||
|
#include "SystemData.h"
|
||||||
|
#include "Window.h"
|
||||||
#include "utils/FileSystemUtil.h"
|
#include "utils/FileSystemUtil.h"
|
||||||
#include "utils/StringUtil.h"
|
#include "utils/StringUtil.h"
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
class SystemData;
|
|
||||||
class Window;
|
|
||||||
struct SystemEnvironmentData;
|
|
||||||
|
|
||||||
enum FileType {
|
enum FileType {
|
||||||
GAME = 1, // Cannot have children.
|
GAME = 1, // Cannot have children.
|
||||||
FOLDER = 2,
|
FOLDER = 2,
|
||||||
|
@ -69,6 +67,10 @@ public:
|
||||||
const std::vector<FileData*>& getChildren() const { return mChildren; }
|
const std::vector<FileData*>& getChildren() const { return mChildren; }
|
||||||
const std::vector<FileData*>& getFilteredChildren() const { return mFilteredChildren; }
|
const std::vector<FileData*>& getFilteredChildren() const { return mFilteredChildren; }
|
||||||
SystemData* getSystem() const { return mSystem; }
|
SystemData* getSystem() const { return mSystem; }
|
||||||
|
SystemData* getSourceSystem()
|
||||||
|
{
|
||||||
|
return (mSourceFileData != nullptr ? mSourceFileData->mSystem : mSystem);
|
||||||
|
}
|
||||||
SystemEnvironmentData* getSystemEnvData() const { return mEnvData; }
|
SystemEnvironmentData* getSystemEnvData() const { return mEnvData; }
|
||||||
|
|
||||||
// These functions are used by GameSelectorComponent.
|
// These functions are used by GameSelectorComponent.
|
||||||
|
|
|
@ -895,11 +895,13 @@ void GamelistView::updateView(const CursorState& state)
|
||||||
else if (metadata == "altemulator")
|
else if (metadata == "altemulator")
|
||||||
return file->metadata.get("altemulator");
|
return file->metadata.get("altemulator");
|
||||||
else if (metadata == "emulator")
|
else if (metadata == "emulator")
|
||||||
return (file->metadata.get("altemulator") != "" ?
|
return (file->getType() == FOLDER) ?
|
||||||
|
"" :
|
||||||
|
(file->metadata.get("altemulator") != "" ?
|
||||||
file->metadata.get("altemulator") :
|
file->metadata.get("altemulator") :
|
||||||
(file->getSystem()->getAlternativeEmulator() != "" ?
|
(file->getSourceSystem()->getAlternativeEmulator() != "" ?
|
||||||
file->getSystem()->getAlternativeEmulator() :
|
file->getSourceSystem()->getAlternativeEmulator() :
|
||||||
file->getSystem()
|
file->getSourceSystem()
|
||||||
->getSystemEnvData()
|
->getSystemEnvData()
|
||||||
->mLaunchCommands.front()
|
->mLaunchCommands.front()
|
||||||
.second));
|
.second));
|
||||||
|
|
|
@ -1300,10 +1300,13 @@ void SystemView::updateGameSelectors()
|
||||||
text->setValue(
|
text->setValue(
|
||||||
games.at(gameSelectorEntry)->metadata.get("altemulator") != "" ?
|
games.at(gameSelectorEntry)->metadata.get("altemulator") != "" ?
|
||||||
games.at(gameSelectorEntry)->metadata.get("altemulator") :
|
games.at(gameSelectorEntry)->metadata.get("altemulator") :
|
||||||
(games.at(gameSelectorEntry)->getSystem()->getAlternativeEmulator() != "" ?
|
(games.at(gameSelectorEntry)->getSourceSystem()->getAlternativeEmulator() !=
|
||||||
games.at(gameSelectorEntry)->getSystem()->getAlternativeEmulator() :
|
"" ?
|
||||||
games.at(gameSelectorEntry)
|
games.at(gameSelectorEntry)
|
||||||
->getSystem()
|
->getSourceSystem()
|
||||||
|
->getAlternativeEmulator() :
|
||||||
|
games.at(gameSelectorEntry)
|
||||||
|
->getSourceSystem()
|
||||||
->getSystemEnvData()
|
->getSystemEnvData()
|
||||||
->mLaunchCommands.front()
|
->mLaunchCommands.front()
|
||||||
.second));
|
.second));
|
||||||
|
|
Loading…
Reference in a new issue