mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-23 07:27:22 +01:00
clean up BT UUID assignment, replacing runtime strcmp with compile
time macro magic
This commit is contained in:
parent
d9bc713b7b
commit
6c863155ef
2 changed files with 10 additions and 11 deletions
|
@ -42,7 +42,7 @@ LOCAL_DEFINES += \
|
||||||
-DNATIVE_NLI \
|
-DNATIVE_NLI \
|
||||||
-DCOMMS_VERSION=1 \
|
-DCOMMS_VERSION=1 \
|
||||||
-DINITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS} \
|
-DINITIAL_CLIENT_VERS=${INITIAL_CLIENT_VERS} \
|
||||||
-DVARIANT=\"${VARIANT}\" \
|
-DVARIANT_${VARIANT} \
|
||||||
-DRELAY_ROOM_DEFAULT=\"\" \
|
-DRELAY_ROOM_DEFAULT=\"\" \
|
||||||
-D__LITTLE_ENDIAN \
|
-D__LITTLE_ENDIAN \
|
||||||
|
|
||||||
|
|
|
@ -563,18 +563,17 @@ JNIEXPORT jstring JNICALL
|
||||||
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID
|
Java_org_eehouse_android_xw4_jni_XwJNI_comms_1getUUID
|
||||||
( JNIEnv* env, jclass C )
|
( JNIEnv* env, jclass C )
|
||||||
{
|
{
|
||||||
jstring jstr = NULL;
|
jstring jstr =
|
||||||
#ifdef XWFEATURE_BLUETOOTH
|
#ifdef XWFEATURE_BLUETOOTH
|
||||||
const char* uuid;
|
# if defined VARIANT_xw4
|
||||||
if ( 0 == XP_STRCMP( VARIANT, "xw4" ) ) {
|
(*env)->NewStringUTF( env, XW_BT_UUID )
|
||||||
uuid = XW_BT_UUID;
|
# elif defined VARIANT_xw4dbg
|
||||||
} else if ( 0 == XP_STRCMP( VARIANT, "xw4dbg" ) ) {
|
(*env)->NewStringUTF( env, XW_BT_UUID_DBG )
|
||||||
uuid = XW_BT_UUID_DBG;
|
# endif
|
||||||
} else {
|
#else
|
||||||
XP_ASSERT(0);
|
NULL
|
||||||
}
|
|
||||||
jstr = (*env)->NewStringUTF( env, uuid );
|
|
||||||
#endif
|
#endif
|
||||||
|
;
|
||||||
return jstr;
|
return jstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue