1
0
Fork 0
forked from len0rd/rockbox

Clean up usage of RockboxService. Add a proper way to check if rockbox is actually running (checking RockboxService.fb != null was very very bad)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28406 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2010-10-31 10:35:42 +00:00
parent 78b2711e58
commit 26f7ee13ce
4 changed files with 71 additions and 32 deletions

View file

@ -78,11 +78,9 @@ void lcd_init_device(void)
"java_lcd_update_rect",
"(IIII)V");
/* at last, give RockboxService the Framebuffer instance */
jfieldID id = e->GetStaticFieldID(env_ptr, RockboxService_class,
"fb", "Lorg/rockbox/RockboxFramebuffer;");
e->SetStaticObjectField(env_ptr, RockboxService_class,
id, RockboxFramebuffer_instance);
jmethodID fbsetter = e->GetMethodID(env_ptr,RockboxService_class,
"set_fb", "(Lorg/rockbox/RockboxFramebuffer;)V");
e->CallVoidMethod(env_ptr, RockboxService_instance, fbsetter, RockboxFramebuffer_instance);
display_on = true;
}