Use rarch_system_info_get_ptr
This commit is contained in:
parent
226b0976fa
commit
0fa871a296
|
@ -185,14 +185,12 @@ static bool ctr_audio_alive(void *data)
|
||||||
static bool ctr_audio_start(void *data)
|
static bool ctr_audio_start(void *data)
|
||||||
{
|
{
|
||||||
ctr_audio_t* ctr = (ctr_audio_t*)data;
|
ctr_audio_t* ctr = (ctr_audio_t*)data;
|
||||||
/* TODO/FIXME - we should not depend upon global state
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
* in audio/video/input drivers. */
|
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
|
|
||||||
/* prevents restarting audio when the menu
|
/* prevents restarting audio when the menu
|
||||||
* is toggled off on shutdown */
|
* is toggled off on shutdown */
|
||||||
|
|
||||||
if (global->system.shutdown)
|
if (system->shutdown)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// CSND_SetPlayState(0x8, 1);
|
// CSND_SetPlayState(0x8, 1);
|
||||||
|
|
|
@ -68,8 +68,10 @@ static void callback_sysutil_exit(uint64_t status,
|
||||||
{
|
{
|
||||||
case CELL_SYSUTIL_REQUEST_EXITGAME:
|
case CELL_SYSUTIL_REQUEST_EXITGAME:
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
global->system.shutdown = true;
|
|
||||||
|
if (system)
|
||||||
|
system->shutdown = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,7 +251,7 @@ static void android_gfx_ctx_check_window(void *data, bool *quit,
|
||||||
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
|
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
|
||||||
{
|
{
|
||||||
unsigned new_width, new_height;
|
unsigned new_width, new_height;
|
||||||
global_t *global = global_get_ptr();
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
|
|
||||||
(void)frame_count;
|
(void)frame_count;
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ static void android_gfx_ctx_check_window(void *data, bool *quit,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we are exiting. */
|
/* Check if we are exiting. */
|
||||||
if (global->system.shutdown)
|
if (system->shutdown)
|
||||||
*quit = true;
|
*quit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit,
|
||||||
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
|
bool *resize, unsigned *width, unsigned *height, unsigned frame_count)
|
||||||
{
|
{
|
||||||
unsigned new_width, new_height;
|
unsigned new_width, new_height;
|
||||||
global_t *global = global_get_ptr();
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
|
|
||||||
(void)data;
|
(void)data;
|
||||||
(void)frame_count;
|
(void)frame_count;
|
||||||
|
@ -340,7 +340,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we are exiting. */
|
/* Check if we are exiting. */
|
||||||
if (global->system.shutdown)
|
if (system->shutdown)
|
||||||
*quit = true;
|
*quit = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
||||||
* but it is desirable in some cases.
|
* but it is desirable in some cases.
|
||||||
*
|
*
|
||||||
* If square pixels are used, base_height will be equal to
|
* 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);
|
base_width = (unsigned)roundf(base_height * aspect_ratio);
|
||||||
|
|
||||||
/* Make sure that we don't get 0x scale ... */
|
/* Make sure that we don't get 0x scale ... */
|
||||||
|
|
|
@ -588,6 +588,7 @@ static void qnx_handle_navigator_event(
|
||||||
navigator_window_state_t state;
|
navigator_window_state_t state;
|
||||||
bps_event_t *event_pause = NULL;
|
bps_event_t *event_pause = NULL;
|
||||||
global_t *global = global_get_ptr();
|
global_t *global = global_get_ptr();
|
||||||
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
|
|
||||||
(void)rc;
|
(void)rc;
|
||||||
|
|
||||||
|
@ -618,7 +619,7 @@ static void qnx_handle_navigator_event(
|
||||||
}
|
}
|
||||||
else if (bps_event_get_code(event_pause) == NAVIGATOR_EXIT)
|
else if (bps_event_get_code(event_pause) == NAVIGATOR_EXIT)
|
||||||
{
|
{
|
||||||
global->system.shutdown = true;
|
system->shutdown = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
static int deferred_push_default(menu_displaylist_info_t *info)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
global_t *global = global_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->type_default = MENU_FILE_PLAIN;
|
||||||
info->setting = menu_setting_find(info->label);
|
info->setting = menu_setting_find(info->label);
|
||||||
|
@ -472,7 +473,7 @@ static int deferred_push_default(menu_displaylist_info_t *info)
|
||||||
sizeof(info->exts));
|
sizeof(info->exts));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
strlcpy(info->exts, global->system.valid_extensions, sizeof(info->exts));
|
strlcpy(info->exts, system->valid_extensions, sizeof(info->exts));
|
||||||
|
|
||||||
(void)settings;
|
(void)settings;
|
||||||
|
|
||||||
|
|
|
@ -315,11 +315,11 @@ static int core_setting_left(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
{
|
{
|
||||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
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;
|
(void)label;
|
||||||
|
|
||||||
core_option_prev(global->system.core_options, idx);
|
core_option_prev(system->core_options, idx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -317,11 +317,11 @@ int core_setting_right(unsigned type, const char *label,
|
||||||
bool wraparound)
|
bool wraparound)
|
||||||
{
|
{
|
||||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
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;
|
(void)label;
|
||||||
|
|
||||||
core_option_next(global->system.core_options, idx);
|
core_option_next(system->core_options, idx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,12 +253,12 @@ static int action_start_performance_counters_frontend(unsigned type,
|
||||||
static int action_start_core_setting(unsigned type,
|
static int action_start_core_setting(unsigned type,
|
||||||
const char *label)
|
const char *label)
|
||||||
{
|
{
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||||
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||||
|
|
||||||
(void)label;
|
(void)label;
|
||||||
|
|
||||||
core_option_set_default(global->system.core_options, idx);
|
core_option_set_default(system->core_options, idx);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue