summaryrefslogtreecommitdiff
path: root/apps/hosted/keyboard.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2011-03-02 10:13:56 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2011-03-02 10:13:56 +0000
commit86a0022a160af0295ca97c475fb6d4c3c999ff8a (patch)
tree3d44a07a34ac95e4d78945f0069cdaafe4c90c42 /apps/hosted/keyboard.c
parentd233066155ab1b6fff26f4b4c8faa9507f0eca84 (diff)
downloadrockbox-86a0022a160af0295ca97c475fb6d4c3c999ff8a.tar.gz
rockbox-86a0022a160af0295ca97c475fb6d4c3c999ff8a.zip
Make android compile (untested)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29496 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/hosted/keyboard.c')
-rw-r--r--apps/hosted/keyboard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/hosted/keyboard.c b/apps/hosted/keyboard.c
index 4497b60bb4..9407d970fd 100644
--- a/apps/hosted/keyboard.c
+++ b/apps/hosted/keyboard.c
@@ -31,7 +31,7 @@ extern JNIEnv *env_ptr;
31static jclass RockboxKeyboardInput_class; 31static jclass RockboxKeyboardInput_class;
32static jobject RockboxKeyboardInput_instance; 32static jobject RockboxKeyboardInput_instance;
33static jmethodID kbd_inputfunc; 33static jmethodID kbd_inputfunc;
34static struct wakeup kbd_wakeup; 34static struct semaphore kbd_wakeup;
35static bool accepted; 35static bool accepted;
36static jstring new_string; 36static jstring new_string;
37 37
@@ -48,7 +48,7 @@ Java_org_rockbox_RockboxKeyboardInput_put_1result(JNIEnv *env, jobject this,
48 new_string = _new_string; 48 new_string = _new_string;
49 (*env)->NewGlobalRef(env, new_string); /* prevet GC'ing */ 49 (*env)->NewGlobalRef(env, new_string); /* prevet GC'ing */
50 } 50 }
51 wakeup_signal(&kbd_wakeup); 51 semaphore_release(&kbd_wakeup);
52} 52}
53 53
54static void kdb_init(void) 54static void kdb_init(void)
@@ -57,7 +57,7 @@ static void kdb_init(void)
57 static jmethodID kbd_is_usable; 57 static jmethodID kbd_is_usable;
58 if (RockboxKeyboardInput_class == NULL) 58 if (RockboxKeyboardInput_class == NULL)
59 { 59 {
60 wakeup_init(&kbd_wakeup); 60 semaphore_init(&kbd_wakeup, 1, 0);
61 /* get the class and its constructor */ 61 /* get the class and its constructor */
62 RockboxKeyboardInput_class = e->FindClass(env_ptr, 62 RockboxKeyboardInput_class = e->FindClass(env_ptr,
63 "org/rockbox/RockboxKeyboardInput"); 63 "org/rockbox/RockboxKeyboardInput");
@@ -94,7 +94,7 @@ int kbd_input(char* text, int buflen)
94 e->CallVoidMethod(env_ptr, RockboxKeyboardInput_instance,kbd_inputfunc, 94 e->CallVoidMethod(env_ptr, RockboxKeyboardInput_instance,kbd_inputfunc,
95 str, ok_text, cancel_text); 95 str, ok_text, cancel_text);
96 96
97 wakeup_wait(&kbd_wakeup, TIMEOUT_BLOCK); 97 semaphore_wait(&kbd_wakeup, TIMEOUT_BLOCK);
98 98
99 if (accepted) 99 if (accepted)
100 { 100 {