mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Explicit typecasts to bool
This commit is contained in:
parent
1b128c61d6
commit
5f94f36204
@ -150,11 +150,9 @@ static void cocoa_vk_gfx_ctx_check_window(void *data, bool *quit,
|
|||||||
{
|
{
|
||||||
unsigned new_width, new_height;
|
unsigned new_width, new_height;
|
||||||
cocoa_vk_ctx_data_t *cocoa_ctx = (cocoa_vk_ctx_data_t*)data;
|
cocoa_vk_ctx_data_t *cocoa_ctx = (cocoa_vk_ctx_data_t*)data;
|
||||||
|
|
||||||
*quit = false;
|
*quit = false;
|
||||||
|
*resize = (cocoa_ctx->vk.flags &
|
||||||
*resize = cocoa_ctx->vk.flags &
|
VK_DATA_FLAG_NEED_NEW_SWAPCHAIN) ? true : false;
|
||||||
VK_DATA_FLAG_NEED_NEW_SWAPCHAIN;
|
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_10_7 && defined(OSX)
|
#if MAC_OS_X_VERSION_10_7 && defined(OSX)
|
||||||
cocoa_vk_gfx_ctx_get_video_size_osx10_7_and_up(data, &new_width, &new_height);
|
cocoa_vk_gfx_ctx_get_video_size_osx10_7_and_up(data, &new_width, &new_height);
|
||||||
|
@ -95,7 +95,7 @@ static void gfx_ctx_khr_display_check_window(void *data, bool *quit,
|
|||||||
bool *resize, unsigned *width, unsigned *height)
|
bool *resize, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data;
|
khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data;
|
||||||
*resize = khr->vk.flags & VK_DATA_FLAG_NEED_NEW_SWAPCHAIN;
|
*resize = (khr->vk.flags & VK_DATA_FLAG_NEED_NEW_SWAPCHAIN) ? true : false;
|
||||||
|
|
||||||
if (khr->width != *width || khr->height != *height)
|
if (khr->width != *width || khr->height != *height)
|
||||||
{
|
{
|
||||||
|
@ -5336,7 +5336,7 @@ static void ozone_compute_entries_position(
|
|||||||
file_list_t *selection_buf = NULL;
|
file_list_t *selection_buf = NULL;
|
||||||
int entry_padding = ozone_get_entries_padding(ozone);
|
int entry_padding = ozone_get_entries_padding(ozone);
|
||||||
float scale_factor = ozone->last_scale_factor;
|
float scale_factor = ozone->last_scale_factor;
|
||||||
bool want_thumbnail_bar = ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
bool want_thumbnail_bar = (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR) ? true : false;
|
||||||
bool show_thumbnail_bar = ozone->show_thumbnail_bar;
|
bool show_thumbnail_bar = ozone->show_thumbnail_bar;
|
||||||
|
|
||||||
if (show_thumbnail_bar != want_thumbnail_bar)
|
if (show_thumbnail_bar != want_thumbnail_bar)
|
||||||
@ -7697,8 +7697,8 @@ static bool ozone_help_available(ozone_handle_t *ozone, size_t current_selection
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !(
|
return !(
|
||||||
(ozone->flags & OZONE_FLAG_IS_PLAYLIST) ||
|
(ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
||||||
(ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7979,10 +7979,9 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||||||
|
|
||||||
if (ozone->flags & OZONE_FLAG_CURSOR_IN_SIDEBAR)
|
if (ozone->flags & OZONE_FLAG_CURSOR_IN_SIDEBAR)
|
||||||
{
|
{
|
||||||
|
char playlist_path[PATH_MAX_LENGTH];
|
||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
size_t new_selection = 0;
|
size_t new_selection = 0;
|
||||||
char playlist_path[PATH_MAX_LENGTH];
|
|
||||||
|
|
||||||
/* If cursor is active, ensure we target
|
/* If cursor is active, ensure we target
|
||||||
* an on screen category */
|
* an on screen category */
|
||||||
size_t tab_selection = (ozone->flags & OZONE_FLAG_CURSOR_MODE)
|
size_t tab_selection = (ozone->flags & OZONE_FLAG_CURSOR_MODE)
|
||||||
@ -8055,8 +8054,8 @@ static enum menu_action ozone_parse_menu_entry_action(
|
|||||||
|
|
||||||
if ( (ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE)
|
if ( (ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE)
|
||||||
&& (!(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
&& (!(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
||||||
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT) ||
|
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|
||||||
(ozone->is_quick_menu && !string_is_empty(ozone->savestate_thumbnail_file_path))))
|
|| (ozone->is_quick_menu && !string_is_empty(ozone->savestate_thumbnail_file_path))))
|
||||||
{
|
{
|
||||||
ozone_show_fullscreen_thumbnails(ozone);
|
ozone_show_fullscreen_thumbnails(ozone);
|
||||||
ozone->flags2 |= OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS;
|
ozone->flags2 |= OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS;
|
||||||
@ -8874,7 +8873,7 @@ static void ozone_update_thumbnail_image(void *data)
|
|||||||
: OZONE_PENDING_THUMBNAIL_LEFT;
|
: OZONE_PENDING_THUMBNAIL_LEFT;
|
||||||
|
|
||||||
show_thumbnail_bar = ozone->show_thumbnail_bar;
|
show_thumbnail_bar = ozone->show_thumbnail_bar;
|
||||||
want_thumbnail_bar = ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
want_thumbnail_bar = (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR) ? true : false;
|
||||||
if (show_thumbnail_bar != want_thumbnail_bar)
|
if (show_thumbnail_bar != want_thumbnail_bar)
|
||||||
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
|
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
|
||||||
}
|
}
|
||||||
@ -11211,8 +11210,8 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
|
|||||||
/* Filebrowser image updates */
|
/* Filebrowser image updates */
|
||||||
else if (ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
else if (ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
||||||
{
|
{
|
||||||
if ((entry_type == FILE_TYPE_IMAGEVIEWER) ||
|
if ( (entry_type == FILE_TYPE_IMAGEVIEWER)
|
||||||
(entry_type == FILE_TYPE_IMAGE))
|
|| (entry_type == FILE_TYPE_IMAGE))
|
||||||
{
|
{
|
||||||
ozone_set_thumbnail_content(ozone, "imageviewer");
|
ozone_set_thumbnail_content(ozone, "imageviewer");
|
||||||
update_thumbnails = true;
|
update_thumbnails = true;
|
||||||
@ -11516,7 +11515,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||||||
MENU_LIST_GET_SELECTION(menu_list, 0),
|
MENU_LIST_GET_SELECTION(menu_list, 0),
|
||||||
ozone->animations.list_alpha,
|
ozone->animations.list_alpha,
|
||||||
ozone->animations.scroll_y,
|
ozone->animations.scroll_y,
|
||||||
ozone->flags & OZONE_FLAG_IS_PLAYLIST,
|
(ozone->flags & OZONE_FLAG_IS_PLAYLIST) ? true : false,
|
||||||
&mymat
|
&mymat
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -11534,7 +11533,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
|||||||
&ozone->selection_buf_old,
|
&ozone->selection_buf_old,
|
||||||
ozone->animations.list_alpha,
|
ozone->animations.list_alpha,
|
||||||
ozone->scroll_old,
|
ozone->scroll_old,
|
||||||
ozone->flags & OZONE_FLAG_IS_PLAYLIST_OLD,
|
(ozone->flags & OZONE_FLAG_IS_PLAYLIST_OLD) ? true : false,
|
||||||
&mymat
|
&mymat
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -12062,8 +12061,8 @@ static void ozone_populate_entries(
|
|||||||
else
|
else
|
||||||
ozone->flags &= ~OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
ozone->flags &= ~OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
||||||
|
|
||||||
fs_thumbnails_available = ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
fs_thumbnails_available = (ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE) ? true : false;
|
||||||
want_thumbnail_bar = ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
want_thumbnail_bar = (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR) ? true : false;
|
||||||
|
|
||||||
if (fs_thumbnails_available != want_thumbnail_bar)
|
if (fs_thumbnails_available != want_thumbnail_bar)
|
||||||
{
|
{
|
||||||
|
@ -1803,7 +1803,7 @@ static void rgui_render_border(
|
|||||||
{
|
{
|
||||||
uint16_t dark_color = rgui->colors.border_dark_color;
|
uint16_t dark_color = rgui->colors.border_dark_color;
|
||||||
uint16_t light_color = rgui->colors.border_light_color;
|
uint16_t light_color = rgui->colors.border_light_color;
|
||||||
bool thickness = rgui->flags & RGUI_FLAG_BORDER_THICKNESS;
|
bool thickness = (rgui->flags & RGUI_FLAG_BORDER_THICKNESS) ? true : false;
|
||||||
|
|
||||||
/* Draw border */
|
/* Draw border */
|
||||||
rgui_fill_rect(data, fb_width, fb_height,
|
rgui_fill_rect(data, fb_width, fb_height,
|
||||||
@ -3229,7 +3229,7 @@ static void rgui_cache_background(
|
|||||||
rgui_fill_rect(background_buf->data, fb_width, fb_height,
|
rgui_fill_rect(background_buf->data, fb_width, fb_height,
|
||||||
0, 0, fb_width, fb_height,
|
0, 0, fb_width, fb_height,
|
||||||
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
||||||
rgui->flags & RGUI_FLAG_BG_THICKNESS);
|
(rgui->flags & RGUI_FLAG_BG_THICKNESS) ? true : false);
|
||||||
|
|
||||||
/* Draw border, if required */
|
/* Draw border, if required */
|
||||||
if (rgui->flags & RGUI_FLAG_BORDER_ENABLE)
|
if (rgui->flags & RGUI_FLAG_BORDER_ENABLE)
|
||||||
@ -4484,12 +4484,12 @@ static void rgui_render_messagebox(
|
|||||||
{
|
{
|
||||||
uint16_t border_dark_color = rgui->colors.border_dark_color;
|
uint16_t border_dark_color = rgui->colors.border_dark_color;
|
||||||
uint16_t border_light_color = rgui->colors.border_light_color;
|
uint16_t border_light_color = rgui->colors.border_light_color;
|
||||||
bool border_thickness = rgui->flags & RGUI_FLAG_BORDER_THICKNESS;
|
bool border_thickness = (rgui->flags & RGUI_FLAG_BORDER_THICKNESS) ? true : false;
|
||||||
|
|
||||||
rgui_fill_rect(frame_buf_data, fb_width, fb_height,
|
rgui_fill_rect(frame_buf_data, fb_width, fb_height,
|
||||||
x + 5, y + 5, width - 10, height - 10,
|
x + 5, y + 5, width - 10, height - 10,
|
||||||
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
||||||
rgui->flags & RGUI_FLAG_BG_THICKNESS);
|
(rgui->flags & RGUI_FLAG_BG_THICKNESS) ? true : false);
|
||||||
|
|
||||||
/* Note: We draw borders around message boxes regardless
|
/* Note: We draw borders around message boxes regardless
|
||||||
* of the rgui->border_enable setting, because they look
|
* of the rgui->border_enable setting, because they look
|
||||||
@ -4677,14 +4677,14 @@ static void rgui_render_osk(
|
|||||||
rgui_fill_rect(frame_buf_data, fb_width, fb_height,
|
rgui_fill_rect(frame_buf_data, fb_width, fb_height,
|
||||||
osk_x + 5, osk_y + 5, osk_width - 10, osk_height - 10,
|
osk_x + 5, osk_y + 5, osk_width - 10, osk_height - 10,
|
||||||
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
||||||
rgui->flags & RGUI_FLAG_BG_THICKNESS);
|
(rgui->flags & RGUI_FLAG_BG_THICKNESS) ? true : false);
|
||||||
|
|
||||||
/* Draw border */
|
/* Draw border */
|
||||||
if (rgui->flags & RGUI_FLAG_BORDER_ENABLE)
|
if (rgui->flags & RGUI_FLAG_BORDER_ENABLE)
|
||||||
{
|
{
|
||||||
uint16_t border_dark_color = rgui->colors.border_dark_color;
|
uint16_t border_dark_color = rgui->colors.border_dark_color;
|
||||||
uint16_t border_light_color = rgui->colors.border_light_color;
|
uint16_t border_light_color = rgui->colors.border_light_color;
|
||||||
bool border_thickness = rgui->flags & RGUI_FLAG_BORDER_THICKNESS;
|
bool border_thickness = (rgui->flags & RGUI_FLAG_BORDER_THICKNESS) ? true : false;
|
||||||
|
|
||||||
/* Draw drop shadow, if required */
|
/* Draw drop shadow, if required */
|
||||||
if (rgui->flags & RGUI_FLAG_SHADOW_ENABLE)
|
if (rgui->flags & RGUI_FLAG_SHADOW_ENABLE)
|
||||||
@ -5257,7 +5257,7 @@ static void rgui_render(
|
|||||||
rgui_fill_rect(rgui->frame_buf.data, fb_width, fb_height,
|
rgui_fill_rect(rgui->frame_buf.data, fb_width, fb_height,
|
||||||
title_x - 5, 0, title_width + 10, rgui->font_height_stride,
|
title_x - 5, 0, title_width + 10, rgui->font_height_stride,
|
||||||
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
rgui->colors.bg_dark_color, rgui->colors.bg_light_color,
|
||||||
rgui->flags & RGUI_FLAG_BG_THICKNESS);
|
(rgui->flags & RGUI_FLAG_BG_THICKNESS) ? true : false);
|
||||||
|
|
||||||
/* Draw thumbnail title */
|
/* Draw thumbnail title */
|
||||||
rgui_blit_line(rgui, fb_width, ticker_x_offset + title_x,
|
rgui_blit_line(rgui, fb_width, ticker_x_offset + title_x,
|
||||||
@ -5513,7 +5513,7 @@ static void rgui_render(
|
|||||||
entry_value_type = rgui_get_entry_value_type(
|
entry_value_type = rgui_get_entry_value_type(
|
||||||
entry_value,
|
entry_value,
|
||||||
entry.setting_type,
|
entry.setting_type,
|
||||||
entry.flags & MENU_ENTRY_FLAG_CHECKED,
|
(entry.flags & MENU_ENTRY_FLAG_CHECKED) ? true : false,
|
||||||
rgui_switch_icons);
|
rgui_switch_icons);
|
||||||
|
|
||||||
switch (entry_value_type)
|
switch (entry_value_type)
|
||||||
@ -7289,8 +7289,8 @@ static void rgui_populate_entries(
|
|||||||
/* Update rgui_blit_line functions */
|
/* Update rgui_blit_line functions */
|
||||||
rgui_set_blit_functions(
|
rgui_set_blit_functions(
|
||||||
rgui->language,
|
rgui->language,
|
||||||
rgui->flags & RGUI_FLAG_SHADOW_ENABLE,
|
(rgui->flags & RGUI_FLAG_SHADOW_ENABLE) ? true : false,
|
||||||
rgui->flags & RGUI_FLAG_EXTENDED_ASCII_ENABLE);
|
(rgui->flags & RGUI_FLAG_EXTENDED_ASCII_ENABLE) ? true : false);
|
||||||
|
|
||||||
/* Need to recalculate terminal dimensions
|
/* Need to recalculate terminal dimensions
|
||||||
* > easiest method is to call
|
* > easiest method is to call
|
||||||
|
@ -1248,8 +1248,8 @@ static unsigned menu_displaylist_parse_core_option_override_list(file_list_t *li
|
|||||||
uint32_t flags = runloop_get_flags();
|
uint32_t flags = runloop_get_flags();
|
||||||
bool core_has_options = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
bool core_has_options = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||||
&& (runloop_st->core_options);
|
&& (runloop_st->core_options);
|
||||||
bool game_options_active = flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE;
|
bool game_options_active = (flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false;
|
||||||
bool folder_options_active = flags & RUNLOOP_FLAG_FOLDER_OPTIONS_ACTIVE;
|
bool folder_options_active = (flags & RUNLOOP_FLAG_FOLDER_OPTIONS_ACTIVE) ? true : false;
|
||||||
bool show_core_options_flush = settings ?
|
bool show_core_options_flush = settings ?
|
||||||
settings->bools.quick_menu_show_core_options_flush : false;
|
settings->bools.quick_menu_show_core_options_flush : false;
|
||||||
|
|
||||||
@ -1341,9 +1341,9 @@ static unsigned menu_displaylist_parse_remap_file_manager_list(file_list_t *list
|
|||||||
unsigned count = 0;
|
unsigned count = 0;
|
||||||
uint32_t flags = runloop_get_flags();
|
uint32_t flags = runloop_get_flags();
|
||||||
bool has_content = !string_is_empty(path_get(RARCH_PATH_CONTENT));
|
bool has_content = !string_is_empty(path_get(RARCH_PATH_CONTENT));
|
||||||
bool core_remap_active = flags & RUNLOOP_FLAG_REMAPS_CORE_ACTIVE;
|
bool core_remap_active = (flags & RUNLOOP_FLAG_REMAPS_CORE_ACTIVE) ? true : false;
|
||||||
bool content_dir_remap_active = flags & RUNLOOP_FLAG_REMAPS_CONTENT_DIR_ACTIVE;
|
bool content_dir_remap_active = (flags & RUNLOOP_FLAG_REMAPS_CONTENT_DIR_ACTIVE) ? true : false;
|
||||||
bool game_remap_active = flags & RUNLOOP_FLAG_REMAPS_GAME_ACTIVE;
|
bool game_remap_active = (flags & RUNLOOP_FLAG_REMAPS_GAME_ACTIVE) ? true : false;
|
||||||
bool remap_save_on_exit = settings->bools.remap_save_on_exit;
|
bool remap_save_on_exit = settings->bools.remap_save_on_exit;
|
||||||
|
|
||||||
/* Sanity check - cannot handle remap files
|
/* Sanity check - cannot handle remap files
|
||||||
|
@ -3729,9 +3729,9 @@ static void netplay_sync_input_post_frame(netplay_t *netplay, bool stalled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Only relevant if we're connected and not in a desynching operation */
|
/* Only relevant if we're connected and not in a desynching operation */
|
||||||
if ((netplay->is_server && (netplay->connected_players<=1)) ||
|
if ( (netplay->is_server && (netplay->connected_players<=1))
|
||||||
(netplay->self_mode < NETPLAY_CONNECTION_CONNECTED) ||
|
|| (netplay->self_mode < NETPLAY_CONNECTION_CONNECTED)
|
||||||
(netplay->desync))
|
|| (netplay->desync))
|
||||||
{
|
{
|
||||||
netplay->other_frame_count = netplay->self_frame_count;
|
netplay->other_frame_count = netplay->self_frame_count;
|
||||||
netplay->other_ptr = netplay->self_ptr;
|
netplay->other_ptr = netplay->self_ptr;
|
||||||
|
10
retroarch.c
10
retroarch.c
@ -674,7 +674,7 @@ static void driver_adjust_system_rates(
|
|||||||
* switching is enabled */
|
* switching is enabled */
|
||||||
runloop_set_video_swap_interval(
|
runloop_set_video_swap_interval(
|
||||||
vrr_runloop_enable,
|
vrr_runloop_enable,
|
||||||
video_st->flags & VIDEO_FLAG_CRT_SWITCHING_ACTIVE,
|
(video_st->flags & VIDEO_FLAG_CRT_SWITCHING_ACTIVE) ? true : false,
|
||||||
video_swap_interval,
|
video_swap_interval,
|
||||||
audio_max_timing_skew,
|
audio_max_timing_skew,
|
||||||
video_refresh_rate,
|
video_refresh_rate,
|
||||||
@ -4963,8 +4963,8 @@ void emscripten_mainloop(void)
|
|||||||
bool input_driver_nonblock_state = input_st ?
|
bool input_driver_nonblock_state = input_st ?
|
||||||
(input_st->flags & INP_FLAG_NONBLOCKING) : false;
|
(input_st->flags & INP_FLAG_NONBLOCKING) : false;
|
||||||
uint32_t runloop_flags = runloop_get_flags();
|
uint32_t runloop_flags = runloop_get_flags();
|
||||||
bool runloop_is_slowmotion = runloop_flags & RUNLOOP_FLAG_SLOWMOTION;
|
bool runloop_is_slowmotion = (runloop_flags & RUNLOOP_FLAG_SLOWMOTION) ? true : false;
|
||||||
bool runloop_is_paused = runloop_flags & RUNLOOP_FLAG_PAUSED;
|
bool runloop_is_paused = (runloop_flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||||
|
|
||||||
#ifdef HAVE_RWEBAUDIO
|
#ifdef HAVE_RWEBAUDIO
|
||||||
RWebAudioRecalibrateTime();
|
RWebAudioRecalibrateTime();
|
||||||
@ -6605,11 +6605,9 @@ bool retroarch_main_init(int argc, char *argv[])
|
|||||||
input_remapping_restore_global_config(true);
|
input_remapping_restore_global_config(true);
|
||||||
|
|
||||||
#ifdef HAVE_CONFIGFILE
|
#ifdef HAVE_CONFIGFILE
|
||||||
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
|
|
||||||
{
|
|
||||||
/* Reload the original config */
|
/* Reload the original config */
|
||||||
|
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
|
||||||
config_unload_override();
|
config_unload_override();
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_DYNAMIC
|
#ifdef HAVE_DYNAMIC
|
||||||
|
@ -1070,7 +1070,7 @@ static bool runahead_load_state(runloop_state_t *runloop_st)
|
|||||||
retro_ctx_serialize_info_t *serialize_info =
|
retro_ctx_serialize_info_t *serialize_info =
|
||||||
(retro_ctx_serialize_info_t*)
|
(retro_ctx_serialize_info_t*)
|
||||||
runloop_st->runahead_save_state_list->data[0];
|
runloop_st->runahead_save_state_list->data[0];
|
||||||
bool last_dirty = runloop_st->flags & RUNLOOP_FLAG_INPUT_IS_DIRTY;
|
bool last_dirty = (runloop_st->flags & RUNLOOP_FLAG_INPUT_IS_DIRTY) ? true : false;
|
||||||
bool ret = core_unserialize_special(serialize_info);
|
bool ret = core_unserialize_special(serialize_info);
|
||||||
if (last_dirty)
|
if (last_dirty)
|
||||||
runloop_st->flags |= RUNLOOP_FLAG_INPUT_IS_DIRTY;
|
runloop_st->flags |= RUNLOOP_FLAG_INPUT_IS_DIRTY;
|
||||||
|
30
runloop.c
30
runloop.c
@ -1412,8 +1412,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
recording_state_t *recording_st = recording_state_get_ptr();
|
recording_state_t *recording_st = recording_state_get_ptr();
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
rarch_system_info_t *sys_info = &runloop_st->system;
|
rarch_system_info_t *sys_info = &runloop_st->system;
|
||||||
bool ignore_environment_cb = runloop_st->flags &
|
bool ignore_environment_cb = (runloop_st->flags &
|
||||||
RUNLOOP_FLAG_IGNORE_ENVIRONMENT_CB;
|
RUNLOOP_FLAG_IGNORE_ENVIRONMENT_CB) ? true : false;
|
||||||
|
|
||||||
if (ignore_environment_cb)
|
if (ignore_environment_cb)
|
||||||
return false;
|
return false;
|
||||||
@ -1549,7 +1549,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -1578,7 +1578,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -1614,7 +1614,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -1650,7 +1650,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -1691,7 +1691,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -3872,7 +3872,7 @@ static void uninit_libretro_symbols(
|
|||||||
if (runloop_st->core_options)
|
if (runloop_st->core_options)
|
||||||
{
|
{
|
||||||
runloop_deinit_core_options(
|
runloop_deinit_core_options(
|
||||||
runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE,
|
(runloop_st->flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false,
|
||||||
path_get(RARCH_PATH_CORE_OPTIONS),
|
path_get(RARCH_PATH_CORE_OPTIONS),
|
||||||
runloop_st->core_options);
|
runloop_st->core_options);
|
||||||
runloop_st->flags &=
|
runloop_st->flags &=
|
||||||
@ -5292,7 +5292,7 @@ void runloop_msg_queue_push(const char *msg,
|
|||||||
prio,
|
prio,
|
||||||
flush,
|
flush,
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE
|
(menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE) ? true : false
|
||||||
#else
|
#else
|
||||||
false
|
false
|
||||||
#endif
|
#endif
|
||||||
@ -5444,8 +5444,8 @@ static enum runloop_state_enum runloop_check_state(
|
|||||||
struct menu_state *menu_st = menu_state_get_ptr();
|
struct menu_state *menu_st = menu_state_get_ptr();
|
||||||
menu_handle_t *menu = menu_st->driver_data;
|
menu_handle_t *menu = menu_st->driver_data;
|
||||||
unsigned menu_toggle_gamepad_combo = settings->uints.input_menu_toggle_gamepad_combo;
|
unsigned menu_toggle_gamepad_combo = settings->uints.input_menu_toggle_gamepad_combo;
|
||||||
bool menu_driver_binding_state = menu_st->flags & MENU_ST_FLAG_IS_BINDING;
|
bool menu_driver_binding_state = (menu_st->flags & MENU_ST_FLAG_IS_BINDING) ? true : false;
|
||||||
bool menu_is_alive = menu_st->flags & MENU_ST_FLAG_ALIVE;
|
bool menu_is_alive = (menu_st->flags & MENU_ST_FLAG_ALIVE) ? true : false;
|
||||||
bool display_kb = menu_input_dialog_get_display_kb();
|
bool display_kb = menu_input_dialog_get_display_kb();
|
||||||
#endif
|
#endif
|
||||||
#if defined(HAVE_GFX_WIDGETS)
|
#if defined(HAVE_GFX_WIDGETS)
|
||||||
@ -5926,7 +5926,7 @@ static enum runloop_state_enum runloop_check_state(
|
|||||||
|
|
||||||
if (focused || !(runloop_st->flags & RUNLOOP_FLAG_IDLE))
|
if (focused || !(runloop_st->flags & RUNLOOP_FLAG_IDLE))
|
||||||
{
|
{
|
||||||
bool runloop_is_inited = runloop_st->flags & RUNLOOP_FLAG_IS_INITED;
|
bool runloop_is_inited = (runloop_st->flags & RUNLOOP_FLAG_IS_INITED) ? true : false;
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
bool menu_pause_libretro = settings->bools.menu_pause_libretro
|
bool menu_pause_libretro = settings->bools.menu_pause_libretro
|
||||||
&& netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL);
|
&& netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL);
|
||||||
@ -5971,7 +5971,7 @@ static enum runloop_state_enum runloop_check_state(
|
|||||||
menu->userdata,
|
menu->userdata,
|
||||||
video_st->width,
|
video_st->width,
|
||||||
video_st->height,
|
video_st->height,
|
||||||
runloop_st->flags & RUNLOOP_FLAG_IDLE);
|
(runloop_st->flags & RUNLOOP_FLAG_IDLE) ? true : false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (menu_st->flags & MENU_ST_FLAG_ALIVE)
|
if ( (menu_st->flags & MENU_ST_FLAG_ALIVE)
|
||||||
@ -6828,7 +6828,7 @@ int runloop_iterate(void)
|
|||||||
(runloop_st->flags & RUNLOOP_FLAG_PAUSED)
|
(runloop_st->flags & RUNLOOP_FLAG_PAUSED)
|
||||||
|| (menu_pause_libretro && (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE));
|
|| (menu_pause_libretro && (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE));
|
||||||
#else
|
#else
|
||||||
bool core_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED);
|
bool core_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||||
#endif
|
#endif
|
||||||
float slowmotion_ratio = settings->floats.slowmotion_ratio;
|
float slowmotion_ratio = settings->floats.slowmotion_ratio;
|
||||||
#ifdef HAVE_CHEEVOS
|
#ifdef HAVE_CHEEVOS
|
||||||
@ -7373,7 +7373,7 @@ void runloop_task_msg_queue_push(
|
|||||||
prio,
|
prio,
|
||||||
flush,
|
flush,
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
menu_st->flags & MENU_ST_FLAG_ALIVE
|
(menu_st->flags & MENU_ST_FLAG_ALIVE) ? true : false
|
||||||
#else
|
#else
|
||||||
false
|
false
|
||||||
#endif
|
#endif
|
||||||
|
@ -87,7 +87,7 @@ static void task_overlay_load_desc_image(
|
|||||||
fill_pathname_resolve_relative(path, loader->overlay_path,
|
fill_pathname_resolve_relative(path, loader->overlay_path,
|
||||||
image_path, sizeof(path));
|
image_path, sizeof(path));
|
||||||
|
|
||||||
image_tex.supports_rgba = (loader->flags & OVERLAY_LOADER_RGBA_SUPPORT);
|
image_tex.supports_rgba = (loader->flags & OVERLAY_LOADER_RGBA_SUPPORT) ? true : false;
|
||||||
|
|
||||||
if (image_texture_load(&image_tex, path))
|
if (image_texture_load(&image_tex, path))
|
||||||
{
|
{
|
||||||
@ -755,7 +755,7 @@ static void task_overlay_deferred_load(retro_task_t *task)
|
|||||||
overlay->config.paths.path, sizeof(overlay_resolved_path));
|
overlay->config.paths.path, sizeof(overlay_resolved_path));
|
||||||
|
|
||||||
image_tex.supports_rgba =
|
image_tex.supports_rgba =
|
||||||
(loader->flags & OVERLAY_LOADER_RGBA_SUPPORT);
|
(loader->flags & OVERLAY_LOADER_RGBA_SUPPORT) ? true : false;
|
||||||
|
|
||||||
if (!image_texture_load(&image_tex, overlay_resolved_path))
|
if (!image_texture_load(&image_tex, overlay_resolved_path))
|
||||||
{
|
{
|
||||||
|
@ -689,7 +689,9 @@ static bool content_write_serialized_state(void* buffer,
|
|||||||
#else
|
#else
|
||||||
bool frame_is_reversed = false;
|
bool frame_is_reversed = false;
|
||||||
#endif
|
#endif
|
||||||
if (!rewind && input_st->bsv_movie_state.flags & (BSV_FLAG_MOVIE_RECORDING | BSV_FLAG_MOVIE_PLAYBACK) && !frame_is_reversed)
|
if ( !rewind
|
||||||
|
&& input_st->bsv_movie_state.flags & (BSV_FLAG_MOVIE_RECORDING | BSV_FLAG_MOVIE_PLAYBACK)
|
||||||
|
&& !frame_is_reversed)
|
||||||
{
|
{
|
||||||
content_write_block_header(output,
|
content_write_block_header(output,
|
||||||
RASTATE_REPLAY_BLOCK, size->replay_size);
|
RASTATE_REPLAY_BLOCK, size->replay_size);
|
||||||
@ -1471,7 +1473,7 @@ static void task_push_save_state(const char *path, void *data, size_t size, bool
|
|||||||
task->handler = task_save_handler;
|
task->handler = task_save_handler;
|
||||||
task->callback = save_state_cb;
|
task->callback = save_state_cb;
|
||||||
task->title = strdup(msg_hash_to_str(MSG_SAVING_STATE));
|
task->title = strdup(msg_hash_to_str(MSG_SAVING_STATE));
|
||||||
task->mute = state->flags & SAVE_TASK_FLAG_MUTE;
|
task->mute = (state->flags & SAVE_TASK_FLAG_MUTE) ? true : false;
|
||||||
|
|
||||||
if (!task_queue_push(task))
|
if (!task_queue_push(task))
|
||||||
{
|
{
|
||||||
@ -1513,7 +1515,7 @@ static void content_load_and_save_state_cb(retro_task_t *task,
|
|||||||
char *path = strdup(load_data->path);
|
char *path = strdup(load_data->path);
|
||||||
void *data = load_data->undo_data;
|
void *data = load_data->undo_data;
|
||||||
size_t size = load_data->undo_size;
|
size_t size = load_data->undo_size;
|
||||||
bool autosave = load_data->flags & SAVE_TASK_FLAG_AUTOSAVE;
|
bool autosave = (load_data->flags & SAVE_TASK_FLAG_AUTOSAVE) ? true : false;
|
||||||
|
|
||||||
content_load_state_cb(task, task_data, user_data, error);
|
content_load_state_cb(task, task_data, user_data, error);
|
||||||
|
|
||||||
@ -1575,7 +1577,7 @@ static void task_push_load_and_save_state(const char *path, void *data,
|
|||||||
task->handler = task_load_handler;
|
task->handler = task_load_handler;
|
||||||
task->callback = content_load_and_save_state_cb;
|
task->callback = content_load_and_save_state_cb;
|
||||||
task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE));
|
task->title = strdup(msg_hash_to_str(MSG_LOADING_STATE));
|
||||||
task->mute = state->flags & SAVE_TASK_FLAG_MUTE;
|
task->mute = (state->flags & SAVE_TASK_FLAG_MUTE) ? true : false;
|
||||||
|
|
||||||
if (!task_queue_push(task))
|
if (!task_queue_push(task))
|
||||||
{
|
{
|
||||||
|
@ -91,7 +91,7 @@ task_finished:
|
|||||||
|
|
||||||
if (*mode_ptr == 1 || *mode_ptr == 2)
|
if (*mode_ptr == 1 || *mode_ptr == 2)
|
||||||
{
|
{
|
||||||
bool was_paused = runloop_flags & RUNLOOP_FLAG_PAUSED;
|
bool was_paused = (runloop_flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||||
command_event(CMD_EVENT_AI_SERVICE_CALL, &was_paused);
|
command_event(CMD_EVENT_AI_SERVICE_CALL, &was_paused);
|
||||||
}
|
}
|
||||||
if (task->user_data)
|
if (task->user_data)
|
||||||
@ -617,7 +617,7 @@ finish:
|
|||||||
{
|
{
|
||||||
if (string_is_equal(auto_str, "auto"))
|
if (string_is_equal(auto_str, "auto"))
|
||||||
{
|
{
|
||||||
bool was_paused = runloop_flags & RUNLOOP_FLAG_PAUSED;
|
bool was_paused = (runloop_flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||||
if ( (access_st->ai_service_auto != 0)
|
if ( (access_st->ai_service_auto != 0)
|
||||||
&& !settings->bools.ai_service_pause)
|
&& !settings->bools.ai_service_pause)
|
||||||
call_auto_translate_task(settings, &was_paused);
|
call_auto_translate_task(settings, &was_paused);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user