mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-21 09:01:56 -07:00
Fix: handle latest-release/snapshot version id
This commit is contained in:
parent
37408f03dc
commit
cc142fff20
2 changed files with 5 additions and 6 deletions
|
|
@ -334,7 +334,7 @@ public class MainActivity extends BaseActivity {
|
|||
JREUtils.redirectAndPrintJRELog();
|
||||
|
||||
LauncherProfiles.update();
|
||||
Tools.launchMinecraft(this, mProfile, minecraftProfile);
|
||||
Tools.launchMinecraft(this, mProfile, minecraftProfile, mVersionInfo);
|
||||
}
|
||||
|
||||
private void checkJavaArgsIsLaunchable(String jreVersion) throws Throwable {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,8 @@ public final class Tools {
|
|||
}
|
||||
|
||||
|
||||
public static void launchMinecraft(final Activity activity, MinecraftAccount minecraftAccount, MinecraftProfile minecraftProfile) throws Throwable {
|
||||
public static void launchMinecraft(final Activity activity, MinecraftAccount minecraftAccount,
|
||||
MinecraftProfile minecraftProfile, JMinecraftVersionList.Version versionInfo) throws Throwable {
|
||||
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo();
|
||||
((ActivityManager)activity.getSystemService(Context.ACTIVITY_SERVICE)).getMemoryInfo(mi);
|
||||
if(LauncherPreferences.PREF_RAM_ALLOCATION > (mi.availMem/1048576L)) {
|
||||
|
|
@ -127,8 +128,6 @@ public final class Tools {
|
|||
}
|
||||
}
|
||||
|
||||
JMinecraftVersionList.Version versionInfo = Tools.getVersionInfo(minecraftProfile.lastVersionId);
|
||||
|
||||
LauncherProfiles.update();
|
||||
String gamedirPath = Tools.getGameDirPath(minecraftProfile);
|
||||
|
||||
|
|
@ -143,7 +142,7 @@ public final class Tools {
|
|||
OldVersionsUtils.selectOpenGlVersion(versionInfo);
|
||||
|
||||
|
||||
String launchClassPath = generateLaunchClassPath(versionInfo, minecraftProfile.lastVersionId);
|
||||
String launchClassPath = generateLaunchClassPath(versionInfo, versionInfo.id);
|
||||
|
||||
List<String> javaArgList = new ArrayList<String>();
|
||||
|
||||
|
|
@ -169,7 +168,7 @@ public final class Tools {
|
|||
}
|
||||
javaArgList.add("-Dlog4j.configurationFile=" + configFile);
|
||||
}
|
||||
javaArgList.addAll(Arrays.asList(getMinecraftJVMArgs(minecraftProfile.lastVersionId, gamedirPath)));
|
||||
javaArgList.addAll(Arrays.asList(getMinecraftJVMArgs(versionInfo.id, gamedirPath)));
|
||||
javaArgList.add("-cp");
|
||||
javaArgList.add(getLWJGL3ClassPath() + ":" + launchClassPath);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue