From cf324748985ee4a81cdee6ac188df3178a3c03a8 Mon Sep 17 00:00:00 2001 From: Brandon McGriff Date: Mon, 9 Nov 2020 16:06:09 -0800 Subject: [PATCH] Fixed libs/discordRPC.lua so Discord RPC loads on Linux. I changed how the library was loaded before, but turns out that way only worked on Windows. Changed it back to how it was, so it works on Linux for me, and presumably macOS. --- libs/discordRPC.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/discordRPC.lua b/libs/discordRPC.lua index 0d2af4d..6a21b8c 100644 --- a/libs/discordRPC.lua +++ b/libs/discordRPC.lua @@ -19,8 +19,12 @@ if string.sub(source, -5) == ".love" or love.filesystem.isFused() then source = love.filesystem.getSourceBaseDirectory() end -if osname == "Linux" or osname == "OS X" or osname == "Windows" then - discordRPClib = ffi.load(source.."/libs/discord-rpc") +if osname == "Linux" then + discordRPClib = ffi.load(source.."/libs/discord-rpc.so") +elseif osname == "OS X" then + discordRPClib = ffi.load(source.."/libs/discord-rpc.dylib") +elseif osname == "Windows" then + discordRPClib = ffi.load(source.."/libs/discord-rpc.dll") else -- Else it crashes later on error(string.format("Discord rpc not supported on platform (%s)", osname))