diff --git a/gfx/video_crt_switch.h b/gfx/video_crt_switch.h index 168b0c54fa..68a90aa905 100644 --- a/gfx/video_crt_switch.h +++ b/gfx/video_crt_switch.h @@ -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( diff --git a/input/connect/connect_ps3.c b/input/connect/connect_ps3.c index bd80e78653..5ea88264ad 100644 --- a/input/connect/connect_ps3.c +++ b/input/connect/connect_ps3.c @@ -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; }; /* diff --git a/input/connect/connect_ps4.c b/input/connect/connect_ps4.c index 3b93e0227f..75420e66e1 100644 --- a/input/connect/connect_ps4.c +++ b/input/connect/connect_ps4.c @@ -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) diff --git a/input/connect/connect_psxadapter.c b/input/connect/connect_psxadapter.c index bae62bea96..27332a149f 100644 --- a/input/connect/connect_psxadapter.c +++ b/input/connect/connect_psxadapter.c @@ -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) diff --git a/input/connect/connect_retrode.c b/input/connect/connect_retrode.c index 1dd569f607..58fc31f504 100644 --- a/input/connect/connect_retrode.c +++ b/input/connect/connect_retrode.c @@ -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) diff --git a/input/connect/connect_snesusb.c b/input/connect/connect_snesusb.c index 547b70df8a..13bf4a0d14 100644 --- a/input/connect/connect_snesusb.c +++ b/input/connect/connect_snesusb.c @@ -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) diff --git a/input/connect/joypad_connection.h b/input/connect/joypad_connection.h index 454d91e9e2..ea45d53a93 100644 --- a/input/connect/joypad_connection.h +++ b/input/connect/joypad_connection.h @@ -55,9 +55,9 @@ struct joypad_connection { - bool connected; struct pad_connection_interface *iface; void* data; + bool connected; }; typedef struct pad_connection_interface diff --git a/retroarch.c b/retroarch.c index c22609705d..61a3135dbe 100644 --- a/retroarch.c +++ b/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