From b8058a93e176735b5f786a195c913b803e8a2c12 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 15 Aug 2020 23:10:31 +0200 Subject: [PATCH] Reorder structs, alignment --- command.h | 16 ++++++++-------- content.h | 2 +- core.h | 4 ++-- core_backup.h | 2 +- core_info.h | 1 - runtime_file.h | 4 ++-- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/command.h b/command.h index c9ff24ed1f..9116c1f24a 100644 --- a/command.h +++ b/command.h @@ -29,14 +29,6 @@ RETRO_BEGIN_DECLS -typedef struct command command_t; - -typedef struct command_handle -{ - command_t *handle; - unsigned id; -} command_handle_t; - enum event_command { CMD_EVENT_NONE = 0, @@ -214,6 +206,14 @@ enum event_command CMD_EVENT_SAVE_FILES }; +typedef struct command command_t; + +typedef struct command_handle +{ + command_t *handle; + unsigned id; +} command_handle_t; + /** * command_event: * @cmd : Command index. diff --git a/content.h b/content.h index fb979003b6..b00f66f844 100644 --- a/content.h +++ b/content.h @@ -33,10 +33,10 @@ RETRO_BEGIN_DECLS typedef struct content_ctx_info { - int argc; /* Argument count. */ char **argv; /* Argument variable list. */ void *args; /* Arguments passed from callee */ environment_get_t environ_get; /* Function passed for environment_get function */ + int argc; /* Argument count. */ } content_ctx_info_t; /* Load a RAM state from disk to memory. */ diff --git a/core.h b/core.h index e15f86485c..dec7c47bcf 100644 --- a/core.h +++ b/core.h @@ -45,7 +45,7 @@ enum typedef struct rarch_memory_descriptor { - struct retro_memory_descriptor core; + struct retro_memory_descriptor core; /* uint64_t alignment */ size_t disconnect_mask; } rarch_memory_descriptor_t; @@ -86,9 +86,9 @@ typedef struct retro_ctx_input_state_info typedef struct retro_ctx_cheat_info { + const char *code; unsigned index; bool enabled; - const char *code; } retro_ctx_cheat_info_t; typedef struct retro_ctx_api_info diff --git a/core_backup.h b/core_backup.h index 4678295b1a..6b4feb8550 100644 --- a/core_backup.h +++ b/core_backup.h @@ -72,7 +72,7 @@ typedef struct typedef struct { char *backup_path; - core_backup_list_date_t date; + core_backup_list_date_t date; /* unsigned alignment */ uint32_t crc; enum core_backup_mode backup_mode; } core_backup_list_entry_t; diff --git a/core_info.h b/core_info.h index e6f69ea403..e61949f08b 100644 --- a/core_info.h +++ b/core_info.h @@ -33,7 +33,6 @@ enum core_info_list_qsort_type CORE_INFO_LIST_SORT_SYSTEM_NAME }; - typedef struct { char *path; diff --git a/runtime_file.h b/runtime_file.h index 53ec31aaa9..dc7012945c 100644 --- a/runtime_file.h +++ b/runtime_file.h @@ -101,8 +101,8 @@ typedef struct typedef struct { - rtl_runtime_t runtime; - rtl_last_played_t last_played; + rtl_runtime_t runtime; /* unsigned alignment */ + rtl_last_played_t last_played; /* unsigned alignment */ char path[PATH_MAX_LENGTH]; } runtime_log_t;