Merge pull request #1269 from Frank-74/Rename-Game_GoodName

Fix GoodName missing from Project64.cfg
This commit is contained in:
zilmar 2017-02-01 06:22:42 +11:00 committed by GitHub
commit 6d8933674d
7 changed files with 17 additions and 17 deletions

View File

@ -298,7 +298,7 @@ bool CN64System::LoadFileImage(const char * FileLoc)
g_Settings->SaveString(Game_File, FileLoc); g_Settings->SaveString(Game_File, FileLoc);
g_Settings->SaveBool(GameRunning_LoadingInProgress, false); g_Settings->SaveBool(GameRunning_LoadingInProgress, false);
WriteTrace(TraceN64System, TraceDebug, "Finished Loading (GoodName: %s)", g_Settings->LoadStringVal(Game_GoodName).c_str()); WriteTrace(TraceN64System, TraceDebug, "Finished Loading (GoodName: %s)", g_Settings->LoadStringVal(Rdb_GoodName).c_str());
} }
else else
{ {
@ -1513,7 +1513,7 @@ bool CN64System::SaveState()
{ {
SaveFile.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str()); SaveFile.AppendDirectory(g_Settings->LoadStringVal(Game_UniqueSaveDir).c_str());
} }
SaveFile.SetName(g_Settings->LoadStringVal(Game_GoodName).c_str()); SaveFile.SetName(g_Settings->LoadStringVal(Rdb_GoodName).c_str());
g_Settings->SaveDword(Game_LastSaveSlot, g_Settings->LoadDword(Game_CurrentSaveState)); g_Settings->SaveDword(Game_LastSaveSlot, g_Settings->LoadDword(Game_CurrentSaveState));
} }
stdstr_f target_ext("pj%s", Slot != 0 ? stdstr_f("%d", Slot).c_str() : ""); stdstr_f target_ext("pj%s", Slot != 0 ? stdstr_f("%d", Slot).c_str() : "");
@ -1669,11 +1669,11 @@ bool CN64System::LoadState()
} }
if (g_Settings->LoadDword(Game_CurrentSaveState) != 0) if (g_Settings->LoadDword(Game_CurrentSaveState) != 0)
{ {
FileName.SetNameExtension(stdstr_f("%s.pj%d", g_Settings->LoadStringVal(Game_GoodName).c_str(), g_Settings->LoadDword(Game_CurrentSaveState)).c_str()); FileName.SetNameExtension(stdstr_f("%s.pj%d", g_Settings->LoadStringVal(Rdb_GoodName).c_str(), g_Settings->LoadDword(Game_CurrentSaveState)).c_str());
} }
else else
{ {
FileName.SetNameExtension(stdstr_f("%s.pj", g_Settings->LoadStringVal(Game_GoodName).c_str()).c_str()); FileName.SetNameExtension(stdstr_f("%s.pj", g_Settings->LoadStringVal(Rdb_GoodName).c_str()).c_str());
} }
CPath ZipFileName; CPath ZipFileName;

View File

@ -102,7 +102,7 @@ enum SettingID
Game_File, Game_File,
Game_UniqueSaveDir, Game_UniqueSaveDir,
Game_GameName, Game_GameName,
Game_GoodName, Cfg_GoodName,
Game_TempLoaded, Game_TempLoaded,
Game_SystemType, Game_SystemType,
Game_EditPlugin_Gfx, Game_EditPlugin_Gfx,

View File

@ -171,7 +171,7 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
AddHandler(Game_File, new CSettingTypeTempString("")); AddHandler(Game_File, new CSettingTypeTempString(""));
AddHandler(Game_UniqueSaveDir, new CSettingTypeTempString("")); AddHandler(Game_UniqueSaveDir, new CSettingTypeTempString(""));
AddHandler(Game_GameName, new CSettingTypeTempString("")); AddHandler(Game_GameName, new CSettingTypeTempString(""));
AddHandler(Game_GoodName, new CSettingTypeGame("Good Name", Rdb_GoodName)); AddHandler(Cfg_GoodName, new CSettingTypeGame("Good Name", ""));
AddHandler(Game_TempLoaded, new CSettingTypeTempBool(false)); AddHandler(Game_TempLoaded, new CSettingTypeTempBool(false));
AddHandler(Game_SystemType, new CSettingTypeTempNumber(SYSTEM_NTSC)); AddHandler(Game_SystemType, new CSettingTypeTempNumber(SYSTEM_NTSC));
AddHandler(Game_EditPlugin_Gfx, new CSettingTypeGame("Plugin-Gfx", Default_None)); AddHandler(Game_EditPlugin_Gfx, new CSettingTypeGame("Plugin-Gfx", Default_None));

