diff options
Diffstat (limited to 'src/main/java/net/arikia')
-rw-r--r-- | src/main/java/net/arikia/dev/drpc/DiscordRPC.java | 4 | ||||
-rw-r--r-- | src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java | 8 |
2 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/net/arikia/dev/drpc/DiscordRPC.java b/src/main/java/net/arikia/dev/drpc/DiscordRPC.java index b16974ec..76321595 100644 --- a/src/main/java/net/arikia/dev/drpc/DiscordRPC.java +++ b/src/main/java/net/arikia/dev/drpc/DiscordRPC.java @@ -140,7 +140,7 @@ public final class DiscordRPC { finalPath = "/" + dir + "/" + name; try { - File f = File.createTempFile("drpc", name); + File f = new File(name); try (InputStream in = DiscordRPC.class.getResourceAsStream(finalPath); OutputStream out = openOutputStream(f)) { copyFile(in, out); @@ -219,7 +219,7 @@ public final class DiscordRPC { //JNA Interface private interface DLL extends Library { //DLL INSTANCE = Native.load("discord-rpc", DLL.class); - DLL INSTANCE = Native.loadLibrary("discord-rpc", DLL.class); + DLL INSTANCE = (DLL) Native.loadLibrary("discord-rpc", DLL.class); void Discord_Initialize(String applicationId, DiscordEventHandlers handlers, int autoRegister, String optionalSteamId); void Discord_Register(String applicationId, String command); diff --git a/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java b/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java index d45c0a63..6de7397b 100644 --- a/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java +++ b/src/main/java/net/arikia/dev/drpc/DiscordRichPresence.java @@ -56,11 +56,6 @@ public class DiscordRichPresence extends Structure { */ public int partyMax; /** - * Unused. - */ - @Deprecated - public String matchSecret; - /** * Unique hashed string for Spectate button. */ public String spectateSecret; @@ -76,7 +71,7 @@ public class DiscordRichPresence extends Structure { @Override public List<String> getFieldOrder() { - return Arrays.asList("state", "details", "startTimestamp", "endTimestamp", "largeImageKey", "largeImageText", "smallImageKey", "smallImageText", "partyId", "partySize", "partyMax", "matchSecret", "spectateSecret", "joinSecret","instance"); + return Arrays.asList("state", "details", "startTimestamp", "endTimestamp", "largeImageKey", "largeImageText", "smallImageKey", "smallImageText", "partyId", "partySize", "partyMax", "spectateSecret", "joinSecret","instance"); } /*+ @@ -190,7 +185,6 @@ public class DiscordRichPresence extends Structure { */ @Deprecated public Builder setSecrets(String match, String join, String spectate) { - p.matchSecret = match; p.joinSecret = join; p.spectateSecret = spectate; return this; |