From ff599ac392f8a706bf59377aabb776a90f550e8b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 31 Oct 2012 16:04:40 +0100 Subject: [PATCH] (Android) Change input process conditional to 'event' -also disable PERF_TEST for regular usage --- android/native/jni/Android.mk | 4 ++-- android/native/jni/input_android.c | 13 +++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index 526a273654..342e907a47 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -1,6 +1,7 @@ RARCH_VERSION = "0.9.7" LOCAL_PATH := $(call my-dir) -PERF_TEST := 1 +PERF_TEST := 0 +HAVE_OPENSL := 1 include $(CLEAR_VARS) @@ -18,7 +19,6 @@ LOCAL_CFLAGS += -DANDROID_MIPS -D__mips__ -D__MIPSEL__ endif LOCAL_MODULE := retroarch-activity -HAVE_OPENSL := 1 RARCH_PATH := ../../.. LOCAL_SRC_FILES = $(RARCH_PATH)/retroarch.c \ diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 591f5b534a..6effd67475 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -43,12 +43,6 @@ enum { #define LAST_KEYCODE AKEYCODE_ASSIST -enum { - AKEYSTATE_DONT_PROCESS = 0, - AKEYSTATE_PROCESS = 1, -}; - - #define PRESSED_UP(x, y) ((-0.80f > y) && (x >= -1.00f)) #define PRESSED_DOWN(x, y) ((0.80f < y) && (y <= 1.00f)) #define PRESSED_LEFT(x, y) ((-0.80f > x) && (x >= -1.00f)) @@ -329,15 +323,14 @@ static void android_input_poll(void *data) (void)data; // Read all pending events. - int ident; + int event; struct android_poll_source* source; struct android_app* state = g_android.app; - // We loop until all events are read - ident= ALooper_pollOnce(0, NULL, 0, (void**)&source); + ALooper_pollOnce(0, NULL, &event, (void**)&source); // Process this event. - if (ident && source != NULL) + if(event) source->process(state, source); }