forked from len0rd/rockbox
android: Add facility for java code to wait native code to be ready.
Especially when unzipping rockbox.zip, the native code can be initialized a lot later than the java code. The java code needs to be prevented from accessing rockbox structures (e.g. current_tick, event queues) before they're ready. This commit adds wait_rockbox_ready() and fixes dodgy behavior of starting rockbox via widget play button, headset remote buttons or multimedia keys. Also fixes wrong small list items before first redraw. Change-Id: I1caf925e829a9c1c6bb6e0016d5c80574574c91e
This commit is contained in:
parent
b0df323391
commit
58e097d4a6
5 changed files with 62 additions and 2 deletions
|
@ -122,6 +122,9 @@ Java_org_rockbox_RockboxFramebuffer_surfaceCreated(JNIEnv *env, jobject this,
|
|||
connect_with_java(env, this);
|
||||
display_on = true;
|
||||
|
||||
/* need to wait for button_queue to be valid to post to */
|
||||
wait_rockbox_ready();
|
||||
|
||||
send_event(LCD_EVENT_ACTIVATION, NULL);
|
||||
/* Force an update, since the newly created surface is initially black
|
||||
* waiting for the next normal update results in a longish black screen */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue