Skip to content

Commit

Permalink
[SCL 3.22 Beta 5] See commit desc for changelog
Browse files Browse the repository at this point in the history
- Add warning message for 32bit device users
- Set default version to 1.12.2 not 1.7.10
  • Loading branch information
SolDev69 committed Apr 3, 2024
1 parent 1098f96 commit e2b8b64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app_pojavlauncher/src/main/assets/launcher_profiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"(Default)": {
"name": "(Default)",
"lastVersionId": "1.7.10"
"lastVersionId": "1.12.2"
}
},
"selectedProfile": "(Default)"
Expand Down
12 changes: 12 additions & 0 deletions app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/Tools.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,18 @@ public static void initContextConstants(Context ctx){
public static void launchMinecraft(final AppCompatActivity activity, MinecraftAccount minecraftAccount,
MinecraftProfile minecraftProfile, String versionId, int versionJavaRequirement) throws Throwable {
int freeDeviceMemory = getFreeDeviceMemory(activity);
if(Architecture.is32BitsDevice())
{
LifecycleAwareAlertDialog.DialogCreator dialogCreator = (dialog, builder) ->
builder.setMessage("Warning: using a 32bit device is no longer supported in modern versions, updates after 1.20.4 (24w13a/24w14potato) will not work!")
.setPositiveButton(android.R.string.ok, (d, w)->{});

if(LifecycleAwareAlertDialog.haltOnDialog(activity.getLifecycle(), activity, dialogCreator)) {
versionId = "1.12.2"
}
}


if(LauncherPreferences.PREF_RAM_ALLOCATION > freeDeviceMemory) {
LifecycleAwareAlertDialog.DialogCreator dialogCreator = (dialog, builder) ->
builder.setMessage(activity.getString(R.string.memory_warning_msg, freeDeviceMemory, LauncherPreferences.PREF_RAM_ALLOCATION))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class MinecraftAccount {
public String clientToken = "0"; // clientID: refresh and invalidate
public String profileId = "00000000-0000-0000-0000-000000000000"; // profile UUID, for obtaining skin
public String username = "Steve";
public String selectedVersion = "1.7.10";
public String selectedVersion = "1.12.2";
public boolean isMicrosoft = false;
public String msaRefreshToken = "0";
public String xuid;
Expand Down Expand Up @@ -82,7 +82,7 @@ public static MinecraftAccount load(String name) {
acc.username = "0";
}
if (acc.selectedVersion == null) {
acc.selectedVersion = "1.7.10";
acc.selectedVersion = "1.12.2";
}
if (acc.msaRefreshToken == null) {
acc.msaRefreshToken = "0";
Expand Down

0 comments on commit e2b8b64

Please sign in to comment.