Skip to content

Commit

Permalink
Fixed a small upstream change.
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhat committed Dec 1, 2014
1 parent c7914e9 commit 806515d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/jni/jni_EventDispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ void jni_EventDispatcher(uiohook_event * const event) {
/* The following start and stop functions are less than ideal for attaching JNI.
* TODO Consider moving threads out of the lib and into Java.
*/
case EVENT_THREAD_START:
case EVENT_THREAD_STARTED:
if ((*jvm)->GetEnv(jvm, (void **)(&env), jvm_attach_args.version) == JNI_EDETACHED) {
(*jvm)->AttachCurrentThread(jvm, (void **)(&env), &jvm_attach_args);
}
break;

case EVENT_THREAD_STOP:
case EVENT_THREAD_STOPPED:
// NOTE This callback may note be called from Windows under some circumstances.
if ((*jvm)->GetEnv(jvm, (void **)(&env), jvm_attach_args.version) == JNI_OK) {
if ((*jvm)->DetachCurrentThread(jvm) == JNI_OK) {
Expand All @@ -55,8 +55,8 @@ void jni_EventDispatcher(uiohook_event * const event) {
}
break;

case EVENT_HOOK_START:
case EVENT_HOOK_STOP:
case EVENT_HOOK_ENABLED:
case EVENT_HOOK_DISABLED:
break;

case EVENT_KEY_PRESSED:
Expand Down

0 comments on commit 806515d

Please sign in to comment.