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 | |
parent | 73d0e14f4494b98e0c781934fbf19efa8d6d8418 (diff) | |
download | rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.tar.gz rockbox-26a92fa9e17fc659ad1cd27b2365493df0d16950.zip |
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
-rw-r--r-- | android/android.make | 2 | ||||
-rwxr-xr-x | tools/configure | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/android/android.make b/android/android.make index f12b79750d..56b650a7af 100644 --- a/android/android.make +++ b/android/android.make | |||
@@ -68,7 +68,7 @@ JAVAC_OPTS += -implicit:none -classpath $(ANDROID_PLATFORM)/android.jar:$(BUILDD | |||
68 | 68 | ||
69 | .PHONY: | 69 | .PHONY: |
70 | $(MANIFEST): $(MANIFEST_SRC) $(DIRS) | 70 | $(MANIFEST): $(MANIFEST_SRC) $(DIRS) |
71 | $(call PRINTS,MANIFEST $(@F))sed -e 's/versionName="1.0"/versionName="$(SVNVERSION)"/' $(MANIFEST_SRC) > $(MANIFEST) | 71 | $(call PRINTS,MANIFEST $(@F))sed -e 's/versionName="1.0"/versionName="$(SVNVERSION)"/;s/screenOrientation="portrait"/screenOrientation="$(LCDORIENTATION)"/' $(MANIFEST_SRC) > $(MANIFEST) |
72 | 72 | ||
73 | $(R_JAVA) $(AP_): $(MANIFEST) $(RES) | $(DIRS) | 73 | $(R_JAVA) $(AP_): $(MANIFEST) $(RES) | $(DIRS) |
74 | $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \ | 74 | $(call PRINTS,AAPT $(subst $(BUILDDIR)/,,$@))$(AAPT) package -f -m \ |
diff --git a/tools/configure b/tools/configure index d988e75d63..461e00ce8f 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -28,6 +28,7 @@ sharedir= | |||
28 | thread_support="ASSEMBLER_THREADS" | 28 | thread_support="ASSEMBLER_THREADS" |
29 | app_lcd_width= | 29 | app_lcd_width= |
30 | app_lcd_height= | 30 | app_lcd_height= |
31 | app_lcd_orientation= | ||
31 | # | 32 | # |
32 | # Begin Function Definitions | 33 | # Begin Function Definitions |
33 | # | 34 | # |
@@ -100,7 +101,12 @@ app_set_lcd_size () { | |||
100 | app_lcd_height="$ARG_LCDHEIGHT" | 101 | app_lcd_height="$ARG_LCDHEIGHT" |
101 | fi | 102 | fi |
102 | if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi | 103 | if [ -z "$app_lcd_height" ]; then app_lcd_height="480"; fi |
103 | echo "Selected $app_lcd_width x $app_lcd_height resolution" | 104 | if [ $app_lcd_width -gt $app_lcd_height ]; then |
105 | lcd_orientation="landscape" | ||
106 | else | ||
107 | lcd_orientation="portrait" | ||
108 | fi | ||
109 | echo "Selected $app_lcd_width x $app_lcd_height resolution ($lcd_orientation)" | ||
104 | ARG_LCDWIDTH=$app_lcd_width | 110 | ARG_LCDWIDTH=$app_lcd_width |
105 | ARG_LCDHEIGHT=$app_lcd_height | 111 | ARG_LCDHEIGHT=$app_lcd_height |
106 | 112 | ||
@@ -3715,6 +3721,7 @@ sed > Makefile \ | |||
3715 | -e "s<@PREFIX@<$ARG_PREFIX<g" \ | 3721 | -e "s<@PREFIX@<$ARG_PREFIX<g" \ |
3716 | -e "s<@CMDLINE@<$cmdline<g" \ | 3722 | -e "s<@CMDLINE@<$cmdline<g" \ |
3717 | -e "s<@SDLCONFIG@<$sdl<g" \ | 3723 | -e "s<@SDLCONFIG@<$sdl<g" \ |
3724 | -e "s<@LCDORIENTATION@<$lcd_orientation<g" \ | ||
3718 | <<EOF | 3725 | <<EOF |
3719 | ## Automatically generated. http://www.rockbox.org/ | 3726 | ## Automatically generated. http://www.rockbox.org/ |
3720 | 3727 | ||
@@ -3784,6 +3791,7 @@ export ROCKBOX_SHARE_PATH=@sharepath@ | |||
3784 | export ROCKBOX_BINARY_PATH=@binpath@ | 3791 | export ROCKBOX_BINARY_PATH=@binpath@ |
3785 | export ROCKBOX_LIBRARY_PATH=@libpath@ | 3792 | export ROCKBOX_LIBRARY_PATH=@libpath@ |
3786 | export SDLCONFIG=@SDLCONFIG@ | 3793 | export SDLCONFIG=@SDLCONFIG@ |
3794 | export LCDORIENTATION=@LCDORIENTATION@ | ||
3787 | 3795 | ||
3788 | CONFIGURE_OPTIONS=@CMDLINE@ | 3796 | CONFIGURE_OPTIONS=@CMDLINE@ |
3789 | 3797 | ||