Add an option to remember the last game

This commit is contained in:
wiidev 2023-01-01 17:00:20 +00:00
parent 4be1ca22d3
commit 43cc0d3601
27 changed files with 96 additions and 2 deletions

View File

@ -1848,6 +1848,9 @@ msgstr "Znovunactení SD"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Genindlæs SD"
msgid "Reloading game list now, please wait..."
msgstr "Genindlæser spil liste, Vent venligst..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Husk at låse op"

View File

@ -1848,6 +1848,9 @@ msgstr "SD herladen"
msgid "Reloading game list now, please wait..."
msgstr "Spellijst wordt herladen, een moment..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Unlock onthouden"

View File

@ -1848,6 +1848,9 @@ msgstr ""
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Uudelleenlataa SD"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Recharger la SD"
msgid "Reloading game list now, please wait..."
msgstr "Rechargement de la liste des jeux, veuillez patienter..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Mémoriser le verrouillage"

View File

@ -1848,6 +1848,9 @@ msgstr "SD Karte neuladen"
msgid "Reloading game list now, please wait..."
msgstr "Aktualisiere Spieleliste, bitte warten..."
msgid "Remember Last Game"
msgstr "Letztes Spiel merken"
msgid "Remember Unlock"
msgstr "Entsperrung behalten"

View File

@ -1848,6 +1848,9 @@ msgstr "Επαναφόρτωση κάρτας SD"
msgid "Reloading game list now, please wait..."
msgstr "Επαναφόρτωση λίστας παιχνιδιών, παρακαλώ περιμένετε..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Μόνιμο ξεκλείδωμα"

View File

@ -1848,6 +1848,9 @@ msgstr "SD Újratöltése"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Ricarica SD"
msgid "Reloading game list now, please wait..."
msgstr "Ricaricando la lista dei giochi, attendere prego..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Ricorda sblocco"

View File

@ -1848,6 +1848,9 @@ msgstr "SDを再読み込み"
msgid "Reloading game list now, please wait..."
msgstr "ゲームリストを再読み込み中、お待ちください..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "ロック解除を記憶"

View File

@ -1848,6 +1848,9 @@ msgstr "SD 리로드"
msgid "Reloading game list now, please wait..."
msgstr "게임 목록을 다시 불러오고 있습니다. 잠시만 기다려주십시오..."
msgid "Remember Last Game"
msgstr "마지막 게임 기억하기"
msgid "Remember Unlock"
msgstr "잠금 해제 기억"

View File

@ -1848,6 +1848,9 @@ msgstr "Les SD på nytt"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Przeladuj SD"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "Ler cartão SD"
msgid "Reloading game list now, please wait..."
msgstr "Recarregando lista de jogos..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Lembrar Desbloqueio"

View File

@ -1848,6 +1848,9 @@ msgstr "Ler cartão SD"
msgid "Reloading game list now, please wait..."
msgstr "A reler lista de jogos, pf aguarde..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Lembrar Desbloqueio"

View File

@ -1848,6 +1848,9 @@ msgstr "Перечитать SD карту"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "重新载入 SD 卡"
msgid "Reloading game list now, please wait..."
msgstr "正在重新加载游戏列表,请稍候..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "存储解锁"

View File

@ -1848,6 +1848,9 @@ msgstr "Recargar SD"
msgid "Reloading game list now, please wait..."
msgstr "Recargando lista de juegos, espera..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "Recordar Bloqueo"

View File

@ -1848,6 +1848,9 @@ msgstr "Ladda om SD"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "重新載入 SD 卡"
msgid "Reloading game list now, please wait..."
msgstr "現在重新載入遊戲清單,請稍候..."
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr "儲存解鎖"

View File

@ -1848,6 +1848,9 @@ msgstr "โหลด SD ใหม่"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -1848,6 +1848,9 @@ msgstr "SD'yi yeniden yükle"
msgid "Reloading game list now, please wait..."
msgstr ""
msgid "Remember Last Game"
msgstr ""
msgid "Remember Unlock"
msgstr ""

