mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-26 03:01:51 +01:00
Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) (#1011)
* Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) * Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) * Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) * Add a toggle to hide/show the SRAM save button in the save menu UI (InfiniteBlueGX) * Add Spanish translation for "Hide SRAM Saving"
This commit is contained in:
parent
74d7dfd1a3
commit
411ff1c5c5
@ -323,21 +323,27 @@ void GuiSaveBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
if(listOffset+i < 0 && action == 1)
|
if(listOffset+i < 0 && action == 1)
|
||||||
{
|
{
|
||||||
|
|
||||||
saveDate[0]->SetText(NULL);
|
saveDate[0]->SetText(NULL);
|
||||||
saveDate[1]->SetText(NULL);
|
|
||||||
saveTime[0]->SetText("New");
|
saveTime[0]->SetText("New");
|
||||||
saveTime[1]->SetText("New");
|
saveType[0]->SetText("State");
|
||||||
saveType[0]->SetText("SRAM");
|
|
||||||
saveType[1]->SetText("State");
|
|
||||||
savePreviewImg[0]->SetImage(gameSaveBlank);
|
savePreviewImg[0]->SetImage(gameSaveBlank);
|
||||||
savePreviewImg[1]->SetImage(gameSaveBlank);
|
|
||||||
saveBtn[0]->SetVisible(true);
|
saveBtn[0]->SetVisible(true);
|
||||||
saveBtn[1]->SetVisible(true);
|
|
||||||
|
|
||||||
if(saveBtn[0]->GetState() == STATE_DISABLED)
|
if(saveBtn[0]->GetState() == STATE_DISABLED)
|
||||||
saveBtn[0]->SetState(STATE_DEFAULT);
|
saveBtn[0]->SetState(STATE_DEFAULT);
|
||||||
if(saveBtn[1]->GetState() == STATE_DISABLED)
|
|
||||||
saveBtn[1]->SetState(STATE_DEFAULT);
|
if (GCSettings.HideSRAMSaving == 0)
|
||||||
|
{
|
||||||
|
saveDate[1]->SetText(NULL);
|
||||||
|
saveTime[1]->SetText("New");
|
||||||
|
saveType[1]->SetText("SRAM");
|
||||||
|
savePreviewImg[1]->SetImage(gameSaveBlank);
|
||||||
|
saveBtn[1]->SetVisible(true);
|
||||||
|
|
||||||
|
if(saveBtn[1]->GetState() == STATE_DISABLED)
|
||||||
|
saveBtn[1]->SetState(STATE_DEFAULT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(listOffset+i < saves->length)
|
else if(listOffset+i < saves->length)
|
||||||
{
|
{
|
||||||
|
@ -265,6 +265,9 @@ msgstr "Alemán"
|
|||||||
msgid "Go Back"
|
msgid "Go Back"
|
||||||
msgstr "Volver"
|
msgstr "Volver"
|
||||||
|
|
||||||
|
msgid "Hide SRAM Saving"
|
||||||
|
msgstr "Esconder Guardar SRAM"
|
||||||
|
|
||||||
msgid "Horizontal"
|
msgid "Horizontal"
|
||||||
msgstr "Horizontal"
|
msgstr "Horizontal"
|
||||||
|
|
||||||
|
@ -1987,20 +1987,7 @@ static int MenuGameSaves(int action)
|
|||||||
}
|
}
|
||||||
else // save
|
else // save
|
||||||
{
|
{
|
||||||
if(ret == -2) // new SRAM
|
if(ret == -2) // new State
|
||||||
{
|
|
||||||
for(i=1; i < 100; i++)
|
|
||||||
if(saves.files[FILE_SRAM][i] == 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if(i < 100)
|
|
||||||
{
|
|
||||||
MakeFilePath(filepath, FILE_SRAM, Memory.ROMFilename, i);
|
|
||||||
SaveSRAM(filepath, NOTSILENT);
|
|
||||||
menu = MENU_GAME_SAVE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(ret == -1) // new State
|
|
||||||
{
|
{
|
||||||
for(i=1; i < 100; i++)
|
for(i=1; i < 100; i++)
|
||||||
if(saves.files[FILE_SNAPSHOT][i] == 0)
|
if(saves.files[FILE_SNAPSHOT][i] == 0)
|
||||||
@ -2009,7 +1996,20 @@ static int MenuGameSaves(int action)
|
|||||||
if(i < 100)
|
if(i < 100)
|
||||||
{
|
{
|
||||||
MakeFilePath(filepath, FILE_SNAPSHOT, Memory.ROMFilename, i);
|
MakeFilePath(filepath, FILE_SNAPSHOT, Memory.ROMFilename, i);
|
||||||
SaveSnapshot (filepath, NOTSILENT);
|
SaveSnapshot(filepath, NOTSILENT);
|
||||||
|
menu = MENU_GAME_SAVE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(ret == -1 && GCSettings.HideSRAMSaving == 0) // new SRAM
|
||||||
|
{
|
||||||
|
for(i=1; i < 100; i++)
|
||||||
|
if(saves.files[FILE_SRAM][i] == 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if(i < 100)
|
||||||
|
{
|
||||||
|
MakeFilePath(filepath, FILE_SRAM, Memory.ROMFilename, i);
|
||||||
|
SaveSRAM (filepath, NOTSILENT);
|
||||||
menu = MENU_GAME_SAVE;
|
menu = MENU_GAME_SAVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4232,6 +4232,7 @@ static int MenuSettingsMenu()
|
|||||||
sprintf(options.name[i++], "Rumble");
|
sprintf(options.name[i++], "Rumble");
|
||||||
sprintf(options.name[i++], "Language");
|
sprintf(options.name[i++], "Language");
|
||||||
sprintf(options.name[i++], "Preview Image");
|
sprintf(options.name[i++], "Preview Image");
|
||||||
|
sprintf(options.name[i++], "Hide SRAM Saving");
|
||||||
options.length = i;
|
options.length = i;
|
||||||
|
|
||||||
for(i=0; i < options.length; i++)
|
for(i=0; i < options.length; i++)
|
||||||
@ -4317,6 +4318,9 @@ static int MenuSettingsMenu()
|
|||||||
if(GCSettings.PreviewImage > 2)
|
if(GCSettings.PreviewImage > 2)
|
||||||
GCSettings.PreviewImage = 0;
|
GCSettings.PreviewImage = 0;
|
||||||
break;
|
break;
|
||||||
|
case 7:
|
||||||
|
GCSettings.HideSRAMSaving ^= 1;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ret >= 0 || firstRun)
|
if(ret >= 0 || firstRun)
|
||||||
@ -4365,6 +4369,11 @@ static int MenuSettingsMenu()
|
|||||||
sprintf (options.value[4], "Enabled");
|
sprintf (options.value[4], "Enabled");
|
||||||
else
|
else
|
||||||
sprintf (options.value[4], "Disabled");
|
sprintf (options.value[4], "Disabled");
|
||||||
|
|
||||||
|
if (GCSettings.HideSRAMSaving == 1)
|
||||||
|
sprintf (options.value[7], "On");
|
||||||
|
else
|
||||||
|
sprintf (options.value[7], "Off");
|
||||||
|
|
||||||
switch(GCSettings.language)
|
switch(GCSettings.language)
|
||||||
{
|
{
|
||||||
|
@ -168,6 +168,7 @@ preparePrefsData ()
|
|||||||
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
|
createXMLSetting("Rumble", "Rumble", toStr(GCSettings.Rumble));
|
||||||
createXMLSetting("language", "Language", toStr(GCSettings.language));
|
createXMLSetting("language", "Language", toStr(GCSettings.language));
|
||||||
createXMLSetting("PreviewImage", "Preview Image", toStr(GCSettings.PreviewImage));
|
createXMLSetting("PreviewImage", "Preview Image", toStr(GCSettings.PreviewImage));
|
||||||
|
createXMLSetting("HideSRAMSaving", "Hide SRAM Saving", toStr(GCSettings.HideSRAMSaving));
|
||||||
|
|
||||||
createXMLSection("Controller", "Controller Settings");
|
createXMLSection("Controller", "Controller Settings");
|
||||||
|
|
||||||
@ -359,6 +360,7 @@ decodePrefsData ()
|
|||||||
loadXMLSetting(&GCSettings.Rumble, "Rumble");
|
loadXMLSetting(&GCSettings.Rumble, "Rumble");
|
||||||
loadXMLSetting(&GCSettings.language, "language");
|
loadXMLSetting(&GCSettings.language, "language");
|
||||||
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
|
loadXMLSetting(&GCSettings.PreviewImage, "PreviewImage");
|
||||||
|
loadXMLSetting(&GCSettings.HideSRAMSaving, "HideSRAMSaving");
|
||||||
|
|
||||||
// Controller Settings
|
// Controller Settings
|
||||||
|
|
||||||
@ -466,6 +468,7 @@ DefaultSettings ()
|
|||||||
GCSettings.SFXVolume = 40;
|
GCSettings.SFXVolume = 40;
|
||||||
GCSettings.Rumble = 1;
|
GCSettings.Rumble = 1;
|
||||||
GCSettings.PreviewImage = 0;
|
GCSettings.PreviewImage = 0;
|
||||||
|
GCSettings.HideSRAMSaving = 0;
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
GCSettings.language = CONF_GetLanguage();
|
GCSettings.language = CONF_GetLanguage();
|
||||||
|
@ -112,6 +112,7 @@ struct SGCSettings{
|
|||||||
char ScreenshotsFolder[MAXPATHLEN]; // Path to screenshots files
|
char ScreenshotsFolder[MAXPATHLEN]; // Path to screenshots files
|
||||||
char CoverFolder[MAXPATHLEN]; // Path to cover files
|
char CoverFolder[MAXPATHLEN]; // Path to cover files
|
||||||
char ArtworkFolder[MAXPATHLEN]; // Path to artwork files
|
char ArtworkFolder[MAXPATHLEN]; // Path to artwork files
|
||||||
|
int HideSRAMSaving;
|
||||||
int AutoloadGame;
|
int AutoloadGame;
|
||||||
|
|
||||||
char smbip[80];
|
char smbip[80];
|
||||||
|
Loading…
Reference in New Issue
Block a user