mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Add support for Pocketbook Color Lux (#4212)
* Pocketbook Color Lux detection * fix rotation for Pocketbook Color Lux * deal with 24bit RGB framebuffer that are reported as 8bit * use default DPI for Pocketbook Color Lux * bump base
This commit is contained in:
committed by
Frans de Jonge
parent
6cf0a6473f
commit
1e275fdc4f
2
base
2
base
Submodule base updated: 746010975e...0e7a6dcfb5
@@ -46,6 +46,11 @@ local Device = {
|
||||
isAlwaysPortrait = no,
|
||||
-- needs full screen refresh when resumed from screensaver?
|
||||
needsScreenRefreshAfterResume = yes,
|
||||
|
||||
-- set to yes on devices whose framebuffer reports 8bit per pixel,
|
||||
-- but is actually a color eInk screen with 24bit per pixel.
|
||||
-- The refresh is still based on bytes. (This solves issue #4193.)
|
||||
has3BytesWideFrameBuffer = no,
|
||||
}
|
||||
|
||||
function Device:new(o)
|
||||
|
||||
@@ -106,6 +106,12 @@ function PocketBook:init()
|
||||
end
|
||||
end)
|
||||
|
||||
-- fix rotation for Color Lux device
|
||||
if PocketBook:getDeviceModel() == "PocketBook Color Lux" then
|
||||
self.screen.blitbuffer_rotation_mode = 0
|
||||
self.screen.native_rotation_mode = 0
|
||||
end
|
||||
|
||||
os.remove(self.emu_events_dev)
|
||||
os.execute("mkfifo " .. self.emu_events_dev)
|
||||
self.input.open(self.emu_events_dev, 1)
|
||||
@@ -203,6 +209,17 @@ local PocketBook740 = PocketBook:new{
|
||||
emu_events_dev = "/var/dev/shm/emu_events",
|
||||
}
|
||||
|
||||
-- PocketBook Color Lux
|
||||
local PocketBookColorLux = PocketBook:new{
|
||||
isTouchDevice = yes,
|
||||
hasKeys = yes,
|
||||
hasFrontlight = yes,
|
||||
hasColorScreen = yes,
|
||||
has3BytesWideFrameBuffer = yes,
|
||||
isAlwaysPortrait = no,
|
||||
emu_events_dev = "/var/dev/shm/emu_events",
|
||||
}
|
||||
|
||||
logger.info('SoftwareVersion: ', PocketBook:getSoftwareVersion())
|
||||
|
||||
local codename = PocketBook:getDeviceModel()
|
||||
@@ -219,6 +236,8 @@ elseif codename == "PocketBook 623" then
|
||||
return PocketBook623
|
||||
elseif codename == "PB740" then
|
||||
return PocketBook740
|
||||
elseif codename == "PocketBook Color Lux" then
|
||||
return PocketBookColorLux
|
||||
else
|
||||
error("unrecognized PocketBook model " .. codename)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user