Skip to content

Commit

Permalink
Kindle: Unbreak wait_for_update_submission ioctl on Carta+
Browse files Browse the repository at this point in the history
Regression since #1386

Fix koreader/koreader#8014
  • Loading branch information
NiLuJe committed Jul 24, 2021
1 parent 4a507ff commit e1e89dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ffi/framebuffer_mxcfb.lua
Expand Up @@ -50,6 +50,7 @@ local framebuffer = {
-- We recycle ffi cdata
marker_data = nil,
update_data = nil,
submission_data = nil,
}

--[[ refresh list management: --]]
Expand Down Expand Up @@ -227,9 +228,9 @@ end
-- Kindle's MXCFB_WAIT_FOR_UPDATE_SUBMISSION == 0x40044637
local function kindle_mxc_wait_for_update_submission(fb, marker)
-- Wait for a specific update to be submitted
fb.marker_data[0] = marker
fb.submission_data[0] = marker
return C.ioctl(fb.fd, C.MXCFB_WAIT_FOR_UPDATE_SUBMISSION, fb.marker_data)
return C.ioctl(fb.fd, C.MXCFB_WAIT_FOR_UPDATE_SUBMISSION, fb.submission_data)
end
-- Stub version that simply sleeps for 1ms
Expand Down Expand Up @@ -701,6 +702,9 @@ function framebuffer:init()
-- On a slightly related note, the EPDC_FLAG_TEST_COLLISION flag is for dry-run collision tests, never set it.
self.marker_data.collision_test = 0
end
if self.mech_wait_update_submission == kindle_mxc_wait_for_update_submission then
self.submission_data = ffi.new("uint32_t[1]")
end
elseif self.device:isKobo() then
require("ffi/mxcfb_kobo_h")
Expand Down

0 comments on commit e1e89dd

Please sign in to comment.