Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions bbp/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
local bbp = {}

do
local osName = love.system.getOS()
if (osName ~= "Windows") and (osName ~= "OS X") then -- if Linux
local ffi = require("ffi")
ffi.cdef([[
char *getenv(const char *name);
int unsetenv(const char* name);
]])
LD_PRELOAD = ffi.string(ffi.C.getenv("LD_PRELOAD"))
ffi.C.unsetenv("LD_PRELOAD") -- we don't want lovely being injected into anything else
end
end

bbp.utils = require("bbp.utils")
bbp.gui = require("bbp.gui")
bbp.loader = require("bbp.loader")
Expand Down
2 changes: 1 addition & 1 deletion lovely/restart-game.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if BBP_doRestart then
elseif osName == "OS X" then
command = "open beatblock.app " .. launchArgs .. " &"
else -- assume Linux
command = "./beatblock " .. launchArgs .. " &"
command = string.format('LD_PRELOAD="%s" exec %s %s &', LD_PRELOAD, arg[-2], launchArgs)
end

love.window.close()
Expand Down