From 6899434609849abfc725c2a73f059626ed6419ce Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 7 Mar 2013 15:21:17 +0100 Subject: [PATCH] (Android) Add back button behavior option --- android/native/jni/input_android.c | 6 ++++++ android/phoenix/res/values/array.xml | 10 ++++++++++ android/phoenix/res/xml/prefs.xml | 8 ++++++++ .../phoenix/src/org/retroarch/browser/RetroArch.java | 1 + general.h | 1 + input/input_common.h | 8 ++++++++ settings.c | 3 +++ 7 files changed, 37 insertions(+) diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index db6d9aedff..f422cce5cc 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -367,6 +367,12 @@ static void android_input_poll(void *data) && input_state > 0) { } + else if (g_settings.input.back_behavior == BACK_BUTTON_MENU_TOGGLE) + { + *lifecycle_state |= (1ULL << RARCH_RMENU_TOGGLE); + AInputQueue_finishEvent(android_app->inputQueue, event, handled); + break; + } else { *lifecycle_state |= (1ULL << RARCH_QUIT_KEY); diff --git a/android/phoenix/res/values/array.xml b/android/phoenix/res/values/array.xml index fa494636ba..674439d631 100644 --- a/android/phoenix/res/values/array.xml +++ b/android/phoenix/res/values/array.xml @@ -1,5 +1,15 @@ + + Quit + Menu toggle + + + + 0 + 1 + + Full screen Auto diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index 7b1f2ba936..949bba3ea1 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -187,6 +187,14 @@ + + +