mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Reorder structs/alignment
This commit is contained in:
parent
327d82cc1d
commit
29cb70abb2
50
retroarch.c
50
retroarch.c
@ -2096,12 +2096,12 @@ struct rarch_state
|
||||
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 */
|
||||
|
||||
/*************************************/
|
||||
/* TODO/FIXME BEGIN - find alignment */
|
||||
videocrt_switch_t crt_switch_st;
|
||||
gfx_thumbnail_state_t gfx_thumb_state;
|
||||
input_keyboard_press_t keyboard_press_cb;
|
||||
#ifdef HAVE_DYNAMIC
|
||||
dylib_t lib_handle;
|
||||
#endif
|
||||
@ -2582,30 +2582,30 @@ static midi_driver_t *midi_drv = &midi_null;
|
||||
static const video_display_server_t *current_display_server = &dispserv_null;
|
||||
|
||||
struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
|
||||
{ "4:3", 1.3333f },
|
||||
{ "16:9", 1.7778f },
|
||||
{ "16:10", 1.6f },
|
||||
{ "16:15", 16.0f / 15.0f },
|
||||
{ "21:9", 21.0f / 9.0f },
|
||||
{ "1:1", 1.0f },
|
||||
{ "2:1", 2.0f },
|
||||
{ "3:2", 1.5f },
|
||||
{ "3:4", 0.75f },
|
||||
{ "4:1", 4.0f },
|
||||
{ "9:16", 0.5625f },
|
||||
{ "5:4", 1.25f },
|
||||
{ "6:5", 1.2f },
|
||||
{ "7:9", 0.7777f },
|
||||
{ "8:3", 2.6666f },
|
||||
{ "8:7", 1.1428f },
|
||||
{ "19:12", 1.5833f },
|
||||
{ "19:14", 1.3571f },
|
||||
{ "30:17", 1.7647f },
|
||||
{ "32:9", 3.5555f },
|
||||
{ "Config", 0.0f },
|
||||
{ "Square pixel", 1.0f },
|
||||
{ "Core provided", 1.0f },
|
||||
{ "Custom", 0.0f }
|
||||
{ 1.3333f, "4:3" },
|
||||
{ 1.7778f, "16:9" },
|
||||
{ 1.6f, "16:10" },
|
||||
{ 16.0f / 15.0f, "16:15" },
|
||||
{ 21.0f / 9.0f, "21:9" },
|
||||
{ 1.0f, "1:1" },
|
||||
{ 2.0f, "2:1" },
|
||||
{ 1.5f, "3:2" },
|
||||
{ 0.75f, "3:4" },
|
||||
{ 4.0f, "4:1" },
|
||||
{ 0.5625f, "9:16" },
|
||||
{ 1.25f, "5:4" },
|
||||
{ 1.2f, "6:5" },
|
||||
{ 0.7777f, "7:9" },
|
||||
{ 2.6666f, "8:3" },
|
||||
{ 1.1428f, "8:7" },
|
||||
{ 1.5833f, "19:12" },
|
||||
{ 1.3571f, "19:14" },
|
||||
{ 1.7647f, "30:17" },
|
||||
{ 3.5555f, "32:9" },
|
||||
{ 0.0f, "Config" },
|
||||
{ 1.0f, "Square pixel" },
|
||||
{ 1.0f, "Core provided" },
|
||||
{ 0.0f, "Custom" }
|
||||
};
|
||||
|
||||
static gfx_api_gpu_map gpu_map[] = {
|
||||
|
162
retroarch.h
162
retroarch.h
@ -210,10 +210,10 @@ struct rarch_main_wrap
|
||||
const char *state_path;
|
||||
const char *config_path;
|
||||
const char *libretro_path;
|
||||
int argc;
|
||||
bool verbose;
|
||||
bool no_content;
|
||||
bool touched;
|
||||
int argc;
|
||||
};
|
||||
|
||||
typedef struct rarch_resolution
|
||||
@ -296,10 +296,8 @@ typedef struct global
|
||||
|
||||
typedef struct content_state
|
||||
{
|
||||
bool is_inited;
|
||||
bool core_does_not_need_content;
|
||||
bool pending_subsystem_init;
|
||||
bool pending_rom_crc;
|
||||
char *pending_subsystem_roms[RARCH_MAX_SUBSYSTEM_ROMS];
|
||||
struct string_list *temporary_content;
|
||||
|
||||
int pending_subsystem_rom_num;
|
||||
int pending_subsystem_id;
|
||||
@ -310,9 +308,11 @@ typedef struct content_state
|
||||
char pending_subsystem_ident[255];
|
||||
char pending_rom_crc_path[PATH_MAX_LENGTH];
|
||||
char companion_ui_db_name[PATH_MAX_LENGTH];
|
||||
char *pending_subsystem_roms[RARCH_MAX_SUBSYSTEM_ROMS];
|
||||
|
||||
struct string_list *temporary_content;
|
||||
bool is_inited;
|
||||
bool core_does_not_need_content;
|
||||
bool pending_subsystem_init;
|
||||
bool pending_rom_crc;
|
||||
} content_state_t;
|
||||
|
||||
bool rarch_ctl(enum rarch_ctl_state state, void *data);
|
||||
@ -405,27 +405,27 @@ typedef struct audio_mixer_stream
|
||||
audio_mixer_sound_t *handle;
|
||||
audio_mixer_voice_t *voice;
|
||||
audio_mixer_stop_cb_t stop_cb;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
float volume;
|
||||
void *buf;
|
||||
char *name;
|
||||
size_t bufsize;
|
||||
float volume;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
} audio_mixer_stream_t;
|
||||
|
||||
typedef struct audio_mixer_stream_params
|
||||
{
|
||||
void *buf;
|
||||
char *basename;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
size_t bufsize;
|
||||
unsigned slot_selection_idx;
|
||||
float volume;
|
||||
enum audio_mixer_slot_selection_type slot_selection_type;
|
||||
unsigned slot_selection_idx;
|
||||
enum audio_mixer_stream_type stream_type;
|
||||
enum audio_mixer_type type;
|
||||
enum audio_mixer_state state;
|
||||
void *buf;
|
||||
char *basename;
|
||||
size_t bufsize;
|
||||
audio_mixer_stop_cb_t cb;
|
||||
} audio_mixer_stream_params_t;
|
||||
#endif
|
||||
|
||||
@ -654,6 +654,14 @@ struct record_params
|
||||
/* Sample rate of input audio. */
|
||||
double samplerate;
|
||||
|
||||
/* Filename to dump to. */
|
||||
const char *filename;
|
||||
|
||||
/* Path to config. Optional. */
|
||||
const char *config;
|
||||
|
||||
const char *audio_resampler;
|
||||
|
||||
/* Desired output resolution. */
|
||||
unsigned out_width;
|
||||
unsigned out_height;
|
||||
@ -662,32 +670,25 @@ struct record_params
|
||||
unsigned fb_width;
|
||||
unsigned fb_height;
|
||||
|
||||
/* Audio channels. */
|
||||
unsigned channels;
|
||||
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
unsigned video_record_threads;
|
||||
unsigned streaming_mode;
|
||||
|
||||
/* Aspect ratio of input video. Parameters are passed to the muxer,
|
||||
* the video itself is not scaled.
|
||||
*/
|
||||
float aspect_ratio;
|
||||
|
||||
/* Audio channels. */
|
||||
unsigned channels;
|
||||
|
||||
enum record_config_type preset;
|
||||
|
||||
/* Input pixel format. */
|
||||
enum ffemu_pix_format pix_fmt;
|
||||
|
||||
/* Filename to dump to. */
|
||||
const char *filename;
|
||||
|
||||
/* Path to config. Optional. */
|
||||
const char *config;
|
||||
|
||||
bool video_gpu_record;
|
||||
unsigned video_record_scale_factor;
|
||||
unsigned video_stream_scale_factor;
|
||||
unsigned video_record_threads;
|
||||
unsigned streaming_mode;
|
||||
|
||||
const char *audio_resampler;
|
||||
};
|
||||
|
||||
struct record_video_data
|
||||
@ -784,8 +785,8 @@ enum
|
||||
|
||||
struct LinkInfo
|
||||
{
|
||||
unsigned tex_w, tex_h;
|
||||
struct video_shader_pass *pass;
|
||||
unsigned tex_w, tex_h;
|
||||
};
|
||||
|
||||
enum gfx_ctx_api
|
||||
@ -852,12 +853,12 @@ enum shader_program_type
|
||||
|
||||
struct shader_program_info
|
||||
{
|
||||
bool is_file;
|
||||
void *data;
|
||||
const char *vertex;
|
||||
const char *fragment;
|
||||
const char *combined;
|
||||
unsigned idx;
|
||||
void *data;
|
||||
bool is_file;
|
||||
};
|
||||
|
||||
struct uniform_info
|
||||
@ -955,11 +956,11 @@ typedef struct shader_backend
|
||||
|
||||
typedef struct video_shader_ctx_init
|
||||
{
|
||||
enum rarch_shader_type shader_type;
|
||||
const char *path;
|
||||
const shader_backend_t *shader;
|
||||
void *data;
|
||||
void *shader_data;
|
||||
enum rarch_shader_type shader_type;
|
||||
struct
|
||||
{
|
||||
bool core_context_enabled;
|
||||
@ -968,6 +969,11 @@ typedef struct video_shader_ctx_init
|
||||
|
||||
typedef struct video_shader_ctx_params
|
||||
{
|
||||
void *data;
|
||||
const void *info;
|
||||
const void *prev_info;
|
||||
const void *feedback_info;
|
||||
const void *fbo_info;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned tex_width;
|
||||
@ -976,11 +982,6 @@ typedef struct video_shader_ctx_params
|
||||
unsigned out_height;
|
||||
unsigned frame_counter;
|
||||
unsigned fbo_info_cnt;
|
||||
void *data;
|
||||
const void *info;
|
||||
const void *prev_info;
|
||||
const void *feedback_info;
|
||||
const void *fbo_info;
|
||||
} video_shader_ctx_params_t;
|
||||
|
||||
typedef struct video_shader_ctx_coords
|
||||
@ -991,16 +992,16 @@ typedef struct video_shader_ctx_coords
|
||||
|
||||
typedef struct video_shader_ctx_scale
|
||||
{
|
||||
unsigned idx;
|
||||
struct gfx_fbo_scale *scale;
|
||||
unsigned idx;
|
||||
} video_shader_ctx_scale_t;
|
||||
|
||||
typedef struct video_shader_ctx_info
|
||||
{
|
||||
bool set_active;
|
||||
void *data;
|
||||
unsigned num;
|
||||
unsigned idx;
|
||||
void *data;
|
||||
bool set_active;
|
||||
} video_shader_ctx_info_t;
|
||||
|
||||
typedef struct video_shader_ctx_mvp
|
||||
@ -1011,8 +1012,8 @@ typedef struct video_shader_ctx_mvp
|
||||
|
||||
typedef struct video_shader_ctx_filter
|
||||
{
|
||||
unsigned index;
|
||||
bool *smooth;
|
||||
unsigned index;
|
||||
} video_shader_ctx_filter_t;
|
||||
|
||||
typedef struct video_shader_ctx
|
||||
@ -1029,17 +1030,12 @@ typedef void (*gfx_ctx_proc_t)(void);
|
||||
|
||||
typedef struct video_info
|
||||
{
|
||||
/* Launch in fullscreen mode instead of windowed mode. */
|
||||
bool fullscreen;
|
||||
const char *path_font;
|
||||
|
||||
/* Start with V-Sync enabled. */
|
||||
bool vsync;
|
||||
uintptr_t parent;
|
||||
|
||||
/* If true, the output image should have the aspect ratio
|
||||
* as set in aspect_ratio. */
|
||||
bool force_aspect;
|
||||
int swap_interval;
|
||||
|
||||
bool font_enable;
|
||||
|
||||
/* Width of window.
|
||||
* If fullscreen mode is requested,
|
||||
@ -1053,7 +1049,29 @@ typedef struct video_info
|
||||
*/
|
||||
unsigned height;
|
||||
|
||||
int swap_interval;
|
||||
#ifdef GEKKO
|
||||
/* TODO - we can't really have driver system-specific
|
||||
* variables in here. There should be some
|
||||
* kind of publicly accessible driver implementation
|
||||
* video struct for specific things like this.
|
||||
*/
|
||||
|
||||
/* Wii-specific settings. Ignored for everything else. */
|
||||
unsigned viwidth;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* input_scale defines the maximum size of the picture that will
|
||||
* ever be used with the frame callback.
|
||||
*
|
||||
* The maximum resolution is a multiple of 256x256 size (RARCH_SCALE_BASE),
|
||||
* so an input scale of 2 means you should allocate a texture or of 512x512.
|
||||
*
|
||||
* Maximum input size: RARCH_SCALE_BASE * input_scale
|
||||
*/
|
||||
unsigned input_scale;
|
||||
|
||||
float font_size;
|
||||
|
||||
bool adaptive_vsync;
|
||||
|
||||
@ -1079,33 +1097,17 @@ typedef struct video_info
|
||||
* */
|
||||
bool rgb32;
|
||||
|
||||
#ifdef GEKKO
|
||||
/* TODO - we can't really have driver system-specific
|
||||
* variables in here. There should be some
|
||||
* kind of publicly accessible driver implementation
|
||||
* video struct for specific things like this.
|
||||
*/
|
||||
/* Launch in fullscreen mode instead of windowed mode. */
|
||||
bool fullscreen;
|
||||
|
||||
/* Wii-specific settings. Ignored for everything else. */
|
||||
unsigned viwidth;
|
||||
#endif
|
||||
/* Start with V-Sync enabled. */
|
||||
bool vsync;
|
||||
|
||||
/*
|
||||
* input_scale defines the maximum size of the picture that will
|
||||
* ever be used with the frame callback.
|
||||
*
|
||||
* The maximum resolution is a multiple of 256x256 size (RARCH_SCALE_BASE),
|
||||
* so an input scale of 2 means you should allocate a texture or of 512x512.
|
||||
*
|
||||
* Maximum input size: RARCH_SCALE_BASE * input_scale
|
||||
*/
|
||||
unsigned input_scale;
|
||||
/* If true, the output image should have the aspect ratio
|
||||
* as set in aspect_ratio. */
|
||||
bool force_aspect;
|
||||
|
||||
const char *path_font;
|
||||
|
||||
float font_size;
|
||||
|
||||
uintptr_t parent;
|
||||
bool font_enable;
|
||||
} video_info_t;
|
||||
|
||||
typedef struct video_frame_info
|
||||
@ -1336,8 +1338,8 @@ typedef struct gfx_ctx_mode
|
||||
|
||||
typedef struct gfx_ctx_metrics
|
||||
{
|
||||
enum display_metric_types type;
|
||||
float *value;
|
||||
enum display_metric_types type;
|
||||
} gfx_ctx_metrics_t;
|
||||
|
||||
typedef struct gfx_ctx_aspect
|
||||
@ -1350,12 +1352,12 @@ typedef struct gfx_ctx_aspect
|
||||
typedef struct gfx_ctx_image
|
||||
{
|
||||
const void *frame;
|
||||
void **handle;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
unsigned pitch;
|
||||
unsigned index;
|
||||
bool rgb32;
|
||||
void **handle;
|
||||
} gfx_ctx_image_t;
|
||||
|
||||
typedef struct gfx_ctx_input
|
||||
@ -1371,8 +1373,8 @@ typedef struct gfx_ctx_ident
|
||||
|
||||
struct aspect_ratio_elem
|
||||
{
|
||||
char name[64];
|
||||
float value;
|
||||
char name[64];
|
||||
};
|
||||
|
||||
/* Optionally implemented interface to poke more
|
||||
|
Loading…
x
Reference in New Issue
Block a user