1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 20:25:47 +00:00

More struct alignment

This commit is contained in:
twinaphex 2020-08-14 17:11:18 +02:00
parent 1ccb51460c
commit b6228729b6
4 changed files with 55 additions and 52 deletions

View File

@ -104,126 +104,126 @@ enum gfx_animation_ticker_type
typedef struct gfx_animation_ctx_entry
{
enum gfx_animation_easing_type easing_enum;
float *subject;
void *userdata;
tween_cb cb;
uintptr_t tag;
float duration;
float target_value;
float *subject;
tween_cb cb;
void *userdata;
enum gfx_animation_easing_type easing_enum;
} gfx_animation_ctx_entry_t;
typedef struct gfx_animation_ctx_ticker
{
bool selected;
size_t len;
uint64_t idx;
enum gfx_animation_ticker_type type_enum;
char *s;
const char *str;
const char *spacer;
size_t len;
enum gfx_animation_ticker_type type_enum;
bool selected;
} gfx_animation_ctx_ticker_t;
typedef struct gfx_animation_ctx_ticker_smooth
{
bool selected;
font_data_t *font;
float font_scale;
unsigned glyph_width; /* Fallback if font == NULL */
unsigned field_width;
enum gfx_animation_ticker_type type_enum;
uint64_t idx;
const char *src_str;
const char *spacer;
char *dst_str;
size_t dst_str_len;
unsigned *dst_str_width; /* May be set to NULL (RGUI + XMB do not require this info) */
unsigned *dst_str_width; /* May be set to NULL
(RGUI + XMB do not require this info) */
unsigned *x_offset;
font_data_t *font;
size_t dst_str_len;
unsigned glyph_width; /* Fallback if font == NULL */
unsigned field_width;
float font_scale;
enum gfx_animation_ticker_type type_enum;
bool selected;
} gfx_animation_ctx_ticker_smooth_t;
typedef struct gfx_animation_ctx_line_ticker
{
size_t line_len;
size_t max_lines;
uint64_t idx;
enum gfx_animation_ticker_type type_enum;
const char *str;
char *s;
size_t len;
const char *str;
size_t line_len;
size_t max_lines;
enum gfx_animation_ticker_type type_enum;
} gfx_animation_ctx_line_ticker_t;
typedef struct gfx_animation_ctx_line_ticker_smooth
{
bool fade_enabled;
font_data_t *font;
float font_scale;
unsigned field_width;
unsigned field_height;
enum gfx_animation_ticker_type type_enum;
uint64_t idx;
font_data_t *font;
const char *src_str;
float *y_offset;
char *dst_str;
size_t dst_str_len;
float *y_offset;
char *top_fade_str;
size_t top_fade_str_len;
float *top_fade_y_offset;
float *top_fade_alpha;
char *bottom_fade_str;
size_t bottom_fade_str_len;
float *bottom_fade_y_offset;
float *bottom_fade_alpha;
char *bottom_fade_str;
size_t bottom_fade_str_len;
unsigned field_width;
unsigned field_height;
float font_scale;
enum gfx_animation_ticker_type type_enum;
bool fade_enabled;
} gfx_animation_ctx_line_ticker_smooth_t;
typedef float gfx_timer_t;
typedef struct gfx_timer_ctx_entry
{
float duration;
tween_cb cb;
void *userdata;
float duration;
} gfx_timer_ctx_entry_t;
typedef struct gfx_delayed_animation
{
gfx_animation_ctx_entry_t entry; /* pointer alignment */
gfx_timer_t timer;
gfx_animation_ctx_entry_t entry;
} gfx_delayed_animation_t;
typedef float (*easing_cb) (float, float, float, float);
struct tween
{
easing_cb easing;
tween_cb cb;
void *userdata;
uintptr_t tag;
float duration;
float running_since;
float initial_value;
float target_value;
float *subject;
uintptr_t tag;
easing_cb easing;
tween_cb cb;
void *userdata;
bool deleted;
};
struct gfx_animation
{
bool pending_deletes;
bool in_update;
bool animation_is_active;
bool ticker_is_active;
uint64_t ticker_idx; /* updated every TICKER_SPEED us */
uint64_t ticker_slow_idx; /* updated every TICKER_SLOW_SPEED us */
uint64_t ticker_pixel_idx; /* updated every frame */
uint64_t ticker_pixel_line_idx; /* updated every frame */
retro_time_t cur_time;
retro_time_t old_time;
struct tween* list;
struct tween* pending;
float delta_time;
struct tween* list;
struct tween* pending;
bool pending_deletes;
bool in_update;
bool animation_is_active;
bool ticker_is_active;
};
typedef struct gfx_animation gfx_animation_t;

View File

@ -146,22 +146,22 @@ struct retro_keybind
struct rarch_joypad_info
{
uint16_t joy_idx;
const struct retro_keybind *auto_binds;
float axis_threshold;
uint16_t joy_idx;
};
typedef struct
{
unsigned name_index;
uint16_t vid;
uint16_t pid;
bool autoconfigured;
char joypad_driver[32];
char name[256];
char display_name[256];
char config_path[PATH_MAX_LENGTH];
char config_name[PATH_MAX_LENGTH];
char joypad_driver[32];
uint16_t vid;
uint16_t pid;
bool autoconfigured;
unsigned name_index;
} input_device_info_t;
struct input_driver

View File

@ -22,11 +22,14 @@ typedef struct input_keyboard_line input_keyboard_line_t;
typedef struct rarch_joypad_info rarch_joypad_info_t;
typedef struct input_driver input_driver_t;
typedef struct input_keyboard_ctx_wait input_keyboard_ctx_wait_t;
typedef struct {
typedef struct
{
uint32_t data[8];
uint16_t analogs[8];
uint16_t analog_buttons[16];
} input_bits_t;
typedef struct joypad_connection joypad_connection_t;
typedef struct pad_connection_listener_interface pad_connection_listener_t;

View File

@ -38,13 +38,13 @@
typedef struct
{
unsigned port;
input_device_info_t device_info;
bool autoconfig_enabled;
bool suppress_notifcations;
char *dir_autoconfig;
char *dir_driver_autoconfig;
config_file_t *autoconfig_file;
unsigned port;
input_device_info_t device_info; /* unsigned alignment */
bool autoconfig_enabled;
bool suppress_notifcations;
} autoconfig_handle_t;
/*********************/