diff options
| author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-06-04 10:36:34 +0000 |
|---|---|---|
| committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-06-04 10:36:34 +0000 |
| commit | 26a92fa9e17fc659ad1cd27b2365493df0d16950 (patch) | |
| tree | 0716c42667a2663647ffe04c1a98a281f3d84f1e /tools | |
| parent | 73d0e14f4494b98e0c781934fbf19efa8d6d8418 (diff) | |
| download | rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.zip rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.tar.gz rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.tar.bz2 rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.tar.xz | |
Android: adjust screen orientation based on LCD size.
If the screen size specified is wider than higher specify the orientation as
landscape in AndroidManifest.xml. This usually applies to tablets where Rockbox
in portrait mode feels unnatural.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29951 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/configure | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/configure b/tools/configure index d988e75..461e00c 100755 --- a/tools/configure +++ b/tools/configure @@ -28,6 +28,7 @@ sharedir= thread_support="ASSEMBLER_THREADS" app_lcd_width= app_lcd_height= +app_lcd_orientation= # # Begin Function Definitions # @@ -100,7 +101,12 @@ app_set_lcd_size () { app_lcd_height="$ARG_LCDHEIGHT" fi if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi - echo "Selected $app_lcd_width x $app_lcd_height resolution" + if [ $app_lcd_width -gt $app_lcd_height ]; then + lcd_orientation="landscape" + else + lcd_orientation="portrait" + fi + echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)" ARG_LCDWIDTH=$app_lcd_width ARG_LCDHEIGHT=$app_lcd_height @@ -3715,6 +3721,7 @@ sed > Makefile \ -e "s<@PREFIX@<$ARG_PREFIX<g" \ -e "s<@CMDLINE@<$cmdline<g" \ -e "s<@SDLCONFIG@<$sdl<g" \ + -e "s<@LCDORIENTATION@<$lcd_orientation<g" \ <<EOF ## Automatically generated. http://www.rockbox.org/ @@ -3784,6 +3791,7 @@ export ROCKBOX_SHARE_PATH=@sharepath@ export ROCKBOX_BINARY_PATH=@binpath@ export ROCKBOX_LIBRARY_PATH=@libpath@ export SDLCONFIG=@SDLCONFIG@ +export LCDORIENTATION=@LCDORIENTATION@ CONFIGURE_OPTIONS=@CMDLINE@ |