mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2026-04-29 01:19:31 +02:00
Display parent rom for image artwork if clone artwork does not exist.
This commit is contained in:
@@ -148,18 +148,18 @@ void ReloadableMedia::ReloadTexture()
|
|||||||
|
|
||||||
if (selectedItem != NULL)
|
if (selectedItem != NULL)
|
||||||
{
|
{
|
||||||
if(IsVideo)
|
std::vector<std::string> names;
|
||||||
|
|
||||||
|
names.push_back(selectedItem->GetName());
|
||||||
|
|
||||||
|
if(selectedItem->GetCloneOf().length() > 0)
|
||||||
{
|
{
|
||||||
std::vector<std::string> names;
|
names.push_back(selectedItem->GetCloneOf());
|
||||||
|
}
|
||||||
|
|
||||||
names.push_back(selectedItem->GetName());
|
for(unsigned int n = 0; n < names.size() && !found; ++n)
|
||||||
|
{
|
||||||
if(selectedItem->GetCloneOf().length() > 0)
|
if(IsVideo)
|
||||||
{
|
|
||||||
names.push_back(selectedItem->GetCloneOf());
|
|
||||||
}
|
|
||||||
|
|
||||||
for(unsigned int n = 0; n < names.size() && !found; ++n)
|
|
||||||
{
|
{
|
||||||
VideoBuilder videoBuild;
|
VideoBuilder videoBuild;
|
||||||
std::string videoPath;
|
std::string videoPath;
|
||||||
@@ -177,8 +177,8 @@ void ReloadableMedia::ReloadTexture()
|
|||||||
|
|
||||||
if(!LoadedComponent && !SystemMode)
|
if(!LoadedComponent && !SystemMode)
|
||||||
{
|
{
|
||||||
Config.GetMediaPropertyAbsolutePath(names[n], Type, true, videoPath);
|
Config.GetMediaPropertyAbsolutePath(names[n], Type, true, videoPath);
|
||||||
LoadedComponent = videoBuild.CreateVideo(videoPath, "video", ScaleX, ScaleY);
|
LoadedComponent = videoBuild.CreateVideo(videoPath, "video", ScaleX, ScaleY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(LoadedComponent)
|
if(LoadedComponent)
|
||||||
@@ -189,76 +189,76 @@ void ReloadableMedia::ReloadTexture()
|
|||||||
found = true;
|
found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
std::string imageBasename = selectedItem->GetName();
|
std::string imageBasename = names[n];
|
||||||
|
|
||||||
std::string typeLC = Utils::ToLower(Type);
|
std::string typeLC = Utils::ToLower(Type);
|
||||||
|
|
||||||
if(typeLC == "numberButtons")
|
if(typeLC == "numberButtons")
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetNumberButtons();
|
|
||||||
}
|
|
||||||
else if(typeLC == "numberPlayers")
|
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetNumberPlayers();
|
|
||||||
}
|
|
||||||
else if(typeLC == "year")
|
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetYear();
|
|
||||||
}
|
|
||||||
else if(typeLC == "title")
|
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetTitle();
|
|
||||||
}
|
|
||||||
else if(typeLC == "manufacturer")
|
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetManufacturer();
|
|
||||||
}
|
|
||||||
else if(typeLC == "genre")
|
|
||||||
{
|
|
||||||
imageBasename = selectedItem->GetGenre();
|
|
||||||
}
|
|
||||||
|
|
||||||
Utils::ReplaceSlashesWithUnderscores(imageBasename);
|
|
||||||
|
|
||||||
if(!LoadedComponent)
|
|
||||||
{
|
|
||||||
std::string imagePath;
|
|
||||||
|
|
||||||
ImageBuilder imageBuild;
|
|
||||||
|
|
||||||
if(SystemMode)
|
|
||||||
{
|
{
|
||||||
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, true, imagePath);
|
imageBasename = selectedItem->GetNumberButtons();
|
||||||
LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY);
|
|
||||||
}
|
}
|
||||||
else
|
else if(typeLC == "numberPlayers")
|
||||||
{
|
{
|
||||||
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, false, imagePath);
|
imageBasename = selectedItem->GetNumberPlayers();
|
||||||
LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY);
|
}
|
||||||
|
else if(typeLC == "year")
|
||||||
|
{
|
||||||
|
imageBasename = selectedItem->GetYear();
|
||||||
|
}
|
||||||
|
else if(typeLC == "title")
|
||||||
|
{
|
||||||
|
imageBasename = selectedItem->GetTitle();
|
||||||
|
}
|
||||||
|
else if(typeLC == "manufacturer")
|
||||||
|
{
|
||||||
|
imageBasename = selectedItem->GetManufacturer();
|
||||||
|
}
|
||||||
|
else if(typeLC == "genre")
|
||||||
|
{
|
||||||
|
imageBasename = selectedItem->GetGenre();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!LoadedComponent && !SystemMode)
|
Utils::ReplaceSlashesWithUnderscores(imageBasename);
|
||||||
|
|
||||||
|
if(!LoadedComponent)
|
||||||
{
|
{
|
||||||
Config.GetMediaPropertyAbsolutePath(imageBasename, Type, true, imagePath);
|
std::string imagePath;
|
||||||
LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY);
|
|
||||||
|
ImageBuilder imageBuild;
|
||||||
|
|
||||||
|
if(SystemMode)
|
||||||
|
{
|
||||||
|
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, true, imagePath);
|
||||||
|
LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Config.GetMediaPropertyAbsolutePath(GetCollectionName(), Type, false, imagePath);
|
||||||
|
LoadedComponent = imageBuild.CreateImage(imagePath, imageBasename, ScaleX, ScaleY);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!LoadedComponent && !SystemMode)
|
||||||
|
{
|
||||||
|
Config.GetMediaPropertyAbsolutePath(imageBasename, Type, true, imagePath);
|
||||||
|
LoadedComponent = imageBuild.CreateImage(imagePath, Type, ScaleX, ScaleY);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (LoadedComponent != NULL)
|
||||||
|
{
|
||||||
|
LoadedComponent->AllocateGraphicsMemory();
|
||||||
|
GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth());
|
||||||
|
GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LoadedComponent != NULL)
|
if(!LoadedComponent && TextFallback)
|
||||||
{
|
{
|
||||||
LoadedComponent->AllocateGraphicsMemory();
|
LoadedComponent = new Text(imageBasename, FontInst, ScaleX, ScaleY);
|
||||||
GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth());
|
GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth());
|
||||||
GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight());
|
GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!LoadedComponent && TextFallback)
|
|
||||||
{
|
|
||||||
LoadedComponent = new Text(imageBasename, FontInst, ScaleX, ScaleY);
|
|
||||||
GetBaseViewInfo()->SetImageWidth(LoadedComponent->GetBaseViewInfo()->GetImageWidth());
|
|
||||||
GetBaseViewInfo()->SetImageHeight(LoadedComponent->GetBaseViewInfo()->GetImageHeight());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user