View File

@ -201,7 +201,7 @@ void CMainGui::GameLoaded(CMainGui * Gui)
{ {
WriteTrace(TraceUserInterface, TraceDebug, "Add Recent Rom"); WriteTrace(TraceUserInterface, TraceDebug, "Add Recent Rom");
Gui->AddRecentRom(FileLoc.c_str()); Gui->AddRecentRom(FileLoc.c_str());
Gui->SetWindowCaption(stdstr(g_Settings->LoadStringVal(Game_GoodName)).ToUTF16().c_str()); Gui->SetWindowCaption(stdstr(g_Settings->LoadStringVal(Rdb_GoodName)).ToUTF16().c_str());
} }
} }

View File

@ -625,11 +625,11 @@ std::wstring CMainMenu::GetSaveSlotString(int Slot)
} }
if (Slot != 0) if (Slot != 0)
{ {
FileName.SetNameExtension(stdstr_f("%s.pj%d", g_Settings->LoadStringVal(Game_GoodName).c_str(), Slot).c_str()); FileName.SetNameExtension(stdstr_f("%s.pj%d", g_Settings->LoadStringVal(Rdb_GoodName).c_str(), Slot).c_str());
} }
else else
{ {
FileName.SetNameExtension(stdstr_f("%s.pj", g_Settings->LoadStringVal(Game_GoodName).c_str()).c_str()); FileName.SetNameExtension(stdstr_f("%s.pj", g_Settings->LoadStringVal(Rdb_GoodName).c_str()).c_str());
} }
if (g_Settings->LoadDword(Setting_AutoZipInstantSave)) if (g_Settings->LoadDword(Setting_AutoZipInstantSave))

View File

@ -77,7 +77,7 @@ CGameGeneralPage::CGameGeneralPage(HWND hParent, const RECT & rcDispay)
ComboBox->AddItemW(wGS(NUMBER_6).c_str(), 6); ComboBox->AddItemW(wGS(NUMBER_6).c_str(), 6);
} }
SetDlgItemText(IDC_GOOD_NAME, g_Settings->LoadStringVal(Game_GoodName).c_str()); SetDlgItemText(IDC_GOOD_NAME, g_Settings->LoadStringVal(Rdb_GoodName).c_str());
CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH), Game_ViRefreshRate, false); CModifiedEditBox * TxtBox = AddModTextBox(GetDlgItem(IDC_VIREFRESH), Game_ViRefreshRate, false);
TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT)); TxtBox->SetTextField(GetDlgItem(IDC_VIREFESH_TEXT));

View File

@ -80,7 +80,7 @@ LRESULT CSettingConfig::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*
if (!GameIni.empty()) if (!GameIni.empty())
{ {
ConfigRomTitle.Format("Config: %s", g_Settings->LoadStringVal(Game_GoodName).c_str()); ConfigRomTitle.Format("Config: %s", g_Settings->LoadStringVal(Rdb_GoodName).c_str());
} }
RECT rcSettingInfo; RECT rcSettingInfo;
@ -251,9 +251,9 @@ void CSettingConfig::ApplySettings(bool UpdateScreen)
if (!GameIni.empty()) if (!GameIni.empty())
{ {
stdstr GoodName; stdstr GoodName;
if (!g_Settings->LoadStringVal(Game_GoodName, GoodName)) if (g_Settings->LoadStringVal(Rdb_GoodName, GoodName))
{ {
g_Settings->SaveString(Game_GoodName, GoodName); g_Settings->SaveString(Cfg_GoodName, GoodName);
} }
} }
@ -279,7 +279,7 @@ void CSettingConfig::ApplySettings(bool UpdateScreen)
stdstr GoodName = g_Settings->LoadStringVal(Rdb_GoodName); stdstr GoodName = g_Settings->LoadStringVal(Rdb_GoodName);
if (GoodName.length() > 0) if (GoodName.length() > 0)
{ {
g_Settings->SaveString(Game_GoodName, GoodName); g_Settings->SaveString(Cfg_GoodName, GoodName);
} }
} }
CSettingTypeApplication::Flush(); CSettingTypeApplication::Flush();