@ -330,10 +330,10 @@ function Input:init()
ev.code = ABS_X
ev.code = ABS_X
-- We always have to substract from the physical x,
-- We always have to substract from the physical x,
-- regardless of the orientation
-- regardless of the orientation
if ( Screen .width< Screen.height ) then
if ( Screen : getWidth ( ) < Screen : getHeight ( ) ) then
ev.value = Screen .width - ev.value
ev.value = Screen : getWidth ( ) - ev.value
else
else
ev.value = Screen .height - ev.value
ev.value = Screen : getHeight ( ) - ev.value
end
end
end
end
-- same thing for multitouch events (phoenix)
-- same thing for multitouch events (phoenix)
@ -343,10 +343,10 @@ function Input:init()
ev.code = ABS_MT_POSITION_X
ev.code = ABS_MT_POSITION_X
-- We always have to substract from the physical x,
-- We always have to substract from the physical x,
-- regardless of the orientation
-- regardless of the orientation
if ( Screen .width< Screen.height ) then
if ( Screen : getWidth ( ) < Screen : getHeight ( ) ) then
ev.value = Screen .width - ev.value
ev.value = Screen : getWidth ( ) - ev.value
else
else
ev.value = Screen .height - ev.value
ev.value = Screen : getHeight ( ) - ev.value
end
end
end
end
end
end
@ -359,10 +359,10 @@ function Input:init()
if ev.code == ABS_X then
if ev.code == ABS_X then
-- We always have to substract from the physical x,
-- We always have to substract from the physical x,
-- regardless of the orientation
-- regardless of the orientation
if ( Screen .width< Screen.height ) then
if ( Screen : getWidth ( ) < Screen : getHeight ( ) ) then
ev.value = Screen .width - ev.value
ev.value = Screen : getWidth ( ) - ev.value
else
else
ev.value = Screen .height - ev.value
ev.value = Screen : getHeight ( ) - ev.value
end
end
end
end
return ev
return ev