forked from len0rd/rockbox
Fixed USB handling in grayscale library mode.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8435 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
afe36f4267
commit
ef4241a2ee
1 changed files with 18 additions and 14 deletions
|
@ -477,6 +477,17 @@ static void cube_draw(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cleanup(void *parameter)
|
||||||
|
{
|
||||||
|
(void)parameter;
|
||||||
|
|
||||||
|
#ifdef USE_GSLIB
|
||||||
|
gray_release();
|
||||||
|
#elif defined HAVE_LCD_CHARCELLS
|
||||||
|
pgfx_release();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
{
|
{
|
||||||
char buffer[30];
|
char buffer[30];
|
||||||
|
@ -753,27 +764,20 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (rb->default_event_handler(button) == SYS_USB_CONNECTED)
|
if (rb->default_event_handler_ex(button, cleanup, NULL)
|
||||||
{
|
== SYS_USB_CONNECTED)
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
pgfx_release();
|
|
||||||
#elif defined(USE_GSLIB)
|
|
||||||
gray_release();
|
|
||||||
#endif
|
|
||||||
return PLUGIN_USB_CONNECTED;
|
return PLUGIN_USB_CONNECTED;
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (button != BUTTON_NONE)
|
if (button != BUTTON_NONE)
|
||||||
lastbutton = button;
|
lastbutton = button;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LCD_CHARCELLS
|
|
||||||
pgfx_release();
|
|
||||||
#elif defined(USE_GSLIB)
|
|
||||||
gray_release();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#ifdef USE_GSLIB
|
||||||
|
gray_release();
|
||||||
|
#elif defined(HAVE_LCD_CHARCELLS)
|
||||||
|
pgfx_release();
|
||||||
|
#endif
|
||||||
return PLUGIN_OK;
|
return PLUGIN_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue