diff --git a/core_info.h b/core_info.h index 3fc042100c..730a513e8b 100644 --- a/core_info.h +++ b/core_info.h @@ -54,11 +54,6 @@ typedef struct typedef struct { - bool supports_no_game; - bool database_match_archive_member; - bool is_experimental; - bool is_locked; - size_t firmware_count; char *path; void *config_data; char *display_name; @@ -85,25 +80,30 @@ typedef struct struct string_list *licenses_list; struct string_list *required_hw_api_list; core_info_firmware_t *firmware; - core_file_id_t core_file_id; + core_file_id_t core_file_id; /* ptr alignment */ void *userdata; + size_t firmware_count; + bool supports_no_game; + bool database_match_archive_member; + bool is_experimental; + bool is_locked; } core_info_t; /* A subset of core_info parameters required for * core updater tasks */ typedef struct { - bool is_experimental; char *display_name; char *description; char *licenses; + bool is_experimental; } core_updater_info_t; typedef struct { core_info_t *list; - size_t count; char *all_ext; + size_t count; } core_info_list_t; typedef struct core_info_ctx_firmware diff --git a/database_info.h b/database_info.h index bba0c525ee..65364cf907 100644 --- a/database_info.h +++ b/database_info.h @@ -72,26 +72,14 @@ enum database_query_type typedef struct { + struct string_list *list; + size_t list_ptr; enum database_status status; enum database_type type; - size_t list_ptr; - struct string_list *list; } database_info_handle_t; typedef struct { - int analog_supported; - int rumble_supported; - int coop_supported; - uint32_t crc32; - unsigned size; - unsigned famitsu_magazine_rating; - unsigned edge_magazine_rating; - unsigned edge_magazine_issue; - unsigned max_users; - unsigned releasemonth; - unsigned releaseyear; - unsigned tgdb_rating; char *name; char *rom_name; char *serial; @@ -111,12 +99,24 @@ typedef struct char *sha1; char *md5; void *userdata; + int analog_supported; + int rumble_supported; + int coop_supported; + uint32_t crc32; + unsigned size; + unsigned famitsu_magazine_rating; + unsigned edge_magazine_rating; + unsigned edge_magazine_issue; + unsigned max_users; + unsigned releasemonth; + unsigned releaseyear; + unsigned tgdb_rating; } database_info_t; typedef struct { - size_t count; database_info_t *list; + size_t count; } database_info_list_t; database_info_list_t *database_info_list_new(const char *rdb_path, diff --git a/libretro-common/audio/resampler/drivers/sinc_resampler.c b/libretro-common/audio/resampler/drivers/sinc_resampler.c index afa7e8aa99..14fa1e58d8 100644 --- a/libretro-common/audio/resampler/drivers/sinc_resampler.c +++ b/libretro-common/audio/resampler/drivers/sinc_resampler.c @@ -67,6 +67,13 @@ enum sinc_window typedef struct rarch_sinc_resampler { + /* A buffer for phase_table, buffer_l and buffer_r + * are created in a single calloc(). + * Ensure that we get as good cache locality as we can hope for. */ + float *main_buffer; + float *phase_table; + float *buffer_l; + float *buffer_r; unsigned enable_avx; unsigned phase_bits; unsigned subphase_bits; @@ -77,14 +84,6 @@ typedef struct rarch_sinc_resampler float subphase_mod; float kaiser_beta; enum sinc_window window_type; - - /* A buffer for phase_table, buffer_l and buffer_r - * are created in a single calloc(). - * Ensure that we get as good cache locality as we can hope for. */ - float *main_buffer; - float *phase_table; - float *buffer_l; - float *buffer_r; } rarch_sinc_resampler_t; #if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) diff --git a/libretro-common/include/audio/audio_resampler.h b/libretro-common/include/audio/audio_resampler.h index d728bf58d9..a251d0240b 100644 --- a/libretro-common/include/audio/audio_resampler.h +++ b/libretro-common/include/audio/audio_resampler.h @@ -67,13 +67,12 @@ typedef unsigned resampler_simd_mask_t; struct resampler_data { + double ratio; const float *data_in; float *data_out; size_t input_frames; size_t output_frames; - - double ratio; }; /* Returns true if config key was found. Otherwise, diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 48c12d75d5..9de643226e 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -394,12 +394,12 @@ typedef struct menu_ctx_pointer { menu_file_list_cbs_t *cbs; menu_entry_t *entry; - enum menu_input_pointer_gesture gesture; unsigned x; unsigned y; unsigned ptr; unsigned action; int retcode; + enum menu_input_pointer_gesture gesture; } menu_ctx_pointer_t; typedef struct menu_ctx_bind @@ -407,9 +407,9 @@ typedef struct menu_ctx_bind menu_file_list_cbs_t *cbs; const char *path; const char *label; - unsigned type; size_t idx; int retcode; + unsigned type; } menu_ctx_bind_t; /** diff --git a/menu/menu_explore.c b/menu/menu_explore.c index 96db855619..84171d7d07 100644 --- a/menu/menu_explore.c +++ b/menu/menu_explore.c @@ -66,10 +66,10 @@ typedef struct ex_arena typedef struct ex_hashmap32 { + uintptr_t *vals; uint32_t len; uint32_t cap; uint32_t *keys; - uintptr_t *vals; } ex_hashmap32; typedef struct @@ -90,18 +90,18 @@ typedef struct typedef struct { - ex_arena arena; + ex_arena arena; /* ptr alignment */ explore_string_t **by[EXPLORE_CAT_COUNT]; - bool has_unknown[EXPLORE_CAT_COUNT]; - - explore_entry_t* entries; + explore_entry_t *entries; playlist_t **playlists; - uintptr_t* icons; - const char* label_explore_item_str; - char title[1024]; - char find_string[1024]; + uintptr_t *icons; + const char *label_explore_item_str; unsigned top_depth; unsigned show_icons; + + char title[1024]; + char find_string[1024]; + bool has_unknown[EXPLORE_CAT_COUNT]; } explore_state_t; static const struct diff --git a/menu/menu_input.h b/menu/menu_input.h index e7e52f6943..ff51f655b0 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -140,9 +140,9 @@ enum menu_input_pointer_gesture * common to mouse + touchscreen hardware */ typedef struct menu_input_pointer_hw_state { - bool active; int16_t x; int16_t y; + bool active; bool select_pressed; bool cancel_pressed; bool up_pressed; @@ -153,17 +153,17 @@ typedef struct menu_input_pointer_hw_state typedef struct menu_input_pointer { - enum menu_pointer_type type; - bool active; - bool pressed; - bool dragged; retro_time_t press_duration; + float y_accel; + enum menu_pointer_type type; enum menu_input_pointer_press_direction press_direction; int16_t x; int16_t y; int16_t dx; int16_t dy; - float y_accel; + bool active; + bool pressed; + bool dragged; } menu_input_pointer_t; typedef struct menu_input