diff --git a/RetroFE/Source/Database/Configuration.cpp b/RetroFE/Source/Database/Configuration.cpp index fc57461..382f478 100644 --- a/RetroFE/Source/Database/Configuration.cpp +++ b/RetroFE/Source/Database/Configuration.cpp @@ -340,6 +340,12 @@ bool Configuration::GetPropertyAbsolutePath(std::string key, std::string &value) } void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, std::string &value) +{ + return GetMediaPropertyAbsolutePath(collectionName, mediaType, false, value); +} + + +void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, bool system, std::string &value) { std::string key = "media." + collectionName + "." + mediaType; @@ -347,6 +353,7 @@ void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std { return; } + std::string baseMediaPath; if(!GetPropertyAbsolutePath("baseMediaPath", baseMediaPath)) { @@ -355,11 +362,11 @@ void Configuration::GetMediaPropertyAbsolutePath(std::string collectionName, std if(mediaType == "manufacturer") { - value = baseMediaPath + "/_Manufacturer"; + value = baseMediaPath + "/_manufacturer"; } else { - value = baseMediaPath + "/" + collectionName + "/" + mediaType); + value = baseMediaPath + "/" + collectionName + "/" + mediaType + "/system"); } } diff --git a/RetroFE/Source/Database/Configuration.h b/RetroFE/Source/Database/Configuration.h index f2f7ec6..dfb15c2 100644 --- a/RetroFE/Source/Database/Configuration.h +++ b/RetroFE/Source/Database/Configuration.h @@ -43,6 +43,7 @@ public: bool PropertyPrefixExists(std::string key); bool GetPropertyAbsolutePath(std::string key, std::string &value); void GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, std::string &value); + void GetMediaPropertyAbsolutePath(std::string collectionName, std::string mediaType, bool system, std::string &value); void GetCollectionAbsolutePath(std::string collectionName, std::string &value); bool IsVerbose() const; void SetVerbose(bool verbose); diff --git a/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp b/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp index d90840c..0e68cf8 100644 --- a/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp +++ b/RetroFE/Source/Graphics/Component/ReloadableMedia.cpp @@ -199,18 +199,25 @@ void ReloadableMedia::ReloadTexture() if(!LoadedComponent) { std::string imagePath; - Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, imagePath); + Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, false, imagePath); ImageBuilder imageBuild; LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY); + if(!LoadedComponent) + { + Config.GetMediaPropertyAbsolutePath(imageBasename, Type, true, imagePath); + LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY); + } + if (LoadedComponent != NULL) { - LoadedComponent->AllocateGraphicsMemory(); - GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth()); - GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight()); + LoadedComponent->AllocateGraphicsMemory(); + GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth()); + GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight()); } + } if(!LoadedComponent && TextFallback)