Use rarch_system_info_get_ptr

This commit is contained in:
twinaphex 2015-06-25 13:46:32 +02:00
parent 226b0976fa
commit 0fa871a296
10 changed files with 23 additions and 21 deletions

View File

@ -185,14 +185,12 @@ static bool ctr_audio_alive(void *data)
static bool ctr_audio_start(void *data)
{
ctr_audio_t* ctr = (ctr_audio_t*)data;
/* TODO/FIXME - we should not depend upon global state
* in audio/video/input drivers. */
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
/* prevents restarting audio when the menu
* is toggled off on shutdown */
if (global->system.shutdown)
if (system->shutdown)
return true;
// CSND_SetPlayState(0x8, 1);

View File

@ -68,8 +68,10 @@ static void callback_sysutil_exit(uint64_t status,
{
case CELL_SYSUTIL_REQUEST_EXITGAME:
{
global_t *global = global_get_ptr();
global->system.shutdown = true;
rarch_system_info_t *system = rarch_system_info_get_ptr();
if (system)
system->shutdown = true;
}
break;
}

View File

@ -251,7 +251,7 @@ static void android_gfx_ctx_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{
unsigned new_width, new_height;
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)frame_count;
@ -267,7 +267,7 @@ static void android_gfx_ctx_check_window(void *data, bool *quit,
}
/* Check if we are exiting. */
if (global->system.shutdown)
if (system->shutdown)
*quit = true;
}

View File

@ -324,7 +324,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
{
unsigned new_width, new_height;
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)data;
(void)frame_count;
@ -340,7 +340,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit,
}
/* Check if we are exiting. */
if (global->system.shutdown)
if (system->shutdown)
*quit = true;
}

View File

@ -193,7 +193,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
* but it is desirable in some cases.
*
* If square pixels are used, base_height will be equal to
* global->system.av_info.base_height. */
* system->av_info.base_height. */
base_width = (unsigned)roundf(base_height * aspect_ratio);
/* Make sure that we don't get 0x scale ... */

View File

@ -588,6 +588,7 @@ static void qnx_handle_navigator_event(
navigator_window_state_t state;
bps_event_t *event_pause = NULL;
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)rc;
@ -618,7 +619,7 @@ static void qnx_handle_navigator_event(
}
else if (bps_event_get_code(event_pause) == NAVIGATOR_EXIT)
{
global->system.shutdown = true;
system->shutdown = true;
break;
}
}

View File

@ -458,8 +458,9 @@ static int deferred_push_detect_core_list(menu_displaylist_info_t *info)
static int deferred_push_default(menu_displaylist_info_t *info)
{
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
info->type_default = MENU_FILE_PLAIN;
info->setting = menu_setting_find(info->label);
@ -472,7 +473,7 @@ static int deferred_push_default(menu_displaylist_info_t *info)
sizeof(info->exts));
}
else
strlcpy(info->exts, global->system.valid_extensions, sizeof(info->exts));
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
(void)settings;

View File

@ -315,11 +315,11 @@ static int core_setting_left(unsigned type, const char *label,
bool wraparound)
{
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)label;
core_option_prev(global->system.core_options, idx);
core_option_prev(system->core_options, idx);
return 0;
}

View File

@ -317,11 +317,11 @@ int core_setting_right(unsigned type, const char *label,
bool wraparound)
{
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
global_t *global = global_get_ptr();
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)label;
core_option_next(global->system.core_options, idx);
core_option_next(system->core_options, idx);
return 0;
}

View File

@ -253,12 +253,12 @@ static int action_start_performance_counters_frontend(unsigned type,
static int action_start_core_setting(unsigned type,
const char *label)
{
global_t *global = global_get_ptr();
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
rarch_system_info_t *system = rarch_system_info_get_ptr();
(void)label;
core_option_set_default(global->system.core_options, idx);
core_option_set_default(system->core_options, idx);
return 0;
}