View File

@ -642,8 +642,16 @@ void GameBrowseMenu::ReloadBrowser()
}
//! Check if the loaded setting is still in range
Settings.SelectedGame = LIMIT(Settings.SelectedGame, 0, gameList.size()-1);
Settings.GameListOffset = LIMIT(Settings.GameListOffset, 0, gameList.size()-1);
if (Settings.RememberLastGame)
{
Settings.SelectedGame = LIMIT(Settings.SelectedGame, 0, gameList.size()-1);
Settings.GameListOffset = LIMIT(Settings.GameListOffset, 0, gameList.size()-1);
}
else
{
Settings.SelectedGame = 0;
Settings.GameListOffset = 0;
}
delete gameBrowser;
delete searchBar;

View File

@ -162,6 +162,7 @@ void CSettings::SetDefault()
Wiinnertag = OFF;
SelectedGame = 0;
GameListOffset = 0;
RememberLastGame = ON;
sneekVideoPatch = OFF;
NandEmuMode = OFF;
NandEmuChanMode = 2;
@ -429,6 +430,7 @@ bool CSettings::Save()
fprintf(file, "WiinnertagPath = %s\n", WiinnertagPath);
fprintf(file, "SelectedGame = %d\n", SelectedGame);
fprintf(file, "GameListOffset = %d\n", GameListOffset);
fprintf(file, "RememberLastGame = %d\n", RememberLastGame);
fprintf(file, "sneekVideoPatch = %d\n", sneekVideoPatch);
fprintf(file, "NandEmuMode = %d\n", NandEmuMode);
fprintf(file, "NandEmuChanMode = %d\n", NandEmuChanMode);
@ -836,6 +838,10 @@ bool CSettings::SetSetting(char *name, char *value)
{
GameListOffset = atoi(value);
}
else if(strcmp(name, "RememberLastGame") == 0)
{
RememberLastGame = atoi(value);
}
else if(strcmp(name, "sneekVideoPatch") == 0)
{
sneekVideoPatch = atoi(value);

View File

@ -164,6 +164,7 @@ class CSettings
short Wiinnertag;
short SelectedGame;
short GameListOffset;
short RememberLastGame;
short sneekVideoPatch;
std::vector<u32> EnabledCategories;
std::vector<u32> RequiredCategories;

View File

@ -151,6 +151,7 @@ GuiSettingsMenu::GuiSettingsMenu()
Options->SetName(Idx++, "%s", tr( "Full covers Download" ));
Options->SetName(Idx++, "%s", tr( "Cover Action" ));
Options->SetName(Idx++, "%s", tr( "Screensaver" ));
Options->SetName(Idx++, "%s", tr( "Remember Last Game" ));
Options->SetName(Idx++, "%s", tr( "Mark new games" ));
Options->SetName(Idx++, "%s", tr( "Show Play Count" ));
Options->SetName(Idx++, "%s", tr( "Show Favorite on banner" ));
@ -228,6 +229,9 @@ void GuiSettingsMenu::SetOptionValues()
//! Settings: Screensaver
Options->SetValue(Idx++, "%s", tr( ScreensaverText[Settings.screensaver] ));
//! Settings: Remember Last Game
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.RememberLastGame] ));
//! Settings: Mark new games
Options->SetValue(Idx++, "%s", tr( OnOffText[Settings.marknewtitles] ));
@ -419,6 +423,12 @@ int GuiSettingsMenu::GetMenuInternal()
SetWPADTimeout();
}
//! Settings: Remember Last Game
else if (ret == ++Idx)
{
if (++Settings.RememberLastGame >= MAX_ON_OFF) Settings.RememberLastGame = 0;
}
//! Settings: Mark new games
else if (ret == ++Idx)
{