diff --git a/.github/build/extraLibs/Linux/libdiscord-rpc.so b/.github/build/extraLibs/Linux/libdiscord-rpc.so new file mode 100644 index 00000000..188d4e84 Binary files /dev/null and b/.github/build/extraLibs/Linux/libdiscord-rpc.so differ diff --git a/Zenitha b/Zenitha index b56897cd..c3c46421 160000 --- a/Zenitha +++ b/Zenitha @@ -1 +1 @@ -Subproject commit b56897cdfa20a0a7f044398201e5c1f8b2bc6417 +Subproject commit c3c464215a33f5b2546075a084c06dbcc0f8e098 diff --git a/assets/discordRPC.lua b/assets/discordRPC.lua index 39b01239..9a3bfc71 100644 --- a/assets/discordRPC.lua +++ b/assets/discordRPC.lua @@ -54,13 +54,8 @@ end local ffi=require"ffi" local Cname -if SYSTEM=='Windows' then - local suc - suc,Cname=pcall(ffi.load,"discord-rpc") - if not (suc and Cname) then - MSG.errorLog("Loading Discord-RPC lib: "..Cname) - Cname=nil - end +if SYSTEM=='Windows' or SYSTEM=='Linux' then + Cname=LOADFFI('discord-rpc') elseif MOBILE then LOG("warn",STRING.repD("No Discord-RPC for $1",SYSTEM)) else diff --git a/assets/fmod20221/init.lua b/assets/fmod20221/init.lua index c813354c..75c1a2f1 100644 --- a/assets/fmod20221/init.lua +++ b/assets/fmod20221/init.lua @@ -12,7 +12,6 @@ if SYSTEM=='Web' then }) end -local ffi=require'ffi' local require=simpRequire(((...):gsub(".init$","")..".")) require'cdef' @@ -29,28 +28,8 @@ M.banks={} -- M.C=ffi.load(fmodPath) -- M.C2=ffi.load(fmodstudioPath) -local path='$1' - -if STRING.sArg(_G.arg[2] or '','--project') then path=love.filesystem.getSaveDirectory().."/lib/lib$1.so" end - -do -- Load library - local suc - suc,M.C=pcall(ffi.load,STRING.repD(path,'fmod')) - if not suc then - MSG.errorLog("Loading FMOD lib:"..M.C) - M.C=nil - elseif not M.C then - MSG.errorLog("Loaded an empty FMOD lib") - end - - suc,M.C2=pcall(ffi.load,STRING.repD(path,'fmodstudio')) - if not suc then - MSG.errorLog("Loading FMODstudio lib:"..M.C2) - M.C2=nil - elseif not M.C2 then - MSG.errorLog("Loaded an empty FMODstudio lib") - end -end +M.C=LOADFFI('fmod') +M.C2=LOADFFI('fmodstudio') if M.C and M.C2 then require'enums'