[Scummvm-cvs-logs] scummvm master -> 5a4faf34f70138ed83269ae5904da9d457190fe9

sev- sev at scummvm.org
Mon May 23 08:22:39 CEST 2016


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
497859ad90 ANDROID: Add support for Leanback Launcher on Android TV
832d7bb289 ANDROID: Add support for ScummVM menu on Android TV devices
5a4faf34f7 Merge pull request #765 from mjg59/master


Commit: 497859ad90ba1f7e89295f4221f546637c3bd17f
    https://github.com/scummvm/scummvm/commit/497859ad90ba1f7e89295f4221f546637c3bd17f
Author: Matthew Garrett (mjg59 at coreos.com)
Date: 2016-05-22T15:23:44-07:00

Commit Message:
ANDROID: Add support for Leanback Launcher on Android TV

Android TV needs some modifications to the manifest and a new icon in order
for apps to appear in the launcher.

Changed paths:
  A dists/android/res/drawable-xhdpi/leanback_icon.png
    backends/platform/android/android.mk
    dists/android/AndroidManifest.xml
    dists/android/AndroidManifest.xml.in



diff --git a/backends/platform/android/android.mk b/backends/platform/android/android.mk
index e11ad07..68a2a34 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -20,6 +20,7 @@ RESOURCES = \
 	$(PATH_BUILD_RES)/layout/main.xml \
 	$(PATH_BUILD_RES)/drawable/scummvm.png \
 	$(PATH_BUILD_RES)/drawable/scummvm_big.png \
+	$(PATH_BUILD_RES)/drawable-xhdpi/leanback_icon.png \
 	$(PATH_BUILD_RES)/drawable-xhdpi/ouya_icon.png
 
 DIST_ANDROID_MK = $(PATH_DIST)/jni/Android.mk
diff --git a/dists/android/AndroidManifest.xml b/dists/android/AndroidManifest.xml
index d605d9b..1416166 100644
--- a/dists/android/AndroidManifest.xml
+++ b/dists/android/AndroidManifest.xml
@@ -15,6 +15,7 @@
 	<application
 			android:label="@string/app_name"
 			android:description="@string/app_desc"
+			android:isGame="true"
 			android:icon="@drawable/scummvm">
 		<activity android:name=".ScummVMActivity"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
@@ -27,6 +28,14 @@
 				<category android:name="tv.ouya.intent.category.GAME"/>
 			</intent-filter>
 		</activity>
+		<activity android:name=".ScummVMActivity"
+			  	android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+				android:banner="@drawable/leanback_icon">
+		  <intent-filter>
+				<action android:name="android.intent.action.MAIN"/>
+				<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
+		  </intent-filter>
+		</activity>
 	</application>
 
 	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@@ -42,4 +51,11 @@
 
 	<uses-configuration android:reqTouchScreen="stylus"
 			android:reqKeyboardType="qwerty"/>
+
+	<uses-feature android:name="android.hardware.touchscreen"
+		        android:required="false" />
+
+	<uses-feature android:name="android.software.leanback"
+		        android:required="false" />
+
 </manifest>
diff --git a/dists/android/AndroidManifest.xml.in b/dists/android/AndroidManifest.xml.in
index d90e282..de2f2d9 100644
--- a/dists/android/AndroidManifest.xml.in
+++ b/dists/android/AndroidManifest.xml.in
@@ -15,6 +15,7 @@
 	<application
 			android:label="@string/app_name"
 			android:description="@string/app_desc"
+			android:isGame="true"
 			android:icon="@drawable/scummvm">
 		<activity android:name=".ScummVMActivity"
 				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
@@ -27,6 +28,14 @@
 				<category android:name="tv.ouya.intent.category.GAME"/>
 			</intent-filter>
 		</activity>
+		<activity android:name=".ScummVMActivity"
+				android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+				android:banner="@drawable/leanback_icon">
+		  <intent-filter>
+				<action android:name="android.intent.action.MAIN"/>
+				<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
+		  </intent-filter>
+		</activity>
 	</application>
 
 	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
@@ -42,4 +51,11 @@
 
 	<uses-configuration android:reqTouchScreen="stylus"
 			android:reqKeyboardType="qwerty"/>
