Add setting to disable version checks

This commit is contained in:
Henrik Rydgard 2013-12-12 15:58:46 +01:00
parent 551ba172bf
commit ab32c99b73
3 changed files with 6 additions and 1 deletions

View file

@ -72,6 +72,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
general->Get("CurrentDirectory", &currentDirectory, "");
general->Get("ShowDebuggerOnLoad", &bShowDebuggerOnLoad, false);
general->Get("HomebrewStore", &bHomebrewStore, false);
general->Get("CheckForNewVersion", &bCheckForNewVersion, true);
if (!File::Exists(currentDirectory))
currentDirectory = "";
@ -386,7 +387,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
// Sometimes the download may not be finished when the main screen shows (if the user dismisses the
// splash screen quickly), but then we'll just show the notification next time instead, we store the
// upgrade number in the ini.
if (iRunCount % 5 == 0) {
if (iRunCount % 5 == 0 && bCheckForNewVersion) {
std::shared_ptr<http::Download> dl = g_DownloadManager.StartDownloadWithCallback(
"http://www.ppsspp.org/version.json", "", &DownloadCompletedCallback);
dl->SetHidden(true);
@ -447,6 +448,7 @@ void Config::Save() {
general->Set("GridView1", bGridView1);
general->Set("GridView2", bGridView2);
general->Set("GridView3", bGridView3);
general->Set("CheckForNewVersion", bCheckForNewVersion);
IniFile::Section *recent = iniFile.GetOrCreateSection("Recent");
recent->Set("MaxRecent", iMaxRecent);

View file

@ -63,6 +63,8 @@ public:
bool bIgnoreBadMemAccess;
bool bFastMemory;
bool bJit;
bool bCheckForNewVersion;
// Definitely cannot be changed while game is running.
bool bSeparateCPUThread;
bool bSeparateIOThread;

View file

@ -276,6 +276,7 @@ void GameSettingsScreen::CreateViews() {
systemSettings->Add(new Choice(s->T("Developer Tools")))->OnClick.Handle(this, &GameSettingsScreen::OnDeveloperTools);
systemSettings->Add(new ItemHeader(s->T("General")));
systemSettings->Add(new CheckBox(&g_Config.bCheckForNewVersion, s->T("VersionCheck", "Check for new versions of PPSSPP")));
systemSettings->Add(new Choice(s->T("Clear Recent Games List")))->OnClick.Handle(this, &GameSettingsScreen::OnClearRecents);
systemSettings->Add(new Choice(s->T("Restore Default Settings")))->OnClick.Handle(this, &GameSettingsScreen::OnRestoreDefaultSettings);
systemSettings->Add(new CheckBox(&g_Config.bEnableAutoLoad, s->T("Auto Load Newest Savestate")));