Skip to content

Commit

Permalink
Fix RAM check
Browse files Browse the repository at this point in the history
  • Loading branch information
CADIndie committed Apr 5, 2024
1 parent 974540f commit 8e13402
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/pojlib/util/JREUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static int launchJavaVM(final Activity activity, final List<String> JVMAr
userArgs.add("-Xms" + API_V1.memoryValue + "M");
userArgs.add("-Xmx" + API_V1.memoryValue + "M");
} else {
if (API_V1.model.equals("Oculus Headset1")) {
if (API_V1.model.equals("Meta Quest Pro")) {
userArgs.add("-Xms" + 4096 + "M");
userArgs.add("-Xmx" + 4096 + "M");
} else {
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/pojlib/util/LoginHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,23 @@ public static MinecraftAccount getNewToken(Activity activity) {
try {
Set<IAccount> accounts = pca.getAccounts().join();
if (accounts.isEmpty()) {
System.out.println("Error!: QuestCraft account not set!");
Logger.getInstance().appendToLog("Error!: QuestCraft account not set!");
beginLogin(activity);
return null;
throw new RuntimeException("Error!: QuestCraft account not set!");
}
IAccount account = accounts.iterator().next();
future = pca.acquireTokenSilently(SilentParameters.builder(Set.of("XboxLive.SignIn", "XboxLive.offline_access"), account).build());
} catch (MalformedURLException e) {
Logger.getInstance().appendToLog(e.getMessage());
throw new RuntimeException(e);
}

try {
IAuthenticationResult res = future.get();
return MinecraftAccount.load(activity.getFilesDir() + "/accounts", res.accessToken(), String.valueOf(res.expiresOnDate().getTime()));
} catch (ExecutionException | InterruptedException e) {
Thread.currentThread().interrupt();
return null;
Logger.getInstance().appendToLog(e.getMessage());
throw new RuntimeException(e);
}
}

Expand Down

0 comments on commit 8e13402

Please sign in to comment.