removed ImageFolder and getting it from PreviewImage and the folders

This commit is contained in:
Zalo 2019-01-05 11:04:44 +01:00
parent da80d9c8e8
commit 2f40cee1d4
4 changed files with 14 additions and 8 deletions

View File

@ -1021,7 +1021,7 @@ static int MenuGameSelection()
if(previousBrowserIndex != browser.selIndex)
{
previousBrowserIndex = browser.selIndex;
snprintf(imagePath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], GCSettings.ImageFolder, browserList[browser.selIndex].displayname);
snprintf(imagePath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], ImageFolder(), browserList[browser.selIndex].displayname);
AllocSaveBuffer();
int width, height;
@ -3803,15 +3803,12 @@ static int MenuSettingsMenu()
{
case 0:
sprintf(options.value[6], "Screenshots");
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.ScreenshotsFolder);
break;
case 1:
sprintf(options.value[6], "Covers");
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.CoverFolder);
break;
case 2:
sprintf(options.value[6], "Artwork");
snprintf(GCSettings.ImageFolder, MAXJOLIET, "%s", GCSettings.ArtworkFolder);
break;
}
optionBrowser.TriggerUpdate();

View File

@ -174,7 +174,6 @@ preparePrefsData ()
createXMLSetting("BorderFolder", "SGB Borders Folder", GCSettings.BorderFolder);
createXMLSetting("CoverFolder", "Covers Folder", GCSettings.CoverFolder);
createXMLSetting("ArtworkFolder", "Artwork Folder", GCSettings.ArtworkFolder);
createXMLSetting("ImageFolder", "Image Folder", GCSettings.ImageFolder);
createXMLSection("Network", "Network Settings");
@ -490,7 +489,6 @@ decodePrefsData ()
loadXMLSetting(GCSettings.BorderFolder, "BorderFolder", sizeof(GCSettings.BorderFolder));
loadXMLSetting(GCSettings.CoverFolder, "CoverFolder", sizeof(GCSettings.CoverFolder));
loadXMLSetting(GCSettings.ArtworkFolder, "ArtworkFolder", sizeof(GCSettings.ArtworkFolder));
loadXMLSetting(GCSettings.ImageFolder, "ImageFolder", sizeof(GCSettings.ImageFolder));
// Network Settings
@ -638,7 +636,6 @@ DefaultSettings ()
sprintf (GCSettings.BorderFolder, "%s/borders", APPFOLDER);
sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files
sprintf (GCSettings.ArtworkFolder, "%s/artwork", APPFOLDER); // Path to artwork files
sprintf (GCSettings.ImageFolder, "%s/screenshots", APPFOLDER);
GCSettings.AutoLoad = 1;
GCSettings.AutoSave = 1;

View File

@ -469,3 +469,13 @@ int main(int argc, char *argv[])
} // main loop
return 0;
}
char* ImageFolder()
{
switch(GCSettings.PreviewImage)
{
case 1 : return GCSettings.CoverFolder; break;
case 2 : return GCSettings.ArtworkFolder; break;
default: return GCSettings.ScreenshotsFolder; break;
}
}

View File

@ -107,7 +107,6 @@ struct SGCSettings
char ScreenshotsFolder[MAXPATHLEN]; //Path to screenshots files
char CoverFolder[MAXPATHLEN]; //Path to cover files
char ArtworkFolder[MAXPATHLEN]; //Path to artwork files
char ImageFolder[MAXPATHLEN]; //Saved image folder path
char BorderFolder[MAXPATHLEN]; // Path to Super Game Boy border files
char smbip[80];
@ -115,6 +114,9 @@ struct SGCSettings
char smbpwd[20];
char smbshare[20];
};
char* ImageFolder();
void ExitApp();
void ShutdownWii();
bool SupportedIOS(u32 ios);