From 7ac8d02a0537a22fce5eb2f3d106bb566249388b Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 2 Nov 2012 04:13:35 +0100 Subject: [PATCH] (Android) Performance changes - build fix --- android/native/jni/Android.mk | 3 +-- android/native/jni/main.c | 2 -- performance.c | 6 +++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index 2b7cd29e09..7e2998f46b 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -55,11 +55,10 @@ LOCAL_SRC_FILES = $(RARCH_PATH)/retroarch.c \ $(RARCH_PATH)/conf/config_file.c \ $(RARCH_PATH)/autosave.c \ $(RARCH_PATH)/thread.c \ - $(RARCH_PATH)/performance/performance_linux.c \ + $(RARCH_PATH)/performance.c \ main.c ifeq ($(PERF_TEST), 1) -LOCAL_SRC_FILES += $(RARCH_PATH)/performance.c LOCAL_CFLAGS += -DPERF_TEST endif diff --git a/android/native/jni/main.c b/android/native/jni/main.c index 53afd7f952..971462e756 100644 --- a/android/native/jni/main.c +++ b/android/native/jni/main.c @@ -261,8 +261,6 @@ void android_main(struct android_app* state) } } - rarch_perf_get_cpu_features(); - RARCH_LOG("Starting RetroArch...\n"); rarch_main(argc, argv); diff --git a/performance.c b/performance.c index 512ce61c45..8ef5a19f09 100644 --- a/performance.c +++ b/performance.c @@ -88,8 +88,10 @@ rarch_perf_tick_t rarch_get_perf_counter(void) #endif #if defined(__x86_64__) || defined(__i386__) || defined(__i486__) || defined(__i686__) +#if !defined(ANDROID_ARM) || !defined(ANDROID_MIPS) #define CPU_X86 #endif +#endif #ifdef _MSC_VER #include @@ -98,7 +100,9 @@ rarch_perf_tick_t rarch_get_perf_counter(void) #ifdef CPU_X86 static void x86_cpuid(int func, int flags[4]) { -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(ANDROID) + /* doesn't compile on x86 Android - + * error - inconsistent operand constraints in an 'asm' */ asm volatile("cpuid\n" : "=a"(flags[0]), "=b"(flags[1]),