forked from len0rd/rockbox
Android: delete the global reference in surfaceDestroyed
This gets rid of the lcd_deinit() boilerplate. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29572 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
80a2c80332
commit
0b18522cd0
2 changed files with 5 additions and 14 deletions
|
@ -87,13 +87,6 @@ void connect_with_java(JNIEnv* env, jobject fb_instance)
|
||||||
(jint)LCD_WIDTH, (jint)LCD_HEIGHT, native_buffer);
|
(jint)LCD_WIDTH, (jint)LCD_HEIGHT, native_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_deinit(void)
|
|
||||||
{
|
|
||||||
JNIEnv *env_ptr = getJavaEnvironment();
|
|
||||||
|
|
||||||
(*env_ptr)->DeleteGlobalRef(env_ptr, RockboxFramebuffer_instance);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Do nothing here and connect with the java object later (if it isn't already)
|
* Do nothing here and connect with the java object later (if it isn't already)
|
||||||
*/
|
*/
|
||||||
|
@ -148,9 +141,12 @@ JNIEXPORT void JNICALL
|
||||||
Java_org_rockbox_RockboxFramebuffer_surfaceDestroyed(JNIEnv *e, jobject this,
|
Java_org_rockbox_RockboxFramebuffer_surfaceDestroyed(JNIEnv *e, jobject this,
|
||||||
jobject surfaceholder)
|
jobject surfaceholder)
|
||||||
{
|
{
|
||||||
(void)e; (void)this; (void)surfaceholder;
|
(void)this; (void)surfaceholder;
|
||||||
|
|
||||||
display_on = false;
|
display_on = false;
|
||||||
|
|
||||||
|
(*e)->DeleteGlobalRef(e, RockboxFramebuffer_instance);
|
||||||
|
RockboxFramebuffer_instance = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool lcd_active(void)
|
bool lcd_active(void)
|
||||||
|
|
|
@ -36,15 +36,10 @@ uintptr_t *stackend;
|
||||||
|
|
||||||
extern int main(void);
|
extern int main(void);
|
||||||
extern void telephony_init_device(void);
|
extern void telephony_init_device(void);
|
||||||
extern void lcd_deinit(void);
|
|
||||||
|
|
||||||
void system_exception_wait(void) { }
|
void system_exception_wait(void) { }
|
||||||
void system_reboot(void) { }
|
void system_reboot(void) { }
|
||||||
|
void power_off(void) { }
|
||||||
void power_off(void)
|
|
||||||
{
|
|
||||||
lcd_deinit();
|
|
||||||
}
|
|
||||||
|
|
||||||
void system_init(void)
|
void system_init(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue