mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01:00
Remove DRCOUNTMAX (#5644)
This commit is contained in:
@@ -12,7 +12,6 @@ read_globals = {
|
|||||||
"ANDROID_FONT_DIR",
|
"ANDROID_FONT_DIR",
|
||||||
"KOBO_TOUCH_MIRRORED",
|
"KOBO_TOUCH_MIRRORED",
|
||||||
"KOBO_SYNC_BRIGHTNESS_WITH_NICKEL",
|
"KOBO_SYNC_BRIGHTNESS_WITH_NICKEL",
|
||||||
"DRCOUNTMAX",
|
|
||||||
"DHINTCOUNT",
|
"DHINTCOUNT",
|
||||||
"DFULL_SCREEN",
|
"DFULL_SCREEN",
|
||||||
"DSCROLL_MODE",
|
"DSCROLL_MODE",
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
-- number of page turns between full screen refresh
|
-- number of page turns between full screen refresh
|
||||||
-- default to do a full refresh on every 6 page turns
|
-- default to do a full refresh on every 6 page turns
|
||||||
DRCOUNTMAX = 6
|
-- no longer needed
|
||||||
|
--DRCOUNTMAX = 6
|
||||||
|
|
||||||
-- number of pages for hinting
|
-- number of pages for hinting
|
||||||
-- default to pre-rendering 1 page
|
-- default to pre-rendering 1 page
|
||||||
|
|||||||
@@ -13,12 +13,13 @@ local Input = Device.input
|
|||||||
local Screen = Device.screen
|
local Screen = Device.screen
|
||||||
|
|
||||||
local MILLION = 1000000
|
local MILLION = 1000000
|
||||||
|
local DEFAULT_FULL_REFRESH_COUNT = 6
|
||||||
|
|
||||||
-- there is only one instance of this
|
-- there is only one instance of this
|
||||||
local UIManager = {
|
local UIManager = {
|
||||||
-- trigger a full refresh when counter reaches FULL_REFRESH_COUNT
|
-- trigger a full refresh when counter reaches FULL_REFRESH_COUNT
|
||||||
FULL_REFRESH_COUNT =
|
FULL_REFRESH_COUNT =
|
||||||
G_reader_settings:readSetting("full_refresh_count") or DRCOUNTMAX,
|
G_reader_settings:readSetting("full_refresh_count") or DEFAULT_FULL_REFRESH_COUNT,
|
||||||
refresh_count = 0,
|
refresh_count = 0,
|
||||||
|
|
||||||
-- How long to wait between ZMQ wakeups: 50ms.
|
-- How long to wait between ZMQ wakeups: 50ms.
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ describe("defaults module", function()
|
|||||||
|
|
||||||
it("should load all defaults from defaults.lua", function()
|
it("should load all defaults from defaults.lua", function()
|
||||||
Defaults:init()
|
Defaults:init()
|
||||||
assert.is_same(110, #Defaults.defaults_name)
|
assert.is_same(109, #Defaults.defaults_name)
|
||||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@@ -20,13 +20,13 @@ describe("defaults module", function()
|
|||||||
Defaults.changed[20] = true
|
Defaults.changed[20] = true
|
||||||
Defaults.changed[47] = true
|
Defaults.changed[47] = true
|
||||||
Defaults.changed[55] = true
|
Defaults.changed[55] = true
|
||||||
Defaults.changed[89] = true
|
Defaults.changed[88] = true
|
||||||
Defaults.changed[105] = true
|
Defaults.changed[104] = true
|
||||||
Defaults:saveSettings()
|
Defaults:saveSettings()
|
||||||
assert.is_same(110, #Defaults.defaults_name)
|
assert.is_same(109, #Defaults.defaults_name)
|
||||||
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
assert.is_same("DFULL_SCREEN", Defaults.defaults_name[55])
|
||||||
assert.is_same("SEARCH_LIBRARY_PATH", Defaults.defaults_name[105])
|
assert.is_same("SEARCH_LIBRARY_PATH", Defaults.defaults_name[104])
|
||||||
assert.is_same("DTAP_ZONE_BACKWARD", Defaults.defaults_name[89])
|
assert.is_same("DTAP_ZONE_BACKWARD", Defaults.defaults_name[88])
|
||||||
assert.is_same("DCREREADER_CONFIG_WORD_GAP_LARGE", Defaults.defaults_name[47])
|
assert.is_same("DCREREADER_CONFIG_WORD_GAP_LARGE", Defaults.defaults_name[47])
|
||||||
assert.is_same("DCREREADER_CONFIG_H_MARGIN_SIZES_XXX_LARGE", Defaults.defaults_name[20])
|
assert.is_same("DCREREADER_CONFIG_H_MARGIN_SIZES_XXX_LARGE", Defaults.defaults_name[20])
|
||||||
local fd = io.open(persistent_filename, "r")
|
local fd = io.open(persistent_filename, "r")
|
||||||
@@ -53,8 +53,8 @@ DFULL_SCREEN = 1
|
|||||||
Defaults:init()
|
Defaults:init()
|
||||||
Defaults.changed[55] = true
|
Defaults.changed[55] = true
|
||||||
Defaults.defaults_value[55] = 2
|
Defaults.defaults_value[55] = 2
|
||||||
Defaults.changed[89] = true
|
Defaults.changed[88] = true
|
||||||
Defaults.defaults_value[89] = {
|
Defaults.defaults_value[88] = {
|
||||||
y = 10,
|
y = 10,
|
||||||
x = 10.125,
|
x = 10.125,
|
||||||
h = 20.25,
|
h = 20.25,
|
||||||
|
|||||||
Reference in New Issue
Block a user