Skip to content

Commit af3672e

Browse files
committed
Revert "ES-DE: writing favorites to a proper file"
This reverts commit e12f002.
1 parent 51e6976 commit af3672e

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

es-app/src/CollectionSystemsManager.cpp

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -718,9 +718,6 @@ const bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
718718
bool adding {true};
719719
std::string name {file->getName()};
720720
std::string sysName {mEditingCollection};
721-
#if defined(RETRODECK)
722-
std::string gameEntry = name + "^" + file->getFullPath();
723-
#endif
724721
if (mIsEditingCustom) {
725722
SystemData* sysData {mEditingCollectionSystemData->system};
726723

@@ -777,48 +774,10 @@ const bool CollectionSystemsManager::toggleGameInCollection(FileData* file)
777774
std::string value {md->get("favorite")};
778775
if (value == "false") {
779776
md->set("favorite", "true");
780-
#if defined(RETRODECK)
781-
std::ofstream outFile("/tmp/retrodeck/favorites/to_add", std::ios::app);
782-
if (outFile.is_open()) {
783-
outFile << gameEntry << std::endl;
784-
outFile.close();
785-
}
786-
std::ifstream inFile("/tmp/retrodeck/favorites/to_remove");
787-
std::ofstream tempFile("/tmp/retrodeck/favorites/temp");
788-
std::string line;
789-
while (std::getline(inFile, line)) {
790-
if (line != gameEntry) {
791-
tempFile << line << std::endl;
792-
}
793-
}
794-
inFile.close();
795-
tempFile.close();
796-
std::remove("/tmp/retrodeck/favorites/to_remove");
797-
std::rename("/tmp/retrodeck/favorites/temp", "/tmp/retrodeck/favorites/to_remove");
798-
#endif
799777
}
800778
else {
801779
adding = false;
802780
md->set("favorite", "false");
803-
#if defined(RETRODECK)
804-
std::ofstream outFile("/tmp/retrodeck/favorites/to_remove", std::ios::app);
805-
if (outFile.is_open()) {
806-
outFile << gameEntry << std::endl;
807-
outFile.close();
808-
}
809-
std::ifstream inFile("/tmp/retrodeck/favorites/to_add");
810-
std::ofstream tempFile("/tmp/retrodeck/favorites/temp");
811-
std::string line;
812-
while (std::getline(inFile, line)) {
813-
if (line != gameEntry) {
814-
tempFile << line << std::endl;
815-
}
816-
}
817-
inFile.close();
818-
tempFile.close();
819-
std::remove("/tmp/retrodeck/favorites/to_add");
820-
std::rename("/tmp/retrodeck/favorites/temp", "/tmp/retrodeck/favorites/to_add");
821-
#endif
822781
}
823782

824783
file->getSourceFileData()->getSystem()->getIndex()->addToIndex(

0 commit comments

Comments
 (0)