Move apple_rarch_exited to UI companion drivers
This commit is contained in:
parent
4c8d2881dd
commit
aa54f7fb41
|
@ -365,10 +365,6 @@ static void frontend_apple_get_environment_settings(int *argc, char *argv[],
|
||||||
CFRelease(bundle_url);
|
CFRelease(bundle_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
|
||||||
extern void apple_rarch_exited(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void frontend_apple_load_content(void)
|
static void frontend_apple_load_content(void)
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
driver_t *driver = driver_get_ptr();
|
||||||
|
@ -378,13 +374,6 @@ static void frontend_apple_load_content(void)
|
||||||
ui->notify_content_loaded(driver->ui_companion_data);
|
ui->notify_content_loaded(driver->ui_companion_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void frontend_apple_shutdown(bool unused)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_COCOA) || defined(HAVE_COCOATOUCH)
|
|
||||||
apple_rarch_exited();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
static int frontend_apple_get_rating(void)
|
static int frontend_apple_get_rating(void)
|
||||||
{
|
{
|
||||||
char model[PATH_MAX_LENGTH];
|
char model[PATH_MAX_LENGTH];
|
||||||
|
@ -531,7 +520,7 @@ const frontend_ctx_driver_t frontend_ctx_apple = {
|
||||||
NULL, /* process_args */
|
NULL, /* process_args */
|
||||||
NULL, /* exec */
|
NULL, /* exec */
|
||||||
NULL, /* set_fork */
|
NULL, /* set_fork */
|
||||||
frontend_apple_shutdown,
|
NULL, /* shutdown */
|
||||||
frontend_apple_get_name,
|
frontend_apple_get_name,
|
||||||
frontend_apple_get_os,
|
frontend_apple_get_os,
|
||||||
frontend_apple_get_rating,
|
frontend_apple_get_rating,
|
||||||
|
|
|
@ -548,6 +548,19 @@ static void menu_action_setting_disp_set_label_menu_file_plain(
|
||||||
path, "(FILE)", path_buf, path_buf_size);
|
path, "(FILE)", path_buf, path_buf_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void menu_action_setting_disp_set_label_menu_file_image(
|
||||||
|
file_list_t* list,
|
||||||
|
unsigned *w, unsigned type, unsigned i,
|
||||||
|
const char *label,
|
||||||
|
char *type_str, size_t type_str_size,
|
||||||
|
const char *entry_label,
|
||||||
|
const char *path,
|
||||||
|
char *path_buf, size_t path_buf_size)
|
||||||
|
{
|
||||||
|
menu_action_setting_generic_disp_set_label(w, type_str, type_str_size,
|
||||||
|
path, "(IMG)", path_buf, path_buf_size);
|
||||||
|
}
|
||||||
|
|
||||||
static void menu_action_setting_disp_set_label_menu_file_use_directory(
|
static void menu_action_setting_disp_set_label_menu_file_use_directory(
|
||||||
file_list_t* list,
|
file_list_t* list,
|
||||||
unsigned *w, unsigned type, unsigned i,
|
unsigned *w, unsigned type, unsigned i,
|
||||||
|
@ -832,6 +845,10 @@ void menu_entries_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *
|
||||||
cbs->action_get_representation =
|
cbs->action_get_representation =
|
||||||
menu_action_setting_disp_set_label_menu_file_plain;
|
menu_action_setting_disp_set_label_menu_file_plain;
|
||||||
break;
|
break;
|
||||||
|
case MENU_FILE_IMAGE:
|
||||||
|
cbs->action_get_representation =
|
||||||
|
menu_action_setting_disp_set_label_menu_file_image;
|
||||||
|
break;
|
||||||
case MENU_FILE_USE_DIRECTORY:
|
case MENU_FILE_USE_DIRECTORY:
|
||||||
cbs->action_get_representation =
|
cbs->action_get_representation =
|
||||||
menu_action_setting_disp_set_label_menu_file_use_directory;
|
menu_action_setting_disp_set_label_menu_file_use_directory;
|
||||||
|
|
|
@ -49,6 +49,8 @@ static void ui_companion_cocoa_deinit(void *data)
|
||||||
{
|
{
|
||||||
ui_companion_cocoa_t *handle = (ui_companion_cocoa_t*)data;
|
ui_companion_cocoa_t *handle = (ui_companion_cocoa_t*)data;
|
||||||
|
|
||||||
|
apple_rarch_exited();
|
||||||
|
|
||||||
if (handle)
|
if (handle)
|
||||||
free(handle);
|
free(handle);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,8 @@ static void ui_companion_cocoatouch_deinit(void *data)
|
||||||
{
|
{
|
||||||
ui_companion_cocoatouch_t *handle = (ui_companion_cocoatouch_t*)data;
|
ui_companion_cocoatouch_t *handle = (ui_companion_cocoatouch_t*)data;
|
||||||
|
|
||||||
|
apple_rarch_exited();
|
||||||
|
|
||||||
if (handle)
|
if (handle)
|
||||||
free(handle);
|
free(handle);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue