Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure HW dithering won't be requested on Kindles where it doesn't #1043

Merged
merged 1 commit into from
Feb 9, 2020
Merged
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
9 changes: 5 additions & 4 deletions ffi/framebuffer_mxcfb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ local function refresh_zelda(fb, refreshtype, waveform_mode, x, y, w, h, dither)
end
-- NOTE: Since there's no longer a distinction between GC16_FAST & GC16, we're done!
refarea[0].temp = C.TEMP_USE_AMBIENT
-- Did we request HW dithering?
if dither then
-- Did we request HW dithering on a device where it works?
if dither and fb.device:canHWDither() then
refarea[0].dither_mode = C.EPDC_FLAG_USE_DITHERING_ORDERED
if waveform_mode == C.WAVEFORM_MODE_DU then
refarea[0].quant_bit = 1;
Expand Down Expand Up @@ -392,8 +392,8 @@ local function refresh_rex(fb, refreshtype, waveform_mode, x, y, w, h, dither)
end
-- NOTE: Since there's no longer a distinction between GC16_FAST & GC16, we're done!
refarea[0].temp = C.TEMP_USE_AMBIENT
-- Did we request HW dithering?
if dither then
-- Did we request HW dithering on a device where it works?
if dither and fb.device:canHWDither() then
refarea[0].dither_mode = C.EPDC_FLAG_USE_DITHERING_ORDERED
if waveform_mode == C.WAVEFORM_MODE_DU then
refarea[0].quant_bit = 1;
Expand Down Expand Up @@ -587,6 +587,7 @@ function framebuffer:init()
elseif self.device.model == "KindleBasic3" then
isRex = true
-- NOTE: Apparently, the KT4 doesn't actually support the fancy nightmode waveforms, c.f., ko/#5076
-- It also doesn't handle HW dithering, c.f., base/#1039
isNightModeChallenged = true
end

Expand Down