From ee78a50252a07068b1335fe0cfcbbf0e45ba770e Mon Sep 17 00:00:00 2001 From: verybadsoldier Date: Sat, 24 Aug 2019 16:22:02 +0200 Subject: [PATCH] save also metadata that have default values. they might not had default values on start so they have to be saved --- es-app/src/Gamelist.cpp | 5 ----- es-app/src/MetaData.cpp | 11 ----------- es-app/src/MetaData.h | 2 -- 3 files changed, 18 deletions(-) diff --git a/es-app/src/Gamelist.cpp b/es-app/src/Gamelist.cpp index 14af11757..a6975de2f 100644 --- a/es-app/src/Gamelist.cpp +++ b/es-app/src/Gamelist.cpp @@ -217,11 +217,6 @@ void updateGamelist(SystemData* system) { const char* tag = ((*fit)->getType() == GAME) ? "game" : "folder"; - // check if current file has metadata, if no, skip it as it wont be in the gamelist anyway. - if ((*fit)->metadata.isDefault()) { - continue; - } - // do not touch if it wasn't changed anyway if (!(*fit)->metadata.wasChanged()) continue; diff --git a/es-app/src/MetaData.cpp b/es-app/src/MetaData.cpp index 8a977e950..0851fbdf4 100644 --- a/es-app/src/MetaData.cpp +++ b/es-app/src/MetaData.cpp @@ -140,17 +140,6 @@ float MetaDataList::getFloat(const std::string& key) const return (float)atof(get(key).c_str()); } -bool MetaDataList::isDefault() -{ - const std::vector& mdd = getMDD(); - - for (unsigned int i = 1; i < mMap.size(); i++) { - if (mMap.at(mdd[i].key) != mdd[i].defaultValue) return false; - } - - return true; -} - bool MetaDataList::wasChanged() const { return mWasChanged; diff --git a/es-app/src/MetaData.h b/es-app/src/MetaData.h index 6ed8f6d44..52e1eddc1 100644 --- a/es-app/src/MetaData.h +++ b/es-app/src/MetaData.h @@ -55,8 +55,6 @@ public: int getInt(const std::string& key) const; float getFloat(const std::string& key) const; - bool isDefault(); - bool wasChanged() const; void resetChangedFlag();