From b2dfcb95009fce03fab8189ddced25915b11efb6 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 25 Apr 2025 17:40:18 -0400 Subject: [PATCH] v3.1.0: Fixed github updates checking Android API on desktop --- .../shatteredpixeldungeon/services/updates/GitHubUpdates.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java b/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java index 582668dd3..ca778c481 100644 --- a/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java +++ b/services/updates/githubUpdates/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/updates/GitHubUpdates.java @@ -68,7 +68,7 @@ public class GitHubUpdates extends UpdateService { public void handleHttpResponse(Net.HttpResponse httpResponse) { try { Bundle latestRelease = null; - int latestVersionCode = Game.versionCode; + int latestVersionCode = Game.versionCode-10; for (Bundle b : Bundle.read( httpResponse.getResultAsStream() ).getBundleArray()){ Matcher m = versionCodePattern.matcher(b.getString("body")); @@ -86,7 +86,7 @@ public class GitHubUpdates extends UpdateService { continue; // or that aren't compatible - } else if (DeviceCompat.isDesktop()){ + } else if (DeviceCompat.isAndroid()){ Matcher minAndroid = minAndroidPattern.matcher(b.getString("body")); if (minAndroid.find() && DeviceCompat.getPlatformVersion() < Integer.parseInt(minAndroid.group(1))){ continue;