diff options
author | Marcus Comstedt | 2014-06-18 18:21:09 +0200 |
---|---|---|
committer | Marcus Comstedt | 2014-06-18 18:22:41 +0200 |
commit | e395343064936cc04f777bb12391c34bdecbd992 (patch) | |
tree | 5f660ce0980ac4d3ca0bb77cd3c433c15f5ed163 /backends/platform | |
parent | a3e89eb4b20bf0213a9204e88f1772f1e778574f (diff) | |
download | scummvm-rg350-e395343064936cc04f777bb12391c34bdecbd992.tar.gz scummvm-rg350-e395343064936cc04f777bb12391c34bdecbd992.tar.bz2 scummvm-rg350-e395343064936cc04f777bb12391c34bdecbd992.zip |
ANDROID: Hide system mouse pointer on OUYA
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/android/org/scummvm/scummvm/ScummVMActivity.java | 14 |
1 files changed, 14 insertions, 0 deletions
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); + } } |