mirror of
https://github.com/dborth/fceugx.git
synced 2024-10-31 22:45:05 +01:00
added ocerFolder and ArtworkFolder
This commit is contained in:
parent
997e3bc403
commit
052b068223
@ -556,5 +556,15 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
} // emulation loop
|
||||
} // main loop
|
||||
} // main loop
|
||||
}
|
||||
|
||||
char* ImageFolder()
|
||||
{
|
||||
switch(GCSettings.PreviewImage)
|
||||
{
|
||||
case 1 : return GCSettings.CoverFolder; break;
|
||||
case 2 : return GCSettings.ArtworkFolder; break;
|
||||
default: return GCSettings.ScreenshotsFolder; break;
|
||||
}
|
||||
}
|
||||
|
@ -90,6 +90,8 @@ struct SGCSettings
|
||||
char SaveFolder[MAXPATHLEN]; // Path to save files
|
||||
char CheatFolder[MAXPATHLEN]; // Path to cheat files
|
||||
char ScreenshotsFolder[MAXPATHLEN]; // Path to screenshot files
|
||||
char CoverFolder[MAXPATHLEN]; // Path to cover files
|
||||
char ArtworkFolder[MAXPATHLEN]; // Path to artwork files
|
||||
int AutoloadGame;
|
||||
|
||||
char smbip[80];
|
||||
@ -117,8 +119,11 @@ struct SGCSettings
|
||||
int SFXVolume;
|
||||
int Rumble;
|
||||
int language;
|
||||
int PreviewImage;
|
||||
};
|
||||
|
||||
char* ImageFolder();
|
||||
|
||||
void ExitApp();
|
||||
void ShutdownWii();
|
||||
bool SupportedIOS(u32 ios);
|
||||
|
@ -1048,7 +1048,7 @@ static int MenuGameSelection()
|
||||
if(previousBrowserIndex != browser.selIndex)
|
||||
{
|
||||
previousBrowserIndex = browser.selIndex;
|
||||
snprintf(screenshotPath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder, browserList[browser.selIndex].displayname);
|
||||
snprintf(screenshotPath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], ImageFolder(), browserList[browser.selIndex].displayname);
|
||||
|
||||
AllocSaveBuffer();
|
||||
int width, height;
|
||||
@ -3515,6 +3515,8 @@ static int MenuSettingsFile()
|
||||
sprintf(options.name[i++], "Save Folder");
|
||||
sprintf(options.name[i++], "Cheats Folder");
|
||||
sprintf(options.name[i++], "Screenshots Folder");
|
||||
sprintf(options.name[i++], "Covers Folder");
|
||||
sprintf(options.name[i++], "Artwork Folder");
|
||||
sprintf(options.name[i++], "Auto Load");
|
||||
sprintf(options.name[i++], "Auto Save");
|
||||
sprintf(options.name[i++], "Append Auto to .SAV Files");
|
||||
@ -3593,18 +3595,26 @@ static int MenuSettingsFile()
|
||||
break;
|
||||
|
||||
case 6:
|
||||
OnScreenKeyboard(GCSettings.CoverFolder, MAXPATHLEN);
|
||||
break;
|
||||
|
||||
case 7:
|
||||
OnScreenKeyboard(GCSettings.ArtworkFolder, MAXPATHLEN);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
GCSettings.AutoLoad++;
|
||||
if (GCSettings.AutoLoad > 2)
|
||||
GCSettings.AutoLoad = 0;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
case 9:
|
||||
GCSettings.AutoSave++;
|
||||
if (GCSettings.AutoSave > 3)
|
||||
GCSettings.AutoSave = 0;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
case 10:
|
||||
GCSettings.AppendAuto++;
|
||||
if (GCSettings.AppendAuto > 1)
|
||||
GCSettings.AppendAuto = 0;
|
||||
@ -3671,18 +3681,20 @@ static int MenuSettingsFile()
|
||||
snprintf (options.value[3], 35, "%s", GCSettings.SaveFolder);
|
||||
snprintf (options.value[4], 35, "%s", GCSettings.CheatFolder);
|
||||
snprintf (options.value[5], 35, "%s", GCSettings.ScreenshotsFolder);
|
||||
snprintf (options.value[6], 35, "%s", GCSettings.CoverFolder);
|
||||
snprintf (options.value[7], 35, "%s", GCSettings.ArtworkFolder);
|
||||
|
||||
if (GCSettings.AutoLoad == 0) sprintf (options.value[6],"Off");
|
||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[6],"RAM");
|
||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[6],"State");
|
||||
if (GCSettings.AutoLoad == 0) sprintf (options.value[8],"Off");
|
||||
else if (GCSettings.AutoLoad == 1) sprintf (options.value[8],"RAM");
|
||||
else if (GCSettings.AutoLoad == 2) sprintf (options.value[8],"State");
|
||||
|
||||
if (GCSettings.AutoSave == 0) sprintf (options.value[7],"Off");
|
||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[7],"RAM");
|
||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[7],"State");
|
||||
else if (GCSettings.AutoSave == 3) sprintf (options.value[7],"Both");
|
||||
else if (GCSettings.AutoSave == 1) sprintf (options.value[9],"RAM");
|
||||
else if (GCSettings.AutoSave == 2) sprintf (options.value[9],"State");
|
||||
else if (GCSettings.AutoSave == 3) sprintf (options.value[9],"Both");
|
||||
|
||||
if (GCSettings.AppendAuto == 0) sprintf (options.value[8], "Off");
|
||||
else if (GCSettings.AppendAuto == 1) sprintf (options.value[8], "On");
|
||||
if (GCSettings.AppendAuto == 0) sprintf (options.value[10], "Off");
|
||||
else if (GCSettings.AppendAuto == 1) sprintf (options.value[10], "On");
|
||||
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
@ -3717,6 +3729,7 @@ static int MenuSettingsMenu()
|
||||
sprintf(options.name[i++], "Sound Effects Volume");
|
||||
sprintf(options.name[i++], "Rumble");
|
||||
sprintf(options.name[i++], "Language");
|
||||
sprintf(options.name[i++], "Preview Image");
|
||||
options.length = i;
|
||||
|
||||
for(i=0; i < options.length; i++)
|
||||
@ -3800,6 +3813,12 @@ static int MenuSettingsMenu()
|
||||
else if(GCSettings.language == LANG_JAPANESE)
|
||||
GCSettings.language = LANG_ENGLISH;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
GCSettings.PreviewImage++;
|
||||
if(GCSettings.PreviewImage > 2)
|
||||
GCSettings.PreviewImage = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(ret >= 0 || firstRun)
|
||||
@ -3867,6 +3886,19 @@ static int MenuSettingsMenu()
|
||||
case LANG_TURKISH: sprintf(options.value[5], "Turkish"); break;
|
||||
}
|
||||
|
||||
switch(GCSettings.PreviewImage)
|
||||
{
|
||||
case 0:
|
||||
sprintf(options.value[6], "Screenshots");
|
||||
break;
|
||||
case 1:
|
||||
sprintf(options.value[6], "Covers");
|
||||
break;
|
||||
case 2:
|
||||
sprintf(options.value[6], "Artwork");
|
||||
break;
|
||||
}
|
||||
|
||||
optionBrowser.TriggerUpdate();
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,8 @@ preparePrefsData ()
|
||||
createXMLSetting("CheatFolder", "Cheats Folder", GCSettings.CheatFolder);
|
||||
createXMLSetting("gamegenie", "Game Genie", toStr(GCSettings.gamegenie));
|
||||
createXMLSetting("ScreenshotsFolder", "Screenshots Folder", GCSettings.ScreenshotsFolder);
|
||||
createXMLSetting("CoverFolder", "Covers Folder", GCSettings.CoverFolder);
|
||||
createXMLSetting("ArtworkFolder", "Artwork Folder", GCSettings.ArtworkFolder);
|
||||
|
||||
createXMLSection("Network", "Network Settings");
|
||||
|
||||
@ -163,7 +165,7 @@ preparePrefsData ()
|
||||
createXMLSetting("SFXVolume", "Sound Effects Volume", toStr(GCSettings.SFXVolume));
|
||||
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
|
||||
createXMLSetting("language", "Language", toStr(GCSettings.language));
|
||||
|
||||
createXMLSetting("PreviewImage", "Preview Image", toStr(GCSettings.PreviewImage));
|
||||
|
||||
createXMLSection("Controller", "Controller Settings");
|
||||
|
||||
@ -303,6 +305,8 @@ decodePrefsData ()
|
||||
loadXMLSetting(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
|
||||
loadXMLSetting(&GCSettings.gamegenie, "gamegenie");
|
||||
loadXMLSetting(GCSettings.ScreenshotsFolder, "ScreenshotsFolder", sizeof(GCSettings.ScreenshotsFolder));
|
||||
loadXMLSetting(GCSettings.CoverFolder, "CoverFolder", sizeof(GCSettings.CoverFolder));
|
||||
loadXMLSetting(GCSettings.ArtworkFolder, "ArtworkFolder", sizeof(GCSettings.ArtworkFolder));
|
||||
|
||||
// Network Settings
|
||||
|
||||
@ -333,6 +337,7 @@ decodePrefsData ()
|
||||
loadXMLSetting(&GCSettings.SFXVolume, "SFXVolume");
|
||||
loadXMLSetting(&GCSettings.Rumble, "Rumble");
|
||||
loadXMLSetting(&GCSettings.language, "language");
|
||||
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
|
||||
|
||||
// Controller Settings
|
||||
|
||||
@ -423,6 +428,8 @@ DefaultSettings ()
|
||||
GCSettings.MusicVolume = 20;
|
||||
GCSettings.SFXVolume = 40;
|
||||
GCSettings.Rumble = 1; // Enabled
|
||||
GCSettings.PreviewImage = 0;
|
||||
|
||||
#ifdef HW_RVL
|
||||
GCSettings.language = CONF_GetLanguage();
|
||||
|
||||
@ -441,6 +448,8 @@ DefaultSettings ()
|
||||
sprintf (GCSettings.SaveFolder, "%s/saves", APPFOLDER); // Path to save files
|
||||
sprintf (GCSettings.CheatFolder, "%s/cheats", APPFOLDER); // Path to cheat files
|
||||
sprintf (GCSettings.ScreenshotsFolder, "%s/screenshots", APPFOLDER); // Path to screenshots files
|
||||
sprintf (GCSettings.CoverFolder, "%s/covers", APPFOLDER); // Path to cover files
|
||||
sprintf (GCSettings.ArtworkFolder, "%s/artwork", APPFOLDER); // Path to artwork files
|
||||
GCSettings.AutoLoad = 1; // Auto Load RAM
|
||||
GCSettings.AutoSave = 1; // Auto Save RAM
|
||||
}
|
||||
@ -600,8 +609,13 @@ bool LoadPrefs()
|
||||
char dirPath[MAXPATHLEN];
|
||||
sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.ScreenshotsFolder);
|
||||
CreateDirectory(dirPath);
|
||||
sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.CoverFolder);
|
||||
CreateDirectory(dirPath);
|
||||
sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.ArtworkFolder);
|
||||
CreateDirectory(dirPath);
|
||||
sprintf(dirPath, "%s%s", pathPrefix[GCSettings.LoadMethod], GCSettings.CheatFolder);
|
||||
CreateDirectory(dirPath);
|
||||
|
||||
}
|
||||
|
||||
ResetText();
|
||||
|
Loading…
Reference in New Issue
Block a user