From e395343064936cc04f777bb12391c34bdecbd992 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Wed, 18 Jun 2014 18:21:09 +0200 Subject: ANDROID: Hide system mouse pointer on OUYA --- .../android/org/scummvm/scummvm/ScummVMActivity.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'backends/platform') diff --git a/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java b/backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java index 5964d5bfde..f4eb7ddd0b 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); + } } -- cgit v1.2.3