Skip to content

Commit 6c1b32d

Browse files
authored
Make sure correct type is used when calling retroarch_get_flags() (#18279)
1 parent a16d651 commit 6c1b32d

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

configuration.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3801,7 +3801,7 @@ static bool config_load_file(global_t *global,
38013801
struct config_array_setting *array_settings = NULL;
38023802
struct config_path_setting *path_settings = NULL;
38033803
config_file_t *conf = NULL;
3804-
uint16_t rarch_flags = retroarch_get_flags();
3804+
uint32_t rarch_flags = retroarch_get_flags();
38053805

38063806
tmp_str[0] = '\0';
38073807

retroarch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,7 @@ global_t *global_get_ptr(void)
20232023
return &global_driver_st;
20242024
}
20252025

2026-
uint16_t retroarch_get_flags(void)
2026+
uint32_t retroarch_get_flags(void)
20272027
{
20282028
struct rarch_state *p_rarch = &rarch_st;
20292029
return p_rarch->flags;

retroarch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ void retroarch_fail(int error_code, const char *error);
209209

210210
bool should_quit_on_close(void);
211211

212-
uint16_t retroarch_get_flags(void);
212+
uint32_t retroarch_get_flags(void);
213213

214214
RETRO_END_DECLS
215215

tasks/task_content.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,7 +1913,7 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
19131913
const char *path_dir_system = settings->paths.directory_system;
19141914
bool check_firmware_before_loading = settings->bools.check_firmware_before_loading;
19151915
#ifdef HAVE_PATCH
1916-
uint16_t rarch_flags = retroarch_get_flags();
1916+
uint32_t rarch_flags = retroarch_get_flags();
19171917
#endif
19181918

19191919
if (!content_info)
@@ -2014,7 +2014,7 @@ bool task_push_load_content_from_playlist_from_menu(
20142014
#endif
20152015
bool check_firmware_before_loading = settings->bools.check_firmware_before_loading;
20162016
#ifdef HAVE_PATCH
2017-
uint16_t rarch_flags = retroarch_get_flags();
2017+
uint32_t rarch_flags = retroarch_get_flags();
20182018
#endif
20192019

20202020
content_ctx.flags = 0;
@@ -2166,7 +2166,7 @@ bool task_push_start_current_core(content_ctx_info_t *content_info)
21662166
content_ctx.flags |= CONTENT_INFO_FLAG_CHECK_FW_BEFORE_LOADING;
21672167
#ifdef HAVE_PATCH
21682168
{
2169-
uint16_t rarch_flags = retroarch_get_flags();
2169+
uint32_t rarch_flags = retroarch_get_flags();
21702170
if (rarch_flags & RARCH_FLAGS_IPS_PREF)
21712171
content_ctx.flags |= CONTENT_INFO_FLAG_IS_IPS_PREF;
21722172
if (rarch_flags & RARCH_FLAGS_BPS_PREF)
@@ -2412,7 +2412,7 @@ bool task_push_load_content_with_new_core_from_menu(
24122412
content_ctx.flags |= CONTENT_INFO_FLAG_CHECK_FW_BEFORE_LOADING;
24132413
#ifdef HAVE_PATCH
24142414
{
2415-
uint16_t rarch_flags = retroarch_get_flags();
2415+
uint32_t rarch_flags = retroarch_get_flags();
24162416
if (rarch_flags & RARCH_FLAGS_IPS_PREF)
24172417
content_ctx.flags |= CONTENT_INFO_FLAG_IS_IPS_PREF;
24182418
if (rarch_flags & RARCH_FLAGS_BPS_PREF)
@@ -2522,7 +2522,7 @@ static bool task_load_content_internal(
25222522
const char *path_dir_system = settings->paths.directory_system;
25232523
const char *path_dir_cache = settings->paths.directory_cache;
25242524
#ifdef HAVE_PATCH
2525-
uint16_t rarch_flags = retroarch_get_flags();
2525+
uint32_t rarch_flags = retroarch_get_flags();
25262526
#endif
25272527
content_ctx.flags = 0;
25282528

@@ -3025,7 +3025,7 @@ bool content_init(void)
30253025
const char *path_dir_system = settings->paths.directory_system;
30263026
const char *path_dir_cache = settings->paths.directory_cache;
30273027
#ifdef HAVE_PATCH
3028-
uint16_t rarch_flags = retroarch_get_flags();
3028+
uint32_t rarch_flags = retroarch_get_flags();
30293029
#endif
30303030

30313031
content_file_list_free(p_content->content_list);

0 commit comments

Comments
 (0)