Divorce system info from global runloop state entirely

This commit is contained in:
twinaphex 2015-06-25 13:50:52 +02:00
parent 0fa871a296
commit 732d2db40e
4 changed files with 12 additions and 7 deletions

View File

@ -533,7 +533,8 @@ void uninit_libretro_sym(void)
/* No longer valid. */
free(system->special);
free(system->ports);
memset(&global->system, 0, sizeof(global->system));
rarch_system_info_clear();
driver->camera_active = false;
driver->location_active = false;

View File

@ -317,12 +317,16 @@ static void set_special_paths(char **argv, unsigned num_content)
sizeof(settings->system_directory));
}
rarch_system_info_t g_system;
rarch_system_info_t *rarch_system_info_get_ptr(void)
{
global_t *global = global_get_ptr();
if (!global)
return NULL;
return &global->system;
return &g_system;
}
void rarch_system_info_clear(void)
{
memset(&g_system, 0, sizeof(g_system));
}
void set_paths_redirect(const char *path)

View File

@ -150,8 +150,6 @@ typedef struct global
unsigned windowed_scale;
} pending;
rarch_system_info_t system;
#ifdef HAVE_MENU
struct
{

View File

@ -59,6 +59,8 @@ typedef struct rarch_system_info
rarch_system_info_t *rarch_system_info_get_ptr(void);
void rarch_system_info_clear(void);
#ifdef __cplusplus
}
#endif