mirror of
https://github.com/koreader/koreader
synced 2024-11-16 06:12:56 +00:00
3066c86e38
This is a major overhaul of the hardware abstraction layer. A few notes: General platform distinction happens in frontend/device.lua which will delegate everything else to frontend/device/<platform_name>/device.lua which should extend frontend/device/generic/device.lua Screen handling is implemented in frontend/device/screen.lua which includes the *functionality* to support device specifics. Actually setting up the device specific functionality, however, is done in the device specific setup code in the relevant device.lua file. The same goes for input handling.
24 lines
629 B
Lua
24 lines
629 B
Lua
require "defaults"
|
|
package.path = "?.lua;common/?.lua;frontend/?.lua;" .. package.path
|
|
package.cpath = "?.so;common/?.so;/usr/lib/lua/?.so;" .. package.cpath
|
|
|
|
-- global reader settings
|
|
local DocSettings = require("docsettings")
|
|
G_reader_settings = DocSettings:open(".reader")
|
|
|
|
-- global einkfb for Screen (do not show SDL window)
|
|
einkfb = require("ffi/framebuffer")
|
|
einkfb.dummy = true
|
|
|
|
-- init output device
|
|
local Screen = require("device").screen
|
|
Screen:init()
|
|
|
|
-- init input device (do not show SDL window)
|
|
local Input = require("device").input
|
|
Input.dummy = true
|
|
|
|
-- turn on debug
|
|
local DEBUG = require("dbg")
|
|
DEBUG:turnOn()
|