Integrating new directory structure .

This commit is contained in:
emb 2015-02-25 22:49:24 -06:00
parent 49d2fd7c6a
commit c010852bab
4 changed files with 31 additions and 17 deletions

View File

@ -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/<collectionname>/<imagetype>
# 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/<collectionname>/roms
# baseItemPath=d:/roms

View File

@ -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";
}

View File

@ -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)

View File

@ -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);