View Single Post
Old 01-19-2012, 04:49 AM   #66
pirl8
Pest
pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.pirl8 ought to be getting tired of karma fortunes by now.
 
Posts: 204
Karma: 239254
Join Date: Jan 2012
Location: Italy
Device: KT, PW3
I've modified the "orientation" entry in the GUI Launcher to avoid the 6 taps problem when in landscape mode.

This is my new /mnt/us/extensions/orientation/menu.json file:
Code:
{
  "items": [
    {
      "name": "Orientation",
      "priority": 5,
      "items": [
        {"name": "Portrait", "priority": 0, "action": "bin/setorientation.sh", "params": "U"},
        {"name": "Portrait Inverted", "priority": 1, "action": "bin/setorientation.sh", "params": "D"},
        {"name": "Landscape Left", "priority": 2, "action": "bin/setorientation.sh", "params": "L"},
        {"name": "Landscape Right", "priority": 3, "action": "bin/setorientation.sh", "params": "R"}
      ]
    }
  ]
}
I've created a /mnt/us/extensions/orientation/bin directory containing this setorientation.sh shell script:

Code:
#!/bin/sh

SETPROP=/usr/bin/lipc-set-prop
PREFS=/var/local/java/prefs/com.amazon.ebook.framework/prefs

case "$1" in
"L"|"R")
        $SETPROP com.lab126.winmgr orientationLock $1
        $SETPROP com.lab126.winmgr refreshOnTurn true
        ;;
"U"|"D")
        $SETPROP com.lab126.winmgr orientationLock $1
        $SETPROP com.lab126.winmgr refreshOnTurn $({ grep onPageTurn $PREFS || echo false ; } | sed 's/.*=//')
        ;;
esac
The script set display refresh to always on when in landscape mode, and resets it to user setting when in portrait.

This fix works only when you turn pages. The problem is still there when you swipe to jump between chapters. After 6 swipes, the display does not refresh anymore and you have to touch the top of the screen to unlock it.

There's an issue after the 5.0.3 update.

The book browsing application cuts a vertical strip of pixels at right when in landscape mode. Header and footer are displayed correctly. The web browser is not affected, also. Here's a screenshot of the problem:


Last edited by pirl8; 01-19-2012 at 04:51 AM.
pirl8 is offline   Reply With Quote