mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-02 10:16:50 +02:00
Integrating new directory structure .
This commit is contained in:
@@ -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";
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user