From 8065e55b98eea688adc8c8f02856669196737b2b Mon Sep 17 00:00:00 2001 From: Eric House Date: Sun, 16 Aug 2015 09:38:55 -0700 Subject: [PATCH] pipe board_getSelPlayer() through jni --- xwords4/android/XWords4/jni/xwjni.c | 12 ++++++++++++ .../src/org/eehouse/android/xw4/jni/XwJNI.java | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/xwords4/android/XWords4/jni/xwjni.c b/xwords4/android/XWords4/jni/xwjni.c index 4beaceee0..4acbec37d 100644 --- a/xwords4/android/XWords4/jni/xwjni.c +++ b/xwords4/android/XWords4/jni/xwjni.c @@ -949,6 +949,18 @@ Java_org_eehouse_android_xw4_jni_XwJNI_board_1getActiveRect } #endif +JNIEXPORT jint JNICALL +Java_org_eehouse_android_xw4_jni_XwJNI_board_1getSelPlayer +( JNIEnv* env, jclass C, jint gamePtr ) +{ + jint result; + XWJNI_START(); + result = board_getSelPlayer( state->game.board ); + XWJNI_END(); + return result; +} + + JNIEXPORT jboolean JNICALL Java_org_eehouse_android_xw4_jni_XwJNI_board_1handlePenDown (JNIEnv *env, jclass C, jint gamePtr, jint xx, jint yy, jbooleanArray barray ) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java index 2f3da7be4..eaf8c29e3 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/XwJNI.java @@ -235,7 +235,7 @@ public class XwJNI { boolean[] canZoom ); public static native boolean board_getActiveRect( int gamePtr, Rect rect, int[] dims ); - + public static native int board_getSelPlayer( int gamePtr ); public static native boolean board_handlePenDown( int gamePtr, int xx, int yy, boolean[] handled );