mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
input: fix loading of fbink_input
library (#12560)
The library is versioned.
This commit is contained in:
parent
a1edbbf0c4
commit
d98fe14ba8
@ -476,8 +476,9 @@ end
|
||||
|
||||
function Kindle:openInputDevices()
|
||||
-- Auto-detect input devices (via FBInk's fbink_input_scan)
|
||||
local ok, FBInkInput = pcall(ffi.loadlib, "fbink_input")
|
||||
local ok, FBInkInput = pcall(ffi.loadlib, "fbink_input", 1)
|
||||
if not ok then
|
||||
print("fbink_input not loaded:", FBInkInput)
|
||||
-- NOP fallback for the testsuite...
|
||||
FBInkInput = { fbink_input_scan = function() end }
|
||||
end
|
||||
|
@ -862,8 +862,9 @@ function Kobo:init()
|
||||
self:initEventAdjustHooks()
|
||||
|
||||
-- Auto-detect input devices (via FBInk's fbink_input_scan)
|
||||
local ok, FBInkInput = pcall(ffi.loadlib, "fbink_input")
|
||||
local ok, FBInkInput = pcall(ffi.loadlib, "fbink_input", 1)
|
||||
if not ok then
|
||||
print("fbink_input not loaded:", FBInkInput)
|
||||
-- NOP fallback for the testsuite...
|
||||
FBInkInput = { fbink_input_scan = NOP }
|
||||
end
|
||||
|
@ -291,7 +291,7 @@ end)
|
||||
local function findKeyboards()
|
||||
local keyboards = {}
|
||||
|
||||
local FBInkInput = ffi.loadlib("fbink_input")
|
||||
local FBInkInput = ffi.loadlib("fbink_input", 1)
|
||||
local dev_count = ffi.new("size_t[1]")
|
||||
local devices = FBInkInput.fbink_input_scan(C.INPUT_KEYBOARD, 0, 0, dev_count)
|
||||
if devices ~= nil then
|
||||
@ -312,7 +312,7 @@ end
|
||||
local function checkKeyboard(path)
|
||||
local keyboard
|
||||
|
||||
local FBInkInput = ffi.loadlib("fbink_input")
|
||||
local FBInkInput = ffi.loadlib("fbink_input", 1)
|
||||
local dev = FBInkInput.fbink_input_check(path, C.INPUT_KEYBOARD, 0, 0)
|
||||
if dev ~= nil then
|
||||
if dev.matched then
|
||||
|
Loading…
Reference in New Issue
Block a user