parent
f4bf218f35
commit
b64f9bd64b
65
retroarch.c
65
retroarch.c
|
@ -6598,7 +6598,7 @@ static bool audio_compute_buffer_statistics(audio_statistics_t *stats)
|
||||||
uint64_t accum_var = 0;
|
uint64_t accum_var = 0;
|
||||||
unsigned low_water_count = 0;
|
unsigned low_water_count = 0;
|
||||||
unsigned high_water_count = 0;
|
unsigned high_water_count = 0;
|
||||||
const unsigned samples = MIN(
|
unsigned samples = MIN(
|
||||||
(unsigned)audio_driver_free_samples_count,
|
(unsigned)audio_driver_free_samples_count,
|
||||||
AUDIO_BUFFER_FREE_SAMPLES_COUNT);
|
AUDIO_BUFFER_FREE_SAMPLES_COUNT);
|
||||||
|
|
||||||
|
@ -14092,7 +14092,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
|
||||||
bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
|
bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
|
||||||
{
|
{
|
||||||
char *config_directory = NULL;
|
char *config_directory = NULL;
|
||||||
const size_t str_size = PATH_MAX_LENGTH * sizeof(char);
|
size_t str_size = PATH_MAX_LENGTH * sizeof(char);
|
||||||
const char *core_name = runloop_system.info.library_name;
|
const char *core_name = runloop_system.info.library_name;
|
||||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||||
|
|
||||||
|
@ -14135,7 +14135,7 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
|
||||||
* but this will do for now. */
|
* but this will do for now. */
|
||||||
static void retroarch_validate_cpu_features(void)
|
static void retroarch_validate_cpu_features(void)
|
||||||
{
|
{
|
||||||
const uint64_t cpu = cpu_features_get();
|
uint64_t cpu = cpu_features_get();
|
||||||
(void)cpu;
|
(void)cpu;
|
||||||
|
|
||||||
#ifdef __MMX__
|
#ifdef __MMX__
|
||||||
|
@ -14157,7 +14157,7 @@ static void retroarch_validate_cpu_features(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void retroarch_main_init_media(enum rarch_content_type cont_type,
|
static void retroarch_main_init_media(enum rarch_content_type cont_type,
|
||||||
const bool builtin_mediaplayer, const bool builtin_imageviewer)
|
bool builtin_mediaplayer, bool builtin_imageviewer)
|
||||||
{
|
{
|
||||||
switch (cont_type)
|
switch (cont_type)
|
||||||
{
|
{
|
||||||
|
@ -14272,8 +14272,8 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
const settings_t *settings = (const settings_t*)configuration_settings;
|
const settings_t *settings = (const settings_t*)configuration_settings;
|
||||||
enum rarch_content_type cont_type = path_is_media_type(fullpath);
|
enum rarch_content_type cont_type = path_is_media_type(fullpath);
|
||||||
const bool builtin_imageviewer = settings->bools.multimedia_builtin_imageviewer_enable;
|
bool builtin_imageviewer = settings->bools.multimedia_builtin_imageviewer_enable;
|
||||||
const bool builtin_mediaplayer = settings->bools.multimedia_builtin_mediaplayer_enable;
|
bool builtin_mediaplayer = settings->bools.multimedia_builtin_mediaplayer_enable;
|
||||||
|
|
||||||
retroarch_main_init_media(cont_type, builtin_mediaplayer,
|
retroarch_main_init_media(cont_type, builtin_mediaplayer,
|
||||||
builtin_imageviewer);
|
builtin_imageviewer);
|
||||||
|
@ -14438,8 +14438,8 @@ void rarch_menu_running_finished(bool quit)
|
||||||
**/
|
**/
|
||||||
static bool rarch_game_specific_options(char **output)
|
static bool rarch_game_specific_options(char **output)
|
||||||
{
|
{
|
||||||
const size_t game_path_size = 8192 * sizeof(char);
|
size_t game_path_size = 8192 * sizeof(char);
|
||||||
char *game_path = (char*)malloc(game_path_size);
|
char *game_path = (char*)malloc(game_path_size);
|
||||||
|
|
||||||
game_path[0] ='\0';
|
game_path[0] ='\0';
|
||||||
|
|
||||||
|
@ -14467,7 +14467,7 @@ static void runloop_task_msg_queue_push(
|
||||||
bool flush)
|
bool flush)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
#if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS)
|
||||||
const bool ready = menu_widgets_ready();
|
bool ready = menu_widgets_ready();
|
||||||
if (ready && task->title && !task->mute)
|
if (ready && task->title && !task->mute)
|
||||||
{
|
{
|
||||||
runloop_msg_queue_lock();
|
runloop_msg_queue_lock();
|
||||||
|
@ -14921,7 +14921,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||||
const settings_t *settings = (const settings_t*)configuration_settings;
|
const settings_t *settings = (const settings_t*)configuration_settings;
|
||||||
bool threaded_enable = settings->bools.threaded_data_runloop_enable;
|
bool threaded_enable = settings->bools.threaded_data_runloop_enable;
|
||||||
#else
|
#else
|
||||||
bool threaded_enable = false;
|
bool threaded_enable = false;
|
||||||
#endif
|
#endif
|
||||||
task_queue_deinit();
|
task_queue_deinit();
|
||||||
task_queue_init(threaded_enable, runloop_task_msg_queue_push);
|
task_queue_init(threaded_enable, runloop_task_msg_queue_push);
|
||||||
|
@ -14964,7 +14964,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||||
case RARCH_CTL_CORE_OPTIONS_GET:
|
case RARCH_CTL_CORE_OPTIONS_GET:
|
||||||
{
|
{
|
||||||
const settings_t *settings = (const settings_t*)configuration_settings;
|
const settings_t *settings = (const settings_t*)configuration_settings;
|
||||||
const unsigned log_level = settings->uints.libretro_log_level;
|
unsigned log_level = settings->uints.libretro_log_level;
|
||||||
|
|
||||||
struct retro_variable *var = (struct retro_variable*)data;
|
struct retro_variable *var = (struct retro_variable*)data;
|
||||||
|
|
||||||
|
@ -15279,8 +15279,7 @@ char* retroarch_get_shader_preset(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool retroarch_override_setting_is_set(
|
bool retroarch_override_setting_is_set(enum rarch_override_setting enum_idx, void *data)
|
||||||
enum rarch_override_setting enum_idx, void *data)
|
|
||||||
{
|
{
|
||||||
switch (enum_idx)
|
switch (enum_idx)
|
||||||
{
|
{
|
||||||
|
@ -15330,8 +15329,7 @@ bool retroarch_override_setting_is_set(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void retroarch_override_setting_set(
|
void retroarch_override_setting_set(enum rarch_override_setting enum_idx, void *data)
|
||||||
enum rarch_override_setting enum_idx, void *data)
|
|
||||||
{
|
{
|
||||||
switch (enum_idx)
|
switch (enum_idx)
|
||||||
{
|
{
|
||||||
|
@ -15393,8 +15391,7 @@ void retroarch_override_setting_set(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void retroarch_override_setting_unset(
|
void retroarch_override_setting_unset(enum rarch_override_setting enum_idx, void *data)
|
||||||
enum rarch_override_setting enum_idx, void *data)
|
|
||||||
{
|
{
|
||||||
switch (enum_idx)
|
switch (enum_idx)
|
||||||
{
|
{
|
||||||
|
@ -15543,8 +15540,7 @@ int retroarch_get_capabilities(enum rarch_capabilities type,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void retroarch_set_current_core_type(
|
void retroarch_set_current_core_type(enum rarch_core_type type, bool explicitly_set)
|
||||||
enum rarch_core_type type, bool explicitly_set)
|
|
||||||
{
|
{
|
||||||
if (explicitly_set && !has_set_core)
|
if (explicitly_set && !has_set_core)
|
||||||
{
|
{
|
||||||
|
@ -15799,26 +15795,27 @@ static bool input_driver_toggle_button_combo(
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum runloop_state runloop_check_state(
|
static enum runloop_state runloop_check_state(
|
||||||
const bool input_nonblock_state,
|
settings_t *settings,
|
||||||
const bool runloop_is_paused,
|
bool input_nonblock_state,
|
||||||
const float fastforward_ratio)
|
bool runloop_is_paused,
|
||||||
|
float fastforward_ratio,
|
||||||
|
unsigned *sleep_ms)
|
||||||
{
|
{
|
||||||
input_bits_t current_bits;
|
input_bits_t current_bits;
|
||||||
settings_t *settings = configuration_settings;
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
static input_bits_t last_input = {{0}};
|
static input_bits_t last_input = {{0}};
|
||||||
#endif
|
#endif
|
||||||
static bool old_focus = true;
|
static bool old_focus = true;
|
||||||
bool is_focused = video_has_focus();
|
bool is_focused = video_has_focus();
|
||||||
const bool is_alive = current_video ?
|
bool is_alive = current_video ?
|
||||||
current_video->alive(video_driver_data) : true;
|
current_video->alive(video_driver_data) : true;
|
||||||
uint64_t frame_count = video_driver_frame_count;
|
uint64_t frame_count = video_driver_frame_count;
|
||||||
bool focused = true;
|
bool focused = true;
|
||||||
const bool pause_nonactive = settings->bools.pause_nonactive;
|
bool pause_nonactive = settings->bools.pause_nonactive;
|
||||||
const bool rarch_is_initialized = rarch_is_inited;
|
bool rarch_is_initialized = rarch_is_inited;
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
bool menu_driver_binding_state = menu_driver_is_binding_state();
|
bool menu_driver_binding_state = menu_driver_is_binding_state();
|
||||||
const bool menu_is_alive = menu_driver_is_alive();
|
bool menu_is_alive = menu_driver_is_alive();
|
||||||
unsigned menu_toggle_gamepad_combo = settings->uints.input_menu_toggle_gamepad_combo;
|
unsigned menu_toggle_gamepad_combo = settings->uints.input_menu_toggle_gamepad_combo;
|
||||||
#ifdef HAVE_EASTEREGG
|
#ifdef HAVE_EASTEREGG
|
||||||
static uint64_t seq = 0;
|
static uint64_t seq = 0;
|
||||||
|
@ -16640,13 +16637,13 @@ void runloop_unset(enum runloop_action action)
|
||||||
int runloop_iterate(unsigned *sleep_ms)
|
int runloop_iterate(unsigned *sleep_ms)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
const bool runloop_is_paused = runloop_paused;
|
bool runloop_is_paused = runloop_paused;
|
||||||
const bool input_nonblock_state = input_driver_nonblock_state;
|
bool input_nonblock_state = input_driver_nonblock_state;
|
||||||
settings_t *settings = configuration_settings;
|
settings_t *settings = configuration_settings;
|
||||||
const float fastforward_ratio = settings->floats.fastforward_ratio;
|
float fastforward_ratio = settings->floats.fastforward_ratio;
|
||||||
unsigned video_frame_delay = settings->uints.video_frame_delay;
|
unsigned video_frame_delay = settings->uints.video_frame_delay;
|
||||||
const bool vrr_runloop_enable = settings->bools.vrr_runloop_enable;
|
bool vrr_runloop_enable = settings->bools.vrr_runloop_enable;
|
||||||
const unsigned max_users = input_driver_max_users;
|
unsigned max_users = input_driver_max_users;
|
||||||
|
|
||||||
#ifdef HAVE_DISCORD
|
#ifdef HAVE_DISCORD
|
||||||
if (discord_is_inited)
|
if (discord_is_inited)
|
||||||
|
@ -16682,9 +16679,11 @@ int runloop_iterate(unsigned *sleep_ms)
|
||||||
|
|
||||||
switch ((enum runloop_state)
|
switch ((enum runloop_state)
|
||||||
runloop_check_state(
|
runloop_check_state(
|
||||||
|
settings,
|
||||||
input_nonblock_state,
|
input_nonblock_state,
|
||||||
runloop_is_paused,
|
runloop_is_paused,
|
||||||
fastforward_ratio))
|
fastforward_ratio,
|
||||||
|
sleep_ms))
|
||||||
{
|
{
|
||||||
case RUNLOOP_STATE_QUIT:
|
case RUNLOOP_STATE_QUIT:
|
||||||
frame_limit_last_time = 0.0;
|
frame_limit_last_time = 0.0;
|
||||||
|
|
Loading…
Reference in New Issue