add game_getGi to fetch into java world any changes to the gi in the

jni world.
This commit is contained in:
Andy2 2011-02-01 18:53:29 -08:00
parent 383206f5dc
commit c2be642302
2 changed files with 10 additions and 2 deletions

View file

@ -989,7 +989,6 @@ JNIEXPORT void JNICALL
Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
( JNIEnv* env, jclass C, jint gamePtr, jobject jsummary )
{
LOG_FUNC();
XWJNI_START();
ModelCtxt* model = state->game.model;
XP_S16 nMoves = model_getNMoves( model );
@ -1037,7 +1036,6 @@ Java_org_eehouse_android_xw4_jni_XwJNI_game_1summarize
(*env)->DeleteLocalRef( env, jarr );
XWJNI_END();
LOG_RETURN_VOID();
}
JNIEXPORT jboolean JNICALL
@ -1159,6 +1157,15 @@ Java_org_eehouse_android_xw4_jni_XwJNI_board_1handleKey
}
#endif
JNIEXPORT void JNICALL
Java_org_eehouse_android_xw4_jni_XwJNI_game_1getGi
( JNIEnv* env, jclass C, jint gamePtr, jobject jgi )
{
XWJNI_START_GLOBALS();
setJGI( env, jgi, globals->gi );
XWJNI_END();
}
JNIEXPORT jboolean JNICALL
Java_org_eehouse_android_xw4_jni_XwJNI_game_1hasComms
( JNIEnv* env, jclass C, jint gamePtr )

View file

@ -98,6 +98,7 @@ public class XwJNI {
public static native void game_summarize( int gamePtr, GameSummary summary );
public static native byte[] game_saveToStream( int gamePtr,
CurGameInfo gi );
public static native void game_getGi( int gamePtr, CurGameInfo gi );
public static native boolean game_hasComms( int gamePtr );
public static native void game_dispose( int gamePtr );