Skip to content

Commit

Permalink
Make dithering toggles more flexible (#1150)
Browse files Browse the repository at this point in the history
  • Loading branch information
NiLuJe committed Jul 23, 2020
1 parent fac6e7c commit ac608de
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions ffi/framebuffer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,24 @@ function fb:toggleNightMode()
end
end

function fb:toggleHWDithering()
self.hw_dithering = not self.hw_dithering
function fb:toggleHWDithering(toggle)
if toggle == true then
self.hw_dithering = true
elseif toggle == false then
self.hw_dithering = false
else
self.hw_dithering = not self.hw_dithering
end
end

function fb:toggleSWDithering()
self.sw_dithering = not self.sw_dithering
function fb:toggleSWDithering(toggle)
if toggle == true then
self.sw_dithering = true
elseif toggle == false then
self.sw_dithering = false
else
self.sw_dithering = not self.sw_dithering
end
end

function fb:setupDithering()
Expand Down

0 comments on commit ac608de

Please sign in to comment.