diff options
| author | crueter <crueter@eden-emu.dev> | 2026-01-31 01:18:36 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-01-31 01:18:36 +0100 |
| commit | 638663b28e10b1247fc2fb2e387b6e0aec070098 (patch) | |
| tree | 3fc894fcd3f682c99a8fa7b037a421dc3d359a30 /src/yuzu/main_window.cpp | |
| parent | df838a57fd5d1a118e310933b37e9aeb2d88327b (diff) | |
[cmake, frontend] Add nightly build modifier (#3431)
The `NIGHTLY_BUILD` option changes the app name to "Eden Nightly" and
changes the auto-update URL to use our new Nightly repository.
This needs added to Android, but I can't right now as I have to leave.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3431
Diffstat (limited to 'src/yuzu/main_window.cpp')
| -rw-r--r-- | src/yuzu/main_window.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index cffd9f4444..3ca6eaf99c 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -516,17 +516,17 @@ MainWindow::MainWindow(bool has_broken_vulkan) #ifdef ENABLE_UPDATE_CHECKER if (UISettings::values.check_for_updates) { - update_future = QtConcurrent::run([]() -> QString { + update_future = QtConcurrent::run([]() -> UpdateChecker::Update { const bool is_prerelease = ((strstr(Common::g_build_version, "pre-alpha") != NULL) || (strstr(Common::g_build_version, "alpha") != NULL) || (strstr(Common::g_build_version, "beta") != NULL) || (strstr(Common::g_build_version, "rc") != NULL)); - const std::optional<std::string> latest_release_tag = + const std::optional<UpdateChecker::Update> latest_release_tag = UpdateChecker::GetLatestRelease(is_prerelease); - if (latest_release_tag && latest_release_tag.value() != Common::g_build_version) { - return QString::fromStdString(latest_release_tag.value()); + if (latest_release_tag && latest_release_tag->tag != Common::g_build_version) { + return latest_release_tag.value(); } - return QString{}; + return UpdateChecker::Update{}; }); update_watcher.connect(&update_watcher, &QFutureWatcher<QString>::finished, this, &MainWindow::OnEmulatorUpdateAvailable); @@ -4020,8 +4020,8 @@ void MainWindow::OnCaptureScreenshot() { #ifdef ENABLE_UPDATE_CHECKER void MainWindow::OnEmulatorUpdateAvailable() { - QString version_string = update_future.result(); - if (version_string.isEmpty()) + UpdateChecker::Update version = update_future.result(); + if (version.tag.empty()) return; QMessageBox update_prompt(this); @@ -4030,14 +4030,14 @@ void MainWindow::OnEmulatorUpdateAvailable() { update_prompt.addButton(QMessageBox::Yes); update_prompt.addButton(QMessageBox::Ignore); update_prompt.setText( - tr("Download the %1 update?").arg(version_string)); + tr("Download %1?").arg(version.name)); update_prompt.exec(); if (update_prompt.button(QMessageBox::Yes) == update_prompt.clickedButton()) { auto const full_url = fmt::format("{}/{}/releases/tag/", std::string{Common::g_build_auto_update_website}, std::string{Common::g_build_auto_update_repo} ); - QDesktopServices::openUrl(QUrl(QString::fromStdString(full_url) + version_string)); + QDesktopServices::openUrl(QUrl(QString::fromStdString(full_url + version.tag))); } } #endif |
