diff --git a/Package/Environment/Common/settings.conf b/Package/Environment/Common/settings.conf index 97158ac..1ca11ac 100644 --- a/Package/Environment/Common/settings.conf +++ b/Package/Environment/Common/settings.conf @@ -41,14 +41,13 @@ exitOnFirstPageBack = yes # enter 0 attract mode, otherwise enter the number of seconds to wait before enabling attract mode attractModeTime = 45 -####################################### -# Debugging -####################################### -# do not set to "yes" unless you want your hard drive to quickly fill up -debug.logfps = no - ####################################### # Base folders of media and ROM files ####################################### -baseMediaPath=../Media -baseItemPath=../ROMs +# Override if you choose to have your media stored outside of RetroFE. +# If this is commented out your artwork will be searched in collections// +# baseMediaPath=d:/media + +# Override if you choose to have your ROMs stored outside of RetroFE. +# If this is commented out your roms will be searched in collections//roms +# baseItemPath=d:/roms diff --git a/RetroFE/Source/Database/Configuration.cpp b/RetroFE/Source/Database/Configuration.cpp index 382f478..75dd400 100644 --- a/RetroFE/Source/Database/Configuration.cpp +++ b/RetroFE/Source/Database/Configuration.cpp @@ -198,8 +198,8 @@ bool Configuration::GetProperty(std::string key, std::string &value) { bool retVal = GetRawProperty(key, value); - std::string baseMediaPath; - std::string baseItemPath; + std::string baseMediaPath = GetAbsolutePath(); + std::string baseItemPath = GetAbsolutePath(); std::string collectionName; GetRawProperty("baseMediaPath", baseMediaPath); @@ -349,24 +349,31 @@ void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std { std::string key = "media." + collectionName + "." + mediaType; + // use user-overridden setting if it exists if(GetPropertyAbsolutePath(key, value)) { return; } + // use user-overridden base media path if it was specified std::string baseMediaPath; if(!GetPropertyAbsolutePath("baseMediaPath", baseMediaPath)) { - baseMediaPath = "collections"; + // base media path was not specified, assume media files are in the collection + baseMediaPath = GetAbsolutePath() + "/collections"; } if(mediaType == "manufacturer") { value = baseMediaPath + "/_manufacturer"; } + else if(system) + { + value = baseMediaPath + "/" + collectionName + "/system_artwork"; + } else { - value = baseMediaPath + "/" + collectionName + "/" + mediaType + "/system"); + value = baseMediaPath + "/" + collectionName + "/medium_artwork/" + mediaType; } } @@ -380,12 +387,14 @@ void Configuration::GetCollectionAbsolutePath(std::string collectionName, std::s } std::string baseItemPath; - if(!GetPropertyAbsolutePath("baseItemPath", baseItemPath)) + if(GetPropertyAbsolutePath("baseItemPath", baseItemPath)) { - baseItemPath = "Assets"; + value = baseItemPath + "/" + collectionName; + return; } - value = baseItemPath + "/" + collectionName; + value = GetAbsolutePath() + "/collections/" + collectionName + "/roms"; + } diff --git a/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp b/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp index 0e68cf8..e423cc2 100644 --- a/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp +++ b/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp @@ -208,7 +208,7 @@ void ReloadableMedia::ReloadTexture() if(!LoadedComponent) { Config.GetMediaPropertyAbsolutePath(imageBasename, Type, true, imagePath); - LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY); + LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY); } if (LoadedComponent != NULL) diff --git a/RetroFE/Source/Graphics/Component/ScrollingList.cpp b/RetroFE/Source/Graphics/Component/ScrollingList.cpp index c6d112d..0d4dcfb 100644 --- a/RetroFE/Source/Graphics/Component/ScrollingList.cpp +++ b/RetroFE/Source/Graphics/Component/ScrollingList.cpp @@ -688,9 +688,15 @@ bool ScrollingList::AllocateTexture(ComponentItemBinding *s) Component *t = NULL; ImageBuilder imageBuild; - Config.GetMediaPropertyAbsolutePath(GetCollectionName(), ImageType, imagePath); + Config.GetMediaPropertyAbsolutePath(GetCollectionName(), ImageType, false, imagePath); t = imageBuild.CreateImage(imagePath, item->GetName(), ScaleX, ScaleY); + if(!t) + { + Config.GetMediaPropertyAbsolutePath(item->GetName(), ImageType, true, imagePath); + t = imageBuild.CreateImage(imagePath, ImageType, ScaleX, ScaleY); + } + if(!t && item->GetTitle() != item->GetFullTitle()) { t = imageBuild.CreateImage(imagePath, item->GetFullTitle(), ScaleX, ScaleY);