src/video/android/SDL_androidtouch.c
changeset 9449 a65088766e35
parent 9441 fc7522030729
child 9450 bcb16ffce95b
equal deleted inserted replaced
9448:3d3ed3a5ba8d 9449:a65088766e35
    55 static void
    55 static void
    56 SeparateEventsHintWatcher(void *userdata, const char *name,
    56 SeparateEventsHintWatcher(void *userdata, const char *name,
    57                           const char *oldValue, const char *newValue)
    57                           const char *oldValue, const char *newValue)
    58 {
    58 {
    59     separate_mouse_and_touch = (newValue && (SDL_strcmp(newValue, "1") == 0));
    59     separate_mouse_and_touch = (newValue && (SDL_strcmp(newValue, "1") == 0));
       
    60     JNIEnv *env = Android_JNI_GetEnv();
       
    61     jfieldID fid = (*env)->GetStaticFieldID(env, mActivityClass, "mSeparateMouseAndTouch", "Z");
       
    62     (*env)->SetStaticBooleanField(env, mActivityClass, fid, separate_mouse_and_touch ? JNI_TRUE : JNI_FALSE);
    60 }
    63 }
    61 
    64 
    62 void Android_InitTouch(void)
    65 void Android_InitTouch(void)
    63 {
    66 {
    64     int i;
    67     int i;