mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-24 19:36:17 +00:00
Allow disable the auto updater (#1490)
This commit is contained in:
parent
f45cad6bc9
commit
a547b2774f
6 changed files with 49 additions and 7 deletions
|
@ -7,7 +7,9 @@
|
|||
|
||||
#include "about_dialog.h"
|
||||
#include "cheats_patches.h"
|
||||
#ifdef ENABLE_UPDATER
|
||||
#include "check_update.h"
|
||||
#endif
|
||||
#include "common/io_file.h"
|
||||
#include "common/path_util.h"
|
||||
#include "common/scm_rev.h"
|
||||
|
@ -59,8 +61,10 @@ bool MainWindow::Init() {
|
|||
this->show();
|
||||
// load game list
|
||||
LoadGameLists();
|
||||
#ifdef ENABLE_UPDATER
|
||||
// Check for update
|
||||
CheckUpdateMain(true);
|
||||
#endif
|
||||
|
||||
auto end = std::chrono::steady_clock::now();
|
||||
auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(end - start);
|
||||
|
@ -183,6 +187,7 @@ void MainWindow::LoadGameLists() {
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
void MainWindow::CheckUpdateMain(bool checkSave) {
|
||||
if (checkSave) {
|
||||
if (!Config::autoUpdate()) {
|
||||
|
@ -192,6 +197,7 @@ void MainWindow::CheckUpdateMain(bool checkSave) {
|
|||
auto checkUpdate = new CheckUpdate(false);
|
||||
checkUpdate->exec();
|
||||
}
|
||||
#endif
|
||||
|
||||
void MainWindow::GetPhysicalDevices() {
|
||||
Vulkan::Instance instance(false, false);
|
||||
|
@ -254,10 +260,12 @@ void MainWindow::CreateConnects() {
|
|||
settingsDialog->exec();
|
||||
});
|
||||
|
||||
#ifdef ENABLE_UPDATER
|
||||
connect(ui->updaterAct, &QAction::triggered, this, [this]() {
|
||||
auto checkUpdate = new CheckUpdate(true);
|
||||
checkUpdate->exec();
|
||||
});
|
||||
#endif
|
||||
|
||||
connect(ui->aboutAct, &QAction::triggered, this, [this]() {
|
||||
auto aboutDialog = new AboutDialog(this);
|
||||
|
@ -933,7 +941,9 @@ void MainWindow::SetUiIcons(bool isWhite) {
|
|||
ui->bootInstallPkgAct->setIcon(RecolorIcon(ui->bootInstallPkgAct->icon(), isWhite));
|
||||
ui->bootGameAct->setIcon(RecolorIcon(ui->bootGameAct->icon(), isWhite));
|
||||
ui->exitAct->setIcon(RecolorIcon(ui->exitAct->icon(), isWhite));
|
||||
#ifdef ENABLE_UPDATER
|
||||
ui->updaterAct->setIcon(RecolorIcon(ui->updaterAct->icon(), isWhite));
|
||||
#endif
|
||||
ui->downloadCheatsPatchesAct->setIcon(
|
||||
RecolorIcon(ui->downloadCheatsPatchesAct->icon(), isWhite));
|
||||
ui->dumpGameListAct->setIcon(RecolorIcon(ui->dumpGameListAct->icon(), isWhite));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue