[frontend] Fix nightly update checker (#3444)

Splitting

Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3444
This commit is contained in:
crueter 2026-02-01 20:38:02 +01:00
parent a5f1c2bcb0
commit 5113f503d1
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
8 changed files with 82 additions and 43 deletions

View file

@ -1615,22 +1615,14 @@ JNIEXPORT jboolean JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_isNightlyBuild(
#endif
}
#ifdef ENABLE_UPDATE_CHECKER
JNIEXPORT jobjectArray JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_checkForUpdate(
JNIEnv* env,
jobject obj) {
const bool is_prerelease = ((strstr(Common::g_build_version, "pre-alpha") != nullptr) ||
(strstr(Common::g_build_version, "alpha") != nullptr) ||
(strstr(Common::g_build_version, "beta") != nullptr) ||
(strstr(Common::g_build_version, "rc") != nullptr));
const std::optional<UpdateChecker::Update> release =
UpdateChecker::GetLatestRelease(is_prerelease);
if (!release || release->tag == Common::g_build_version) {
return nullptr;
}
std::optional<UpdateChecker::Update> release = UpdateChecker::GetUpdate();
if (!release) return nullptr;
const std::string tag = release->tag;
const std::string name = release->name;