Skip to content

Commit

Permalink
ffiUtil: Allow silencing the SDL checks
Browse files Browse the repository at this point in the history
  • Loading branch information
NiLuJe committed May 19, 2021
1 parent ae7c6d9 commit 681b404
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ffi/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ function util.isPocketbook()
end

local haveSDL2 = nil

--- Returns true if SDL2
function util.haveSDL2()
local err
Expand Down Expand Up @@ -637,6 +636,12 @@ function util.isSDL()
return isSDL
end

--- Silence the SDL checks (solely for front's frontend/device.lua usage!)
function util.noSDL()
haveSDL2 = false
isSDL = false
end

--- Division with integer result.
function util.idiv(a, b)
local q = a/b
Expand Down

0 comments on commit 681b404

Please sign in to comment.