Skip to content

Commit

Permalink
Don't use HW dithering on Kindles where it doesn't work (#1043)
Browse files Browse the repository at this point in the history
Followup to #1039
  • Loading branch information
NiLuJe authored Feb 9, 2020
1 parent 84f56d3 commit dc65873
Showing 1 changed file with 5 additions and 4 deletions.
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

0 comments on commit dc65873

Please sign in to comment.