mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 09:29:03 -06:00
Merge pull request #3 from MyPasswordIsWeak/master
Fixed discord rpc not working on linux
This commit is contained in:
commit
69a5c0a21a
@ -1,5 +1,23 @@
|
||||
local ffi = require "ffi"
|
||||
local discordRPClib = ffi.load(love.filesystem.getSource().."/libs/discord-rpc")
|
||||
|
||||
|
||||
-- Get the host os to load correct lib
|
||||
local os = love.system.getOS()
|
||||
local discordRPClib = nil
|
||||
|
||||
|
||||
if os == "Linux" then
|
||||
discordRPClib = ffi.load(love.filesystem.getSource().."/libs/discord-rpc.so")
|
||||
elseif os == "OS X" then
|
||||
discordRPClib = ffi.load(love.filesystem.getSource().."/libs/discord-rpc.dylib")
|
||||
elseif os == "Windows" then
|
||||
discordRPClib = ffi.load(love.filesystem.getSource().."/libs/discord-rpc.dll")
|
||||
else
|
||||
-- Else it crashes later on
|
||||
discordRPClib = ffi.load(love.filesystem.getSource().."/libs/discord-rpc.e")
|
||||
print("Discord rpc not supported on platform")
|
||||
end
|
||||
|
||||
|
||||
ffi.cdef[[
|
||||
typedef struct DiscordRichPresence {
|
||||
|
Loading…
Reference in New Issue
Block a user