forked from len0rd/rockbox
Android: Partly revert r29569 and only call the new getJavaEnvironment() when needed.
The environment is fine to share in general, just not across OS threads, so it's only needed for functions which are possibly called from multiple OS threads (only 1 currently). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29601 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
efa9f13500
commit
046cec3aa7
10 changed files with 50 additions and 55 deletions
|
@ -28,6 +28,7 @@
|
|||
#include "lcd.h"
|
||||
#include "button.h"
|
||||
|
||||
extern JNIEnv *env_ptr;
|
||||
extern jobject RockboxService_instance;
|
||||
|
||||
static jobject RockboxFramebuffer_instance;
|
||||
|
@ -90,8 +91,6 @@ void lcd_init_device(void)
|
|||
|
||||
void lcd_update(void)
|
||||
{
|
||||
JNIEnv *env_ptr = getJavaEnvironment();
|
||||
|
||||
if (display_on)
|
||||
(*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance,
|
||||
java_lcd_update);
|
||||
|
@ -99,8 +98,6 @@ void lcd_update(void)
|
|||
|
||||
void lcd_update_rect(int x, int y, int width, int height)
|
||||
{
|
||||
JNIEnv *env_ptr = getJavaEnvironment();
|
||||
|
||||
if (display_on)
|
||||
(*env_ptr)->CallVoidMethod(env_ptr, RockboxFramebuffer_instance,
|
||||
java_lcd_update_rect, x, y, width, height);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue