mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fixed Landscape input handling.
This commit is contained in:
@@ -323,8 +323,14 @@ function Input:init()
|
||||
if ev.code == ABS_X then
|
||||
ev.code = ABS_Y
|
||||
elseif ev.code == ABS_Y then
|
||||
ev.code = ABS_X
|
||||
ev.value = Screen.width - ev.value
|
||||
ev.code = ABS_X
|
||||
-- We always have to substract from the physical x,
|
||||
-- regardless of the orientation
|
||||
if (Screen.width<Screen.height) then
|
||||
ev.value = Screen.width - ev.value
|
||||
else
|
||||
ev.value = Screen.height - ev.value
|
||||
end
|
||||
end
|
||||
end
|
||||
return ev
|
||||
|
||||
Reference in New Issue
Block a user