[Scummvm-cvs-logs] scummvm master -> e395343064936cc04f777bb12391c34bdecbd992

zeldin marcus at mc.pp.se
Wed Jun 18 18:25:07 CEST 2014


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

Summary:
e395343064 ANDROID: Hide system mouse pointer on OUYA


Commit: e395343064936cc04f777bb12391c34bdecbd992
    https://github.com/scummvm/scummvm/commit/e395343064936cc04f777bb12391c34bdecbd992
Author: Marcus Comstedt (marcus at mc.pp.se)
Date: 2014-06-18T18:22:41+02:00

Commit Message:
ANDROID: Hide system mouse pointer on OUYA

Changed paths:
    backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java



diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
index 5964d5b..f4eb7dd 100644
--- a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
+++ b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java
@@ -3,6 +3,7 @@ package org.scummvm.scummvm;
 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.DialogInterface;
+import android.content.Intent;
 import android.media.AudioManager;
 import android.os.Build;
 import android.os.Bundle;
@@ -201,6 +202,7 @@ public class ScummVMActivity extends Activity {
 
 		if (_scummvm != null)
 			_scummvm.setPause(false);
+		showMouseCursor(false);
 	}
 
 	@Override
@@ -211,6 +213,7 @@ public class ScummVMActivity extends Activity {
 
 		if (_scummvm != null)
 			_scummvm.setPause(true);
+		showMouseCursor(true);
 	}
 
 	@Override
@@ -267,4 +270,15 @@ public class ScummVMActivity extends Activity {
 			imm.hideSoftInputFromWindow(main_surface.getWindowToken(),
 										InputMethodManager.HIDE_IMPLICIT_ONLY);
 	}
+
+	private void showMouseCursor(boolean show) {
+		/* Currently hiding the system mouse cursor is only
+		   supported on OUYA.  If other systems provide similar
+		   intents, please add them here as well */
+		Intent intent =
+			new Intent(show?
+				   "tv.ouya.controller.action.SHOW_CURSOR" :
+				   "tv.ouya.controller.action.HIDE_CURSOR");
+		sendBroadcast(intent);
+	}
 }






More information about the Scummvm-git-logs mailing list