This commit is contained in:
Anuken
2025-11-16 23:23:24 -05:00
parent 5397d8426c
commit 45e744949e
2 changed files with 14 additions and 12 deletions
@@ -118,17 +118,19 @@ public class DesktopLauncher extends ClientLauncher{
testMobile = Seq.with(args).contains("-testMobile"); testMobile = Seq.with(args).contains("-testMobile");
if(useDiscord){ if(useDiscord){
try{ Threads.daemon(() -> {
DiscordRPC.connect(discordID); try{
Log.info("Initialized Discord rich presence."); DiscordRPC.connect(discordID);
Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close)); Log.info("Initialized Discord rich presence.");
}catch(NoDiscordClientException none){ Runtime.getRuntime().addShutdownHook(new Thread(DiscordRPC::close));
//don't log if no client is found }catch(NoDiscordClientException none){
useDiscord = false; //don't log if no client is found
}catch(Throwable t){ useDiscord = false;
useDiscord = false; }catch(Throwable t){
Log.warn("Failed to initialize Discord RPC - you are likely using a JVM <16."); useDiscord = false;
} Log.warn("Failed to initialize Discord RPC - you are likely using a JVM <16.");
}
});
} }
if(useSteam){ if(useSteam){
+1 -1
View File
@@ -26,4 +26,4 @@ org.gradle.caching=true
org.gradle.internal.http.socketTimeout=100000 org.gradle.internal.http.socketTimeout=100000
org.gradle.internal.http.connectionTimeout=100000 org.gradle.internal.http.connectionTimeout=100000
android.enableR8.fullMode=false android.enableR8.fullMode=false
archash=9b4648505a archash=65d654d634