Add install_signal_handler callback

This commit is contained in:
twinaphex 2016-07-08 02:10:40 +02:00
parent 1a148da76a
commit 6cdc34e891
13 changed files with 22 additions and 0 deletions

View File

@ -280,5 +280,6 @@ frontend_ctx_driver_t frontend_ctx_ctr = {
frontend_ctr_parse_drive_list,
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
"ctr",
};

View File

@ -723,5 +723,6 @@ frontend_ctx_driver_t frontend_ctx_darwin = {
frontend_darwin_parse_drive_list,
frontend_darwin_get_mem_total,
frontend_darwin_get_mem_used,
NULL, /* install_signal_handler */
"darwin",
};

View File

@ -526,5 +526,6 @@ frontend_ctx_driver_t frontend_ctx_gx = {
frontend_gx_parse_drive_list,
frontend_gx_get_mem_total,
frontend_gx_get_mem_used,
NULL, /* install_signal_handler */
"gx",
};

View File

@ -1995,6 +1995,7 @@ frontend_ctx_driver_t frontend_ctx_linux = {
#endif
frontend_linux_get_mem_total,
frontend_linux_get_mem_used,
NULL, /* install_signal_handler */
#ifdef ANDROID
"android"
#else

View File

@ -37,5 +37,6 @@ frontend_ctx_driver_t frontend_ctx_null = {
NULL, /* parse_drive_list */
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
"null",
};

View File

@ -542,5 +542,6 @@ frontend_ctx_driver_t frontend_ctx_ps3 = {
frontend_ps3_parse_drive_list,
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
"ps3",
};

View File

@ -407,6 +407,7 @@ frontend_ctx_driver_t frontend_ctx_psp = {
frontend_psp_parse_drive_list,
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
#ifdef VITA
"vita",
#else

View File

@ -86,5 +86,6 @@ frontend_ctx_driver_t frontend_ctx_qnx = {
NULL, /* parse_drive_list */
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
"qnx",
};

View File

@ -333,5 +333,6 @@ frontend_ctx_driver_t frontend_ctx_win32 = {
frontend_win32_parse_drive_list,
frontend_win32_get_mem_total,
frontend_win32_get_mem_used,
NULL, /* install_signal_handler */
"win32"
};

View File

@ -1408,5 +1408,6 @@ frontend_ctx_driver_t frontend_ctx_xdk = {
frontend_xdk_parse_drive_list,
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
"xdk",
};

View File

@ -85,5 +85,6 @@ frontend_ctx_driver_t frontend_ctx_qnx = {
NULL, /* get_powerstate */
NULL, /* parse_drive_list */
NULL, /* get_mem_total */
NULL, /* install_signal_handler */
"xenon",
};

View File

@ -324,4 +324,12 @@ uint64_t frontend_driver_get_used_memory(void)
return 0;
return frontend->get_used_mem();
}
void frontend_driver_install_sighandler(void)
{
frontend_ctx_driver_t *frontend = frontend_get_ptr();
if (!frontend || !frontend->install_signal_handler)
return;
frontend->install_signal_handler();
}
#endif

View File

@ -82,6 +82,7 @@ typedef struct frontend_ctx_driver
int (*parse_drive_list)(void*);
uint64_t (*get_total_mem)(void);
uint64_t (*get_used_mem)(void);
void (*install_signal_handler)(void);
const char *ident;
@ -159,6 +160,8 @@ uint64_t frontend_driver_get_total_memory(void);
uint64_t frontend_driver_get_used_memory(void);
void frontend_driver_install_sighandler(void);
RETRO_END_DECLS
#endif