(Salamander) frontend_context.h gets new member function

'salamander_init'
This commit is contained in:
twinaphex 2014-02-24 18:23:12 +01:00
parent fb718af5c2
commit 03ec845977
6 changed files with 25 additions and 5 deletions

View File

@ -39,6 +39,9 @@ typedef struct frontend_ctx_driver
// Human readable string. // Human readable string.
const char *ident; const char *ident;
#ifdef IS_SALAMANDER
void (*salamander_init)(void);
#endif
} frontend_ctx_driver_t; } frontend_ctx_driver_t;
extern const frontend_ctx_driver_t frontend_ctx_gx; extern const frontend_ctx_driver_t frontend_ctx_gx;

View File

@ -96,11 +96,16 @@ int main(int argc, char *argv[])
if (frontend_ctx && frontend_ctx->init) if (frontend_ctx && frontend_ctx->init)
frontend_ctx->init(args); frontend_ctx->init(args);
get_environment_settings(argc, argv, args);
salamander_init_settings(); if (frontend_ctx && frontend_ctx->environment_get)
frontend_ctx->environment_get(argc, argv, args);
if (frontend_ctx && frontend_ctx->salamander_init)
frontend_ctx->salamander_init();
if (frontend_ctx && frontend_ctx->deinit) if (frontend_ctx && frontend_ctx->deinit)
frontend_ctx->deinit(args); frontend_ctx->deinit(args);
if (frontend_ctx && frontend_ctx->exitspawn) if (frontend_ctx && frontend_ctx->exitspawn)
frontend_ctx->exitspawn(); frontend_ctx->exitspawn();

View File

@ -67,7 +67,7 @@ static void find_and_set_first_file(void)
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n"); RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
} }
static void salamander_init_settings(void) static void salamander_init(void)
{ {
char tmp_str[512] = {0}; char tmp_str[512] = {0};
bool config_file_exists; bool config_file_exists;
@ -376,4 +376,7 @@ const frontend_ctx_driver_t frontend_ctx_gx = {
system_exec, /* exec */ system_exec, /* exec */
NULL, /* shutdown */ NULL, /* shutdown */
"gx", "gx",
#ifdef IS_SALAMANDER
salamander_init,
#endif
}; };

View File

@ -69,7 +69,7 @@ static void find_and_set_first_file(void)
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n"); RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
} }
static void salamander_init_settings(void) static void salamander_init(void)
{ {
CellPadData pad_data; CellPadData pad_data;
cellPadInit(7); cellPadInit(7);
@ -462,4 +462,7 @@ const frontend_ctx_driver_t frontend_ctx_ps3 = {
system_exec, /* exec */ system_exec, /* exec */
NULL, /* shutdown */ NULL, /* shutdown */
"ps3", "ps3",
#ifdef IS_SALAMANDER
salamander_init,
#endif
}; };

View File

@ -132,4 +132,7 @@ const frontend_ctx_driver_t frontend_ctx_psp = {
NULL, /* exec */ NULL, /* exec */
NULL, /* shutdown */ NULL, /* shutdown */
"psp", "psp",
#ifdef IS_SALAMANDER
NULL,
#endif
}; };

View File

@ -60,7 +60,7 @@ static void find_and_set_first_file(void)
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n"); RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
} }
static void salamander_init_settings(void) static void salamander_init(void)
{ {
XINPUT_STATE state; XINPUT_STATE state;
(void)state; (void)state;
@ -365,4 +365,7 @@ const frontend_ctx_driver_t frontend_ctx_xdk = {
system_exec, /* exec */ system_exec, /* exec */
NULL, /* shutdown */ NULL, /* shutdown */
"xdk", "xdk",
#ifdef IS_SALAMANDER
salamander_init,
#endif
}; };