+
+	<uses-feature android:name="android.hardware.touchscreen"
+		        android:required="false" />
+
+	<uses-feature android:name="android.software.leanback"
+		        android:required="false" />
+
 </manifest>
diff --git a/dists/android/res/drawable-xhdpi/leanback_icon.png b/dists/android/res/drawable-xhdpi/leanback_icon.png
new file mode 100644
index 0000000..28a7196
Binary files /dev/null and b/dists/android/res/drawable-xhdpi/leanback_icon.png differ


Commit: 832d7bb289aef42f5eb48dc0495e1519f6bc5e71
    https://github.com/scummvm/scummvm/commit/832d7bb289aef42f5eb48dc0495e1519f6bc5e71
Author: Matthew Garrett (mjg59 at coreos.com)
Date: 2016-05-22T15:23:44-07:00

Commit Message:
ANDROID: Add support for ScummVM menu on Android TV devices

Android TV devices don't have menu buttons. Remotes should have a play/pause
button (which may send individual play and pause events rather than a
combined event) and gamepads should have a Y button. Use these to open the
menu.

Changed paths:
    backends/platform/android/events.cpp
    backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java



diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 8039981..b146945 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -101,7 +101,9 @@ enum {
 	JKEYCODE_MEDIA_NEXT = 87,
 	JKEYCODE_MEDIA_PREVIOUS = 88,
 	JKEYCODE_MEDIA_REWIND = 89,
-	JKEYCODE_MEDIA_FAST_FORWARD = 90
+	JKEYCODE_MEDIA_FAST_FORWARD = 90,
+	JKEYCODE_MEDIA_PLAY = 126,
+	JKEYCODE_MEDIA_PAUSE = 127
 };
 
 // five-way navigation control
@@ -380,6 +382,19 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
 
 			return;
 
+		case JKEYCODE_MEDIA_PAUSE:
+		case JKEYCODE_MEDIA_PLAY:
+		case JKEYCODE_MEDIA_PLAY_PAUSE:
+			if (arg1 == JACTION_DOWN) {
+				e.type = Common::EVENT_MAINMENU;
+
+				lockMutex(_event_queue_lock);
+				_event_queue.push(e);
+				unlockMutex(_event_queue_lock);
+			}
+
+			return;
+
 		case JKEYCODE_CAMERA:
 		case JKEYCODE_SEARCH:
 			if (arg1 == JACTION_DOWN)
@@ -888,6 +903,10 @@ void OSystem_Android::pushEvent(int type, int arg1, int arg2, int arg3,
 			e.kbd.ascii = Common::ASCII_ESCAPE;
 			break;
 
+		case JKEYCODE_BUTTON_Y:
+			e.type = Common::EVENT_MAINMENU;
+			break;
+
 		default:
 			LOGW("unmapped gamepad key: %d", arg2);
 			return;
diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
index 32c65d3..e81000d 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
@@ -119,6 +119,8 @@ public class ScummVMEvents implements
 			case KeyEvent.KEYCODE_MENU:
 			case KeyEvent.KEYCODE_CAMERA:
 			case KeyEvent.KEYCODE_SEARCH:
+			case KeyEvent.KEYCODE_MEDIA_PLAY:
+			case KeyEvent.KEYCODE_MEDIA_PAUSE:
 				break;
 
 			default:


Commit: 5a4faf34f70138ed83269ae5904da9d457190fe9
    https://github.com/scummvm/scummvm/commit/5a4faf34f70138ed83269ae5904da9d457190fe9
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2016-05-23T08:22:34+02:00

Commit Message:
Merge pull request #765 from mjg59/master

ANDROID: Add support for Leanback Launcher on Android TV

Changed paths:
  A dists/android/res/drawable-xhdpi/leanback_icon.png
    backends/platform/android/android.mk
    backends/platform/android/events.cpp
    backends/platform/android/org/scummvm/scummvm/ScummVMEvents.java
    dists/android/AndroidManifest.xml
    dists/android/AndroidManifest.xml.in









More information about the Scummvm-git-logs mailing list