mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 07:59:42 +00:00
Reorder structs, alignment
This commit is contained in:
parent
501165af0b
commit
6e1445c658
@ -29,6 +29,8 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct videocrt_switch
|
||||
{
|
||||
double p_clock;
|
||||
|
||||
int center_adjust;
|
||||
int porch_adjust;
|
||||
int tmp_porch_adjust;
|
||||
@ -44,7 +46,6 @@ typedef struct videocrt_switch
|
||||
float ra_tmp_core_hz;
|
||||
float fly_aspect;
|
||||
|
||||
double p_clock;
|
||||
} videocrt_switch_t;
|
||||
|
||||
void crt_switch_res_core(
|
||||
|
@ -27,11 +27,11 @@ struct hidpad_ps3_data
|
||||
{
|
||||
struct pad_connection* connection;
|
||||
hid_driver_t *driver;
|
||||
uint8_t data[512];
|
||||
uint32_t slot;
|
||||
uint32_t buttons;
|
||||
bool have_led;
|
||||
uint16_t motors[2];
|
||||
uint8_t data[512];
|
||||
bool have_led;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -92,8 +92,8 @@ struct ps4buttons
|
||||
|
||||
struct ps4
|
||||
{
|
||||
uint8_t hatvalue[4];
|
||||
struct ps4buttons btn;
|
||||
uint8_t hatvalue[4];
|
||||
uint8_t trigger[2];
|
||||
};
|
||||
|
||||
@ -103,8 +103,8 @@ struct hidpad_ps4_data
|
||||
hid_driver_t *driver;
|
||||
struct ps4 data;
|
||||
uint32_t slot;
|
||||
bool have_led;
|
||||
uint16_t motors[2];
|
||||
bool have_led;
|
||||
};
|
||||
|
||||
static void hidpad_ps4_send_control(struct hidpad_ps4_data* device)
|
||||
|
@ -25,9 +25,9 @@
|
||||
struct hidpad_psxadapter_data
|
||||
{
|
||||
struct pad_connection* connection;
|
||||
uint8_t data[64];
|
||||
uint32_t slot;
|
||||
uint32_t buttons;
|
||||
uint8_t data[64];
|
||||
};
|
||||
|
||||
static void* hidpad_psxadapter_init(void *data, uint32_t slot, hid_driver_t *driver)
|
||||
|
@ -31,9 +31,9 @@ static struct hidpad_retrode_data* port_device[4];
|
||||
struct hidpad_retrode_data
|
||||
{
|
||||
struct pad_connection* connection;
|
||||
uint8_t data[64];
|
||||
uint32_t slot;
|
||||
uint32_t buttons;
|
||||
uint8_t data[64];
|
||||
};
|
||||
|
||||
static void* hidpad_retrode_init(void *data, uint32_t slot, hid_driver_t *driver)
|
||||
|
@ -26,9 +26,9 @@
|
||||
struct hidpad_snesusb_data
|
||||
{
|
||||
struct pad_connection* connection;
|
||||
uint8_t data[64];
|
||||
uint32_t slot;
|
||||
uint32_t buttons;
|
||||
uint8_t data[64];
|
||||
};
|
||||
|
||||
static void* hidpad_snesusb_init(void *data, uint32_t slot, hid_driver_t *driver)
|
||||
|
@ -55,9 +55,9 @@
|
||||
|
||||
struct joypad_connection
|
||||
{
|
||||
bool connected;
|
||||
struct pad_connection_interface *iface;
|
||||
void* data;
|
||||
bool connected;
|
||||
};
|
||||
|
||||
typedef struct pad_connection_interface
|
||||
|
74
retroarch.c
74
retroarch.c
@ -1901,7 +1901,7 @@ struct discord_state
|
||||
int64_t pause_time;
|
||||
int64_t elapsed_time;
|
||||
|
||||
DiscordRichPresence presence;
|
||||
DiscordRichPresence presence; /* int64_t alignment */
|
||||
|
||||
unsigned status;
|
||||
|
||||
@ -1923,6 +1923,7 @@ struct rarch_state
|
||||
double audio_source_ratio_original;
|
||||
double audio_source_ratio_current;
|
||||
struct retro_system_av_info video_driver_av_info; /* double alignment */
|
||||
videocrt_switch_t crt_switch_st; /* double alignment */
|
||||
|
||||
retro_time_t frame_limit_minimum_time;
|
||||
retro_time_t frame_limit_last_time;
|
||||
@ -1933,11 +1934,20 @@ struct rarch_state
|
||||
|
||||
retro_usec_t runloop_frame_time_last;
|
||||
|
||||
#ifdef HAVE_GFX_WIDGETS
|
||||
dispgfx_widget_t dispwidget_st; /* uint64_t alignment */
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
rarch_timer_t shader_delay_timer; /* int64_t alignment */
|
||||
#endif
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_state_t discord_st; /* int64_t alignment */
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
struct menu_bind_state menu_input_binds; /* uint64_t alignment */
|
||||
struct menu_state menu_driver_state; /* int64_t alignment */
|
||||
#endif
|
||||
#ifdef HAVE_GFX_WIDGETS
|
||||
dispgfx_widget_t dispwidget_st; /* uint64_t alignment */
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
struct menu_bind_state menu_input_binds; /* uint64_t alignment */
|
||||
#endif
|
||||
|
||||
uint64_t audio_driver_free_samples_count;
|
||||
@ -1948,8 +1958,13 @@ struct rarch_state
|
||||
|
||||
uint64_t video_driver_frame_time_count;
|
||||
uint64_t video_driver_frame_count;
|
||||
struct retro_camera_callback camera_cb; /* uint64_t alignment */
|
||||
gfx_animation_t anim; /* uint64_t alignment */
|
||||
struct retro_camera_callback camera_cb; /* uint64_t alignment */
|
||||
gfx_animation_t anim; /* uint64_t alignment */
|
||||
gfx_thumbnail_state_t gfx_thumb_state; /* uint64_t alignment */
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
|
||||
input_remote_state_t remote_st_ptr; /* uint64_t alignment */
|
||||
#endif
|
||||
|
||||
|
||||
uint8_t *video_driver_record_gpu_buffer;
|
||||
uint8_t *midi_drv_input_buffer;
|
||||
@ -2089,19 +2104,25 @@ struct rarch_state
|
||||
|
||||
const struct retro_keybind *libretro_input_binds[MAX_USERS];
|
||||
|
||||
core_info_state_t core_info_st; /* ptr alignment */
|
||||
rarch_system_info_t runloop_system; /* ptr alignment */
|
||||
struct retro_hw_render_callback hw_render; /* ptr alignment */
|
||||
content_state_t content_st; /* ptr alignment */
|
||||
midi_event_t midi_drv_input_event; /* ptr alignment */
|
||||
midi_event_t midi_drv_output_event; /* ptr alignment */
|
||||
core_info_state_t core_info_st; /* ptr alignment */
|
||||
rarch_system_info_t runloop_system; /* ptr alignment */
|
||||
struct retro_hw_render_callback hw_render; /* ptr alignment */
|
||||
#ifdef HAVE_BSV_MOVIE
|
||||
bsv_movie_t *bsv_movie_state_handle; /* ptr alignment */
|
||||
bsv_movie_t *bsv_movie_state_handle; /* ptr alignment */
|
||||
#endif
|
||||
gfx_display_t dispgfx; /* ptr alignment */
|
||||
input_keyboard_press_t keyboard_press_cb; /* ptr alignment */
|
||||
gfx_display_t dispgfx; /* ptr alignment */
|
||||
input_keyboard_press_t keyboard_press_cb; /* ptr alignment */
|
||||
struct retro_frame_time_callback runloop_frame_time; /* ptr alignment */
|
||||
retro_input_state_t input_state_callback_original; /* ptr alignment */
|
||||
struct retro_audio_callback audio_callback; /* ptr alignment */
|
||||
retro_keyboard_event_t runloop_key_event; /* ptr alignment */
|
||||
retro_keyboard_event_t runloop_frontend_key_event; /* ptr alignment */
|
||||
|
||||
/*************************************/
|
||||
/* TODO/FIXME BEGIN - find alignment */
|
||||
videocrt_switch_t crt_switch_st;
|
||||
gfx_thumbnail_state_t gfx_thumb_state;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
dylib_t lib_handle;
|
||||
#endif
|
||||
@ -2121,18 +2142,8 @@ struct rarch_state
|
||||
menu_input_t menu_input_state;
|
||||
#endif
|
||||
|
||||
midi_event_t midi_drv_input_event;
|
||||
midi_event_t midi_drv_output_event;
|
||||
|
||||
gfx_ctx_driver_t current_video_context;
|
||||
|
||||
|
||||
retro_input_state_t input_state_callback_original;
|
||||
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORKGAMEPAD)
|
||||
input_remote_state_t remote_st_ptr;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* dynamic.c:dynamic_request_hw_context will try to set flag data when the context
|
||||
* is in the middle of being rebuilt; in these cases we will save flag
|
||||
@ -2146,26 +2157,14 @@ struct rarch_state
|
||||
|
||||
retro_bits_t has_set_libretro_device;
|
||||
|
||||
struct retro_frame_time_callback runloop_frame_time;
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
struct audio_mixer_stream
|
||||
audio_mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS];
|
||||
#endif
|
||||
struct retro_audio_callback audio_callback;
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
rarch_timer_t shader_delay_timer;
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
struct menu_state menu_driver_state;
|
||||
#endif
|
||||
#ifdef HAVE_DISCORD
|
||||
discord_state_t discord_st;
|
||||
#endif
|
||||
|
||||
struct retro_callbacks retro_ctx;
|
||||
struct retro_core_t current_core;
|
||||
struct global g_extern;
|
||||
content_state_t content_st;
|
||||
#if defined(HAVE_COMMAND)
|
||||
#ifdef HAVE_NETWORK_CMD
|
||||
struct sockaddr_storage lastcmd_net_source;
|
||||
@ -2183,9 +2182,6 @@ struct rarch_state
|
||||
subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS]
|
||||
[SUBSYSTEM_MAX_SUBSYSTEM_ROMS];
|
||||
|
||||
retro_keyboard_event_t runloop_key_event;
|
||||
retro_keyboard_event_t runloop_frontend_key_event;
|
||||
|
||||
video_driver_frame_t frame_bak;
|
||||
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
|
Loading…
Reference in New Issue
Block a user