1
0
Fork 0
forked from len0rd/rockbox

* give tsr plugins the choice to quit or not

* bumps plugin api version


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11405 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2006-10-31 11:17:00 +00:00
parent 23f127ddd7
commit 29e259a291
4 changed files with 61 additions and 28 deletions

View file

@ -1122,8 +1122,10 @@ void thread(void)
}
/* callback to end the TSR plugin, called before a new one gets loaded */
void exit_tsr(void)
bool exit_tsr(bool reenter)
{
if (reenter)
return false; /* dont let it start again */
gTread.exiting = true; /* tell the thread to end */
while (!gTread.ended) /* wait until it did */
rb->yield();
@ -1133,6 +1135,7 @@ void exit_tsr(void)
timer_set_mode(TM_OFF); /* timer interrupt off */
sound_normal(); /* restore sound settings */
return true;
}
/****************** main ******************/