mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
plugin: don't start plugin when another non-tsr plugin is running
Change-Id: Ie5fc8220e5d586a5493992719c55e9d2f235b090
This commit is contained in:
parent
eb91595988
commit
e519356c47
1 changed files with 10 additions and 2 deletions
|
@ -860,8 +860,16 @@ int plugin_load(const char* plugin, const void* parameter)
|
|||
const char *sepch = strrchr(plugin, PATH_SEPCH);
|
||||
bool theme_enabled = sepch && !strcmp("properties.rock", sepch + 1);
|
||||
|
||||
if (current_plugin_handle && pfn_tsr_exit)
|
||||
{ /* if we have a resident old plugin and a callback */
|
||||
if (current_plugin_handle)
|
||||
{
|
||||
if (!pfn_tsr_exit)
|
||||
{
|
||||
/* not allowing another plugin to load */
|
||||
logf("Attempt to load plugin `%s` while another non-TSR plugin `%s` is running.", plugin, current_plugin);
|
||||
return PLUGIN_OK;
|
||||
}
|
||||
|
||||
/* if we have a resident old plugin and a callback */
|
||||
bool reenter = (strcmp(current_plugin, plugin) == 0);
|
||||
int exit_status = pfn_tsr_exit(reenter);
|
||||
if (exit_status == PLUGIN_TSR_CONTINUE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue