(UI Companion) Call UI companion 'toggle' function at startup when setting is

enabled
This commit is contained in:
twinaphex 2015-04-13 02:14:34 +02:00
parent 02d31acbfb
commit 57877284ec
2 changed files with 7 additions and 1 deletions

View File

@ -339,6 +339,12 @@ returntype main_entry(signature())
if (driver)
driver->ui_companion = (ui_companion_driver_t*)ui_companion_init_first();
if (driver->ui_companion && driver->ui_companion->toggle)
{
if (settings->ui.companion_start_on_boot)
driver->ui_companion->toggle(driver->ui_companion_data);
}
#if defined(HAVE_MAIN_LOOP)
while (rarch_main_iterate() != -1);

View File

@ -33,7 +33,7 @@ typedef struct ui_companion_driver
void *(*init)(void);
void (*deinit)(void *data);
int (*iterate)(void *data, unsigned action);
void (*toggle_companion_ui)(void *data);
void (*toggle)(void *data);
void (*notify_content_loaded)(void *data);
const char *ident;