diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/rpc/RichPresenceManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/kr/syeyoung/dungeonsguide/rpc/RichPresenceManager.java b/src/main/java/kr/syeyoung/dungeonsguide/rpc/RichPresenceManager.java index c50e436e..e19a6fad 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/rpc/RichPresenceManager.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/rpc/RichPresenceManager.java @@ -67,6 +67,7 @@ public class RichPresenceManager implements Runnable { public int setup() { if (iDiscordCore != null) { iDiscordCore.Destroy.destroy(iDiscordCore); + iDiscordCore = null; activityManager = null; callbacks = null; relation_callbacks = null; relationMap.clear(); } @@ -226,8 +227,10 @@ public class RichPresenceManager implements Runnable { while(!Thread.interrupted()) { try { if (iDiscordCore == null || setup) { + long lastSetup = lastSetupCode; lastSetupCode = setup(); - System.out.println("Discord returned "+lastSetupCode+" for setup "+EDiscordResult.fromValue(lastSetupCode)); + if (lastSetup != lastSetupCode) + System.out.println("Discord returned "+lastSetupCode+" for setup "+EDiscordResult.fromValue(lastSetupCode)); setup = lastSetupCode != EDiscordResult.DiscordResult_Ok.getValue(); counter = 0; } else { |