mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 11:29:02 -06:00
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.
This commit is contained in:
parent
6a295cad59
commit
cf32474898
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user