From d0ffb0948994cad65c503a33c91e447bb75cc7b1 Mon Sep 17 00:00:00 2001 From: Qingping Hou Date: Sun, 3 Feb 2013 04:47:34 +0800 Subject: [PATCH] fix adjustGesCoordinate --- frontend/ui/screen.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/ui/screen.lua b/frontend/ui/screen.lua index 5eaa09c08..3f5d7bfdd 100644 --- a/frontend/ui/screen.lua +++ b/frontend/ui/screen.lua @@ -68,6 +68,8 @@ function Screen:refresh(refesh_type) self.fb.bb:blitFrom(self.bb, 0, 0, 0, 0, self.width, self.height) elseif self.native_rotation_mode == 0 and self.cur_rotation_mode == 1 then self.fb.bb:blitFromRotate(self.bb, 270) + elseif self.native_rotation_mode == 1 and self.cur_rotation_mode == 0 then + self.fb.bb:blitFromRotate(self.bb, 90) end self.fb:refresh(refesh_type) end @@ -139,7 +141,7 @@ function Screen:adjustGesCoordinate(ges) return ges end - if self.native_rotation_mode == 0 and self.cur_rotation_mode == 1 then + if self.cur_rotation_mode == 1 then ges.pos.x, ges.pos.y = (self.width - ges.pos.y), (ges.pos.x) end