mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20: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;
|
||||
cocoa_vk_ctx_data_t *cocoa_ctx = (cocoa_vk_ctx_data_t*)data;
|
||||
|
||||
*quit = false;
|
||||
|
||||
*resize = cocoa_ctx->vk.flags &
|
||||
VK_DATA_FLAG_NEED_NEW_SWAPCHAIN;
|
||||
*quit = false;
|
||||
*resize = (cocoa_ctx->vk.flags &
|
||||
VK_DATA_FLAG_NEED_NEW_SWAPCHAIN) ? true : false;
|
||||
|
||||
#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);
|
||||
@ -226,7 +224,7 @@ static bool cocoa_vk_gfx_ctx_set_video_mode(void *data,
|
||||
CocoaView *g_view = (CocoaView*)nsview_get_ptr();
|
||||
#endif
|
||||
cocoa_vk_ctx_data_t *cocoa_ctx = (cocoa_vk_ctx_data_t*)data;
|
||||
static bool
|
||||
static bool
|
||||
has_went_fullscreen = false;
|
||||
cocoa_ctx->width = width;
|
||||
cocoa_ctx->height = height;
|
||||
@ -272,7 +270,7 @@ static void *cocoa_vk_gfx_ctx_init(void *video_driver)
|
||||
free(cocoa_ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
return cocoa_ctx;
|
||||
}
|
||||
#else
|
||||
@ -296,7 +294,7 @@ static bool cocoa_vk_gfx_ctx_set_video_mode(void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
/* TODO: Maybe iOS users should be able to
|
||||
/* TODO: Maybe iOS users should be able to
|
||||
* show/hide the status bar here? */
|
||||
return true;
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ static void gfx_ctx_khr_display_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
@ -5336,7 +5336,7 @@ static void ozone_compute_entries_position(
|
||||
file_list_t *selection_buf = NULL;
|
||||
int entry_padding = ozone_get_entries_padding(ozone);
|
||||
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;
|
||||
|
||||
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 !(
|
||||
(ozone->flags & OZONE_FLAG_IS_PLAYLIST) ||
|
||||
(ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|
||||
(ozone->flags & OZONE_FLAG_IS_PLAYLIST)
|
||||
|| (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)
|
||||
{
|
||||
char playlist_path[PATH_MAX_LENGTH];
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
size_t new_selection = 0;
|
||||
char playlist_path[PATH_MAX_LENGTH];
|
||||
|
||||
/* If cursor is active, ensure we target
|
||||
* an on screen category */
|
||||
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)
|
||||
&& (!(ozone->flags2 & OZONE_FLAG2_SHOW_FULLSCREEN_THUMBNAILS))
|
||||
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT) ||
|
||||
(ozone->is_quick_menu && !string_is_empty(ozone->savestate_thumbnail_file_path))))
|
||||
&& ( (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|
||||
|| (ozone->is_quick_menu && !string_is_empty(ozone->savestate_thumbnail_file_path))))
|
||||
{
|
||||
ozone_show_fullscreen_thumbnails(ozone);
|
||||
ozone->flags2 |= OZONE_FLAG2_WANT_FULLSCREEN_THUMBNAILS;
|
||||
@ -8874,7 +8873,7 @@ static void ozone_update_thumbnail_image(void *data)
|
||||
: OZONE_PENDING_THUMBNAIL_LEFT;
|
||||
|
||||
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)
|
||||
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 */
|
||||
else if (ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
||||
{
|
||||
if ((entry_type == FILE_TYPE_IMAGEVIEWER) ||
|
||||
(entry_type == FILE_TYPE_IMAGE))
|
||||
if ( (entry_type == FILE_TYPE_IMAGEVIEWER)
|
||||
|| (entry_type == FILE_TYPE_IMAGE))
|
||||
{
|
||||
ozone_set_thumbnail_content(ozone, "imageviewer");
|
||||
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),
|
||||
ozone->animations.list_alpha,
|
||||
ozone->animations.scroll_y,
|
||||
ozone->flags & OZONE_FLAG_IS_PLAYLIST,
|
||||
(ozone->flags & OZONE_FLAG_IS_PLAYLIST) ? true : false,
|
||||
&mymat
|
||||
);
|
||||
|
||||
@ -11534,7 +11533,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
&ozone->selection_buf_old,
|
||||
ozone->animations.list_alpha,
|
||||
ozone->scroll_old,
|
||||
ozone->flags & OZONE_FLAG_IS_PLAYLIST_OLD,
|
||||
(ozone->flags & OZONE_FLAG_IS_PLAYLIST_OLD) ? true : false,
|
||||
&mymat
|
||||
);
|
||||
|
||||
@ -12049,21 +12048,21 @@ static void ozone_populate_entries(
|
||||
* playlists, database manager lists, file lists
|
||||
* and savestate slots */
|
||||
if (
|
||||
((ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR))
|
||||
( (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR))
|
||||
&& ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 4))
|
||||
|| ((ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) && (ozone->depth >= 4))
|
||||
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|
||||
|| (ozone->is_quick_menu)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_FILE_LIST)
|
||||
|| (ozone->flags & OZONE_FLAG_IS_STATE_SLOT)
|
||||
|| (ozone->is_quick_menu)
|
||||
)
|
||||
)
|
||||
ozone->flags |= OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
||||
else
|
||||
ozone->flags &= ~OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
||||
|
||||
fs_thumbnails_available = ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE;
|
||||
want_thumbnail_bar = ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR;
|
||||
fs_thumbnails_available = (ozone->flags & OZONE_FLAG_FULLSCREEN_THUMBNAILS_AVAILABLE) ? true : false;
|
||||
want_thumbnail_bar = (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR) ? true : false;
|
||||
|
||||
if (fs_thumbnails_available != want_thumbnail_bar)
|
||||
{
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1248,8 +1248,8 @@ static unsigned menu_displaylist_parse_core_option_override_list(file_list_t *li
|
||||
uint32_t flags = runloop_get_flags();
|
||||
bool core_has_options = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||
&& (runloop_st->core_options);
|
||||
bool game_options_active = flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE;
|
||||
bool folder_options_active = flags & RUNLOOP_FLAG_FOLDER_OPTIONS_ACTIVE;
|
||||
bool game_options_active = (flags & RUNLOOP_FLAG_GAME_OPTIONS_ACTIVE) ? true : false;
|
||||
bool folder_options_active = (flags & RUNLOOP_FLAG_FOLDER_OPTIONS_ACTIVE) ? true : false;
|
||||
bool show_core_options_flush = settings ?
|
||||
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;
|
||||
uint32_t flags = runloop_get_flags();
|
||||
bool has_content = !string_is_empty(path_get(RARCH_PATH_CONTENT));
|
||||
bool core_remap_active = flags & RUNLOOP_FLAG_REMAPS_CORE_ACTIVE;
|
||||
bool content_dir_remap_active = flags & RUNLOOP_FLAG_REMAPS_CONTENT_DIR_ACTIVE;
|
||||
bool game_remap_active = flags & RUNLOOP_FLAG_REMAPS_GAME_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) ? true : false;
|
||||
bool game_remap_active = (flags & RUNLOOP_FLAG_REMAPS_GAME_ACTIVE) ? true : false;
|
||||
bool remap_save_on_exit = settings->bools.remap_save_on_exit;
|
||||
|
||||
/* 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 */
|
||||
if ((netplay->is_server && (netplay->connected_players<=1)) ||
|
||||
(netplay->self_mode < NETPLAY_CONNECTION_CONNECTED) ||
|
||||
(netplay->desync))
|
||||
if ( (netplay->is_server && (netplay->connected_players<=1))
|
||||
|| (netplay->self_mode < NETPLAY_CONNECTION_CONNECTED)
|
||||
|| (netplay->desync))
|
||||
{
|
||||
netplay->other_frame_count = netplay->self_frame_count;
|
||||
netplay->other_ptr = netplay->self_ptr;
|
||||
@ -3740,7 +3740,7 @@ static void netplay_sync_input_post_frame(netplay_t *netplay, bool stalled)
|
||||
if (netplay->catch_up)
|
||||
{
|
||||
netplay->catch_up = false;
|
||||
input_state_get_ptr()->flags &= ~INP_FLAG_NONBLOCKING;
|
||||
input_state_get_ptr()->flags &= ~INP_FLAG_NONBLOCKING;
|
||||
driver_set_nonblock_state();
|
||||
}
|
||||
return;
|
||||
|
10
retroarch.c
10
retroarch.c
@ -674,7 +674,7 @@ static void driver_adjust_system_rates(
|
||||
* switching is enabled */
|
||||
runloop_set_video_swap_interval(
|
||||
vrr_runloop_enable,
|
||||
video_st->flags & VIDEO_FLAG_CRT_SWITCHING_ACTIVE,
|
||||
(video_st->flags & VIDEO_FLAG_CRT_SWITCHING_ACTIVE) ? true : false,
|
||||
video_swap_interval,
|
||||
audio_max_timing_skew,
|
||||
video_refresh_rate,
|
||||
@ -4963,8 +4963,8 @@ void emscripten_mainloop(void)
|
||||
bool input_driver_nonblock_state = input_st ?
|
||||
(input_st->flags & INP_FLAG_NONBLOCKING) : false;
|
||||
uint32_t runloop_flags = runloop_get_flags();
|
||||
bool runloop_is_slowmotion = runloop_flags & RUNLOOP_FLAG_SLOWMOTION;
|
||||
bool runloop_is_paused = runloop_flags & RUNLOOP_FLAG_PAUSED;
|
||||
bool runloop_is_slowmotion = (runloop_flags & RUNLOOP_FLAG_SLOWMOTION) ? true : false;
|
||||
bool runloop_is_paused = (runloop_flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||
|
||||
#ifdef HAVE_RWEBAUDIO
|
||||
RWebAudioRecalibrateTime();
|
||||
@ -6605,11 +6605,9 @@ bool retroarch_main_init(int argc, char *argv[])
|
||||
input_remapping_restore_global_config(true);
|
||||
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
/* Reload the original config */
|
||||
if (runloop_st->flags & RUNLOOP_FLAG_OVERRIDES_ACTIVE)
|
||||
{
|
||||
/* Reload the original config */
|
||||
config_unload_override();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_DYNAMIC
|
||||
|
3416
runahead.c
3416
runahead.c
File diff suppressed because it is too large
Load Diff
32
runloop.c
32
runloop.c
@ -1412,8 +1412,8 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
recording_state_t *recording_st = recording_state_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *sys_info = &runloop_st->system;
|
||||
bool ignore_environment_cb = runloop_st->flags &
|
||||
RUNLOOP_FLAG_IGNORE_ENVIRONMENT_CB;
|
||||
bool ignore_environment_cb = (runloop_st->flags &
|
||||
RUNLOOP_FLAG_IGNORE_ENVIRONMENT_CB) ? true : false;
|
||||
|
||||
if (ignore_environment_cb)
|
||||
return false;
|
||||
@ -1549,7 +1549,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -1578,7 +1578,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -1614,7 +1614,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -1650,7 +1650,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -1691,7 +1691,7 @@ bool runloop_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -3872,7 +3872,7 @@ static void uninit_libretro_symbols(
|
||||
if (runloop_st->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),
|
||||
runloop_st->core_options);
|
||||
runloop_st->flags &=
|
||||
@ -5292,7 +5292,7 @@ void runloop_msg_queue_push(const char *msg,
|
||||
prio,
|
||||
flush,
|
||||
#ifdef HAVE_MENU
|
||||
menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE
|
||||
(menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE) ? true : false
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
@ -5444,8 +5444,8 @@ static enum runloop_state_enum runloop_check_state(
|
||||
struct menu_state *menu_st = menu_state_get_ptr();
|
||||
menu_handle_t *menu = menu_st->driver_data;
|
||||
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_is_alive = menu_st->flags & MENU_ST_FLAG_ALIVE;
|
||||
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) ? true : false;
|
||||
bool display_kb = menu_input_dialog_get_display_kb();
|
||||
#endif
|
||||
#if defined(HAVE_GFX_WIDGETS)
|
||||
@ -5875,7 +5875,7 @@ static enum runloop_state_enum runloop_check_state(
|
||||
|
||||
/* Check whether menu screensaver should be enabled */
|
||||
if ( (screensaver_timeout > 0)
|
||||
&& (menu_st->flags & MENU_ST_FLAG_SCREENSAVER_SUPPORTED)
|
||||
&& (menu_st->flags & MENU_ST_FLAG_SCREENSAVER_SUPPORTED)
|
||||
&& (!(menu_st->flags & MENU_ST_FLAG_SCREENSAVER_ACTIVE))
|
||||
&& ((menu_st->current_time_us - menu_st->input_last_time_us)
|
||||
> ((retro_time_t)screensaver_timeout * 1000000)))
|
||||
@ -5926,7 +5926,7 @@ static enum runloop_state_enum runloop_check_state(
|
||||
|
||||
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
|
||||
bool menu_pause_libretro = settings->bools.menu_pause_libretro
|
||||
&& netplay_driver_ctl(RARCH_NETPLAY_CTL_ALLOW_PAUSE, NULL);
|
||||
@ -5971,7 +5971,7 @@ static enum runloop_state_enum runloop_check_state(
|
||||
menu->userdata,
|
||||
video_st->width,
|
||||
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)
|
||||
@ -6828,7 +6828,7 @@ int runloop_iterate(void)
|
||||
(runloop_st->flags & RUNLOOP_FLAG_PAUSED)
|
||||
|| (menu_pause_libretro && (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE));
|
||||
#else
|
||||
bool core_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED);
|
||||
bool core_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||
#endif
|
||||
float slowmotion_ratio = settings->floats.slowmotion_ratio;
|
||||
#ifdef HAVE_CHEEVOS
|
||||
@ -7373,7 +7373,7 @@ void runloop_task_msg_queue_push(
|
||||
prio,
|
||||
flush,
|
||||
#ifdef HAVE_MENU
|
||||
menu_st->flags & MENU_ST_FLAG_ALIVE
|
||||
(menu_st->flags & MENU_ST_FLAG_ALIVE) ? true : false
|
||||
#else
|
||||
false
|
||||
#endif
|
||||
|
@ -87,7 +87,7 @@ static void task_overlay_load_desc_image(
|
||||
fill_pathname_resolve_relative(path, loader->overlay_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))
|
||||
{
|
||||
@ -244,7 +244,7 @@ static bool task_overlay_load_desc(
|
||||
const char *box = NULL;
|
||||
config_file_t *conf = loader->conf;
|
||||
|
||||
overlay_desc_key[0] =
|
||||
overlay_desc_key[0] =
|
||||
overlay_key[0] =
|
||||
conf_key[0] =
|
||||
overlay[0] = '\0';
|
||||
@ -755,7 +755,7 @@ static void task_overlay_deferred_load(retro_task_t *task)
|
||||
overlay->config.paths.path, sizeof(overlay_resolved_path));
|
||||
|
||||
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))
|
||||
{
|
||||
@ -804,7 +804,7 @@ static void task_overlay_deferred_load(retro_task_t *task)
|
||||
string_list_initialize(&list);
|
||||
|
||||
if ( !string_split_noalloc(
|
||||
&list, overlay->config.rect.array, ", ")
|
||||
&list, overlay->config.rect.array, ", ")
|
||||
|| list.size < 4)
|
||||
{
|
||||
RARCH_ERR("[Overlay]: Failed to split rect \"%s\" into at least four tokens.\n",
|
||||
|
@ -465,7 +465,7 @@ bool content_undo_load_state(void)
|
||||
* the backing up of it and
|
||||
* its flushing could all be in their
|
||||
* own functions... */
|
||||
if ( config_get_ptr()->bools.block_sram_overwrite
|
||||
if ( config_get_ptr()->bools.block_sram_overwrite
|
||||
&& task_save_files
|
||||
&& task_save_files->size)
|
||||
{
|
||||
@ -689,7 +689,9 @@ static bool content_write_serialized_state(void* buffer,
|
||||
#else
|
||||
bool frame_is_reversed = false;
|
||||
#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,
|
||||
RASTATE_REPLAY_BLOCK, size->replay_size);
|
||||
@ -1119,7 +1121,7 @@ static bool content_load_rastate1(unsigned char* input, size_t size)
|
||||
|
||||
while (input < stop)
|
||||
{
|
||||
size_t block_size = ( input[7] << 24
|
||||
size_t block_size = ( input[7] << 24
|
||||
| input[6] << 16 | input[5] << 8 | input[4]);
|
||||
unsigned char *marker = input;
|
||||
|
||||
@ -1287,7 +1289,7 @@ static void content_load_state_cb(retro_task_t *task,
|
||||
if (size < 0 || !buf)
|
||||
goto error;
|
||||
|
||||
/* This means we're backing up the file in memory,
|
||||
/* This means we're backing up the file in memory,
|
||||
* so content_undo_save_state()
|
||||
* can restore it */
|
||||
if (load_data->flags & SAVE_TASK_FLAG_LOAD_TO_BACKUP_BUFF)
|
||||
@ -1413,7 +1415,7 @@ static void save_state_cb(retro_task_t *task,
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
char *path = strdup(state->path);
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *dir_screenshot = settings->paths.directory_screenshot;
|
||||
const char *dir_screenshot = settings->paths.directory_screenshot;
|
||||
|
||||
if (state->flags & SAVE_TASK_FLAG_THUMBNAIL_ENABLE)
|
||||
take_screenshot(dir_screenshot,
|
||||
@ -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->callback = save_state_cb;
|
||||
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))
|
||||
{
|
||||
@ -1513,7 +1515,7 @@ static void content_load_and_save_state_cb(retro_task_t *task,
|
||||
char *path = strdup(load_data->path);
|
||||
void *data = load_data->undo_data;
|
||||
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);
|
||||
|
||||
@ -1575,7 +1577,7 @@ static void task_push_load_and_save_state(const char *path, void *data,
|
||||
task->handler = task_load_handler;
|
||||
task->callback = content_load_and_save_state_cb;
|
||||
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))
|
||||
{
|
||||
@ -1813,7 +1815,7 @@ bool content_rename_state(const char *origin, const char *dest)
|
||||
/*
|
||||
*
|
||||
* TODO/FIXME: Figure out when and where this should be called.
|
||||
* As it is, when e.g. closing Gambatte, we get the
|
||||
* As it is, when e.g. closing Gambatte, we get the
|
||||
* same printf message 4 times.
|
||||
*/
|
||||
void content_reset_savestate_backups(void)
|
||||
|
@ -91,7 +91,7 @@ task_finished:
|
||||
|
||||
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);
|
||||
}
|
||||
if (task->user_data)
|
||||
@ -617,7 +617,7 @@ finish:
|
||||
{
|
||||
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)
|
||||
&& !settings->bools.ai_service_pause)
|
||||
call_auto_translate_task(settings, &was_paused);
|
||||
|
Loading…
x
Reference in New Issue
Block a user