From 819fece802634a629d1442b532758d2d62e7fa71 Mon Sep 17 00:00:00 2001 From: chrox Date: Fri, 3 Jan 2014 23:38:47 +0800 Subject: [PATCH] add DLANDSCAPE_CLOCKWISE_ROTATION option in defaults.lua --- defaults.lua | 4 ++++ frontend/ui/device/screen.lua | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults.lua b/defaults.lua index 458067345..142a5d0ea 100644 --- a/defaults.lua +++ b/defaults.lua @@ -42,6 +42,10 @@ DSHOWHIDDENFILES = false -- default to false DSHOWFILESIZE = false +-- landscape clockwise rotation +-- default to true, set to false for counterclockwise rotation +DLANDSCAPE_CLOCKWISE_ROTATION = true + -- customizable tap zones(rectangles) -- x: x coordinate of top left corner in proportion of screen width -- y: y coordinate of top left corner in proportion of screen height diff --git a/frontend/ui/device/screen.lua b/frontend/ui/device/screen.lua index aaa9fc87b..2ad926765 100644 --- a/frontend/ui/device/screen.lua +++ b/frontend/ui/device/screen.lua @@ -116,7 +116,7 @@ function Screen:setScreenMode(mode) end elseif mode == "landscape" then if self.cur_rotation_mode == 0 or self.cur_rotation_mode == 2 then - self:setRotationMode(1) + self:setRotationMode(DLANDSCAPE_CLOCKWISE_ROTATION and 1 or 3) elseif self.cur_rotation_mode == 1 or self.cur_rotation_mode == 3 then self:setRotationMode((self.cur_rotation_mode + 2) % 4) end