Alignment changes

This commit is contained in:
twinaphex 2020-08-14 18:19:57 +02:00
parent b3963a2897
commit 023fd4f330
7 changed files with 48 additions and 50 deletions

View File

@ -54,11 +54,6 @@ typedef struct
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; char *path;
void *config_data; void *config_data;
char *display_name; char *display_name;
@ -85,25 +80,30 @@ typedef struct
struct string_list *licenses_list; struct string_list *licenses_list;
struct string_list *required_hw_api_list; struct string_list *required_hw_api_list;
core_info_firmware_t *firmware; core_info_firmware_t *firmware;
core_file_id_t core_file_id; core_file_id_t core_file_id; /* ptr alignment */
void *userdata; void *userdata;
size_t firmware_count;
bool supports_no_game;
bool database_match_archive_member;
bool is_experimental;
bool is_locked;
} core_info_t; } core_info_t;
/* A subset of core_info parameters required for /* A subset of core_info parameters required for
* core updater tasks */ * core updater tasks */
typedef struct typedef struct
{ {
bool is_experimental;
char *display_name; char *display_name;
char *description; char *description;
char *licenses; char *licenses;
bool is_experimental;
} core_updater_info_t; } core_updater_info_t;
typedef struct typedef struct
{ {
core_info_t *list; core_info_t *list;
size_t count;
char *all_ext; char *all_ext;
size_t count;
} core_info_list_t; } core_info_list_t;
typedef struct core_info_ctx_firmware typedef struct core_info_ctx_firmware

View File

@ -72,26 +72,14 @@ enum database_query_type
typedef struct typedef struct
{ {
struct string_list *list;
size_t list_ptr;
enum database_status status; enum database_status status;
enum database_type type; enum database_type type;
size_t list_ptr;
struct string_list *list;
} database_info_handle_t; } database_info_handle_t;
typedef struct 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 *name;
char *rom_name; char *rom_name;
char *serial; char *serial;
@ -111,12 +99,24 @@ typedef struct
char *sha1; char *sha1;
char *md5; char *md5;
void *userdata; 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; } database_info_t;
typedef struct typedef struct
{ {
size_t count;
database_info_t *list; database_info_t *list;
size_t count;
} database_info_list_t; } database_info_list_t;
database_info_list_t *database_info_list_new(const char *rdb_path, database_info_list_t *database_info_list_new(const char *rdb_path,

View File

@ -67,6 +67,13 @@ enum sinc_window
typedef struct rarch_sinc_resampler 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 enable_avx;
unsigned phase_bits; unsigned phase_bits;
unsigned subphase_bits; unsigned subphase_bits;
@ -77,14 +84,6 @@ typedef struct rarch_sinc_resampler
float subphase_mod; float subphase_mod;
float kaiser_beta; float kaiser_beta;
enum sinc_window window_type; 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; } rarch_sinc_resampler_t;
#if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS) #if defined(__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)

View File

@ -67,13 +67,12 @@ typedef unsigned resampler_simd_mask_t;
struct resampler_data struct resampler_data
{ {
double ratio;
const float *data_in; const float *data_in;
float *data_out; float *data_out;
size_t input_frames; size_t input_frames;
size_t output_frames; size_t output_frames;
double ratio;
}; };
/* Returns true if config key was found. Otherwise, /* Returns true if config key was found. Otherwise,

View File

@ -394,12 +394,12 @@ typedef struct menu_ctx_pointer
{ {
menu_file_list_cbs_t *cbs; menu_file_list_cbs_t *cbs;
menu_entry_t *entry; menu_entry_t *entry;
enum menu_input_pointer_gesture gesture;
unsigned x; unsigned x;
unsigned y; unsigned y;
unsigned ptr; unsigned ptr;
unsigned action; unsigned action;
int retcode; int retcode;
enum menu_input_pointer_gesture gesture;
} menu_ctx_pointer_t; } menu_ctx_pointer_t;
typedef struct menu_ctx_bind typedef struct menu_ctx_bind
@ -407,9 +407,9 @@ typedef struct menu_ctx_bind
menu_file_list_cbs_t *cbs; menu_file_list_cbs_t *cbs;
const char *path; const char *path;
const char *label; const char *label;
unsigned type;
size_t idx; size_t idx;
int retcode; int retcode;
unsigned type;
} menu_ctx_bind_t; } menu_ctx_bind_t;
/** /**

View File

@ -66,10 +66,10 @@ typedef struct ex_arena
typedef struct ex_hashmap32 typedef struct ex_hashmap32
{ {
uintptr_t *vals;
uint32_t len; uint32_t len;
uint32_t cap; uint32_t cap;
uint32_t *keys; uint32_t *keys;
uintptr_t *vals;
} ex_hashmap32; } ex_hashmap32;
typedef struct typedef struct
@ -90,18 +90,18 @@ typedef struct
typedef struct typedef struct
{ {
ex_arena arena; ex_arena arena; /* ptr alignment */
explore_string_t **by[EXPLORE_CAT_COUNT]; explore_string_t **by[EXPLORE_CAT_COUNT];
bool has_unknown[EXPLORE_CAT_COUNT]; explore_entry_t *entries;
explore_entry_t* entries;
playlist_t **playlists; playlist_t **playlists;
uintptr_t* icons; uintptr_t *icons;
const char* label_explore_item_str; const char *label_explore_item_str;
char title[1024];
char find_string[1024];
unsigned top_depth; unsigned top_depth;
unsigned show_icons; unsigned show_icons;
char title[1024];
char find_string[1024];
bool has_unknown[EXPLORE_CAT_COUNT];
} explore_state_t; } explore_state_t;
static const struct static const struct

View File

@ -140,9 +140,9 @@ enum menu_input_pointer_gesture
* common to mouse + touchscreen hardware */ * common to mouse + touchscreen hardware */
typedef struct menu_input_pointer_hw_state typedef struct menu_input_pointer_hw_state
{ {
bool active;
int16_t x; int16_t x;
int16_t y; int16_t y;
bool active;
bool select_pressed; bool select_pressed;
bool cancel_pressed; bool cancel_pressed;
bool up_pressed; bool up_pressed;
@ -153,17 +153,17 @@ typedef struct menu_input_pointer_hw_state
typedef struct menu_input_pointer typedef struct menu_input_pointer
{ {
enum menu_pointer_type type;
bool active;
bool pressed;
bool dragged;
retro_time_t press_duration; retro_time_t press_duration;
float y_accel;
enum menu_pointer_type type;
enum menu_input_pointer_press_direction press_direction; enum menu_input_pointer_press_direction press_direction;
int16_t x; int16_t x;
int16_t y; int16_t y;
int16_t dx; int16_t dx;
int16_t dy; int16_t dy;
float y_accel; bool active;
bool pressed;
bool dragged;
} menu_input_pointer_t; } menu_input_pointer_t;
typedef struct menu_input typedef struct menu_input