mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-21 12:01:53 +00:00
Move settings struct definition to settings.h
This commit is contained in:
parent
b1491e2a5b
commit
509c2d9be4
278
general.h
278
general.h
@ -31,7 +31,7 @@
|
||||
#include "core_options.h"
|
||||
#include "core_info.h"
|
||||
#include "gfx/video_viewport.h"
|
||||
|
||||
#include "settings.h"
|
||||
#include "playlist.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -116,281 +116,6 @@ struct defaults
|
||||
content_playlist_t *history;
|
||||
};
|
||||
|
||||
/* All config related settings go here. */
|
||||
|
||||
struct settings
|
||||
{
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char context_driver[32];
|
||||
float scale;
|
||||
bool fullscreen;
|
||||
bool windowed_fullscreen;
|
||||
unsigned monitor_index;
|
||||
unsigned fullscreen_x;
|
||||
unsigned fullscreen_y;
|
||||
bool vsync;
|
||||
bool hard_sync;
|
||||
bool black_frame_insertion;
|
||||
unsigned swap_interval;
|
||||
unsigned hard_sync_frames;
|
||||
unsigned frame_delay;
|
||||
#ifdef GEKKO
|
||||
unsigned viwidth;
|
||||
bool vfilter;
|
||||
#endif
|
||||
bool smooth;
|
||||
bool force_aspect;
|
||||
bool crop_overscan;
|
||||
float aspect_ratio;
|
||||
bool aspect_ratio_auto;
|
||||
bool scale_integer;
|
||||
unsigned aspect_ratio_idx;
|
||||
unsigned rotation;
|
||||
|
||||
char shader_path[PATH_MAX_LENGTH];
|
||||
bool shader_enable;
|
||||
|
||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
char shader_dir[PATH_MAX_LENGTH];
|
||||
|
||||
char font_path[PATH_MAX_LENGTH];
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
float msg_pos_x;
|
||||
float msg_pos_y;
|
||||
float msg_color_r;
|
||||
float msg_color_g;
|
||||
float msg_color_b;
|
||||
|
||||
bool disable_composition;
|
||||
|
||||
bool post_filter_record;
|
||||
bool gpu_record;
|
||||
bool gpu_screenshot;
|
||||
|
||||
bool allow_rotate;
|
||||
bool shared_context;
|
||||
bool force_srgb_disable;
|
||||
} video;
|
||||
|
||||
struct
|
||||
{
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
} ui;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool pause_libretro;
|
||||
bool timedate_enable;
|
||||
bool core_enable;
|
||||
bool throttle;
|
||||
char wallpaper[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
} mouse;
|
||||
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool horizontal_enable;
|
||||
bool vertical_enable;
|
||||
} wraparound;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool supported_extensions_enable;
|
||||
} filter;
|
||||
} browser;
|
||||
} navigation;
|
||||
bool collapse_subgroups_enable;
|
||||
bool show_advanced_settings;
|
||||
#ifdef HAVE_THREADS
|
||||
bool threaded_data_runloop_enable;
|
||||
#endif
|
||||
|
||||
unsigned entry_normal_color;
|
||||
unsigned entry_hover_color;
|
||||
unsigned title_color;
|
||||
} menu;
|
||||
#endif
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char device[PATH_MAX_LENGTH];
|
||||
bool allow;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
} camera;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool allow;
|
||||
int update_interval_ms;
|
||||
int update_interval_distance;
|
||||
} location;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool enable;
|
||||
bool mute_enable;
|
||||
unsigned out_rate;
|
||||
unsigned block_frames;
|
||||
char device[PATH_MAX_LENGTH];
|
||||
unsigned latency;
|
||||
bool sync;
|
||||
|
||||
char dsp_plugin[PATH_MAX_LENGTH];
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
|
||||
bool rate_control;
|
||||
float rate_control_delta;
|
||||
float max_timing_skew;
|
||||
float volume; /* dB scale. */
|
||||
char resampler[32];
|
||||
} audio;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char joypad_driver[32];
|
||||
char keyboard_layout[64];
|
||||
|
||||
unsigned remap_ids[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
|
||||
unsigned max_users;
|
||||
|
||||
/* Set by autoconfiguration in joypad_autoconfig_dir.
|
||||
* Does not override main binds. */
|
||||
bool autoconfigured[MAX_USERS];
|
||||
|
||||
unsigned libretro_device[MAX_USERS];
|
||||
unsigned analog_dpad_mode[MAX_USERS];
|
||||
|
||||
bool remap_binds_enable;
|
||||
float axis_threshold;
|
||||
unsigned joypad_map[MAX_USERS];
|
||||
unsigned device[MAX_USERS];
|
||||
char device_names[MAX_USERS][64];
|
||||
bool autodetect_enable;
|
||||
bool netplay_client_swap_input;
|
||||
|
||||
unsigned turbo_period;
|
||||
unsigned turbo_duty_cycle;
|
||||
|
||||
bool overlay_enable;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float overlay_opacity;
|
||||
float overlay_scale;
|
||||
|
||||
char autoconfig_dir[PATH_MAX_LENGTH];
|
||||
bool autoconfig_descriptor_label_show;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
|
||||
char remapping_path[PATH_MAX_LENGTH];
|
||||
} input;
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float opacity;
|
||||
float scale;
|
||||
} osk;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned mode;
|
||||
} archive;
|
||||
|
||||
struct
|
||||
{
|
||||
char buildbot_url[PATH_MAX_LENGTH];
|
||||
char buildbot_assets_url[PATH_MAX_LENGTH];
|
||||
bool buildbot_auto_extract_archive;
|
||||
} network;
|
||||
|
||||
int state_slot;
|
||||
|
||||
char core_options_path[PATH_MAX_LENGTH];
|
||||
char content_history_path[PATH_MAX_LENGTH];
|
||||
char content_history_directory[PATH_MAX_LENGTH];
|
||||
unsigned content_history_size;
|
||||
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
char libretro_directory[PATH_MAX_LENGTH];
|
||||
unsigned libretro_log_level;
|
||||
char libretro_info_path[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char cursor_directory[PATH_MAX_LENGTH];
|
||||
char cheat_settings_path[PATH_MAX_LENGTH];
|
||||
char input_remapping_directory[PATH_MAX_LENGTH];
|
||||
|
||||
char resampler_directory[PATH_MAX_LENGTH];
|
||||
char screenshot_directory[PATH_MAX_LENGTH];
|
||||
char system_directory[PATH_MAX_LENGTH];
|
||||
|
||||
char extraction_directory[PATH_MAX_LENGTH];
|
||||
char playlist_directory[PATH_MAX_LENGTH];
|
||||
|
||||
bool history_list_enable;
|
||||
bool rewind_enable;
|
||||
size_t rewind_buffer_size;
|
||||
unsigned rewind_granularity;
|
||||
|
||||
float slowmotion_ratio;
|
||||
float fastforward_ratio;
|
||||
bool fastforward_ratio_throttle_enable;
|
||||
|
||||
bool pause_nonactive;
|
||||
unsigned autosave_interval;
|
||||
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
|
||||
bool network_cmd_enable;
|
||||
uint16_t network_cmd_port;
|
||||
bool stdin_cmd_enable;
|
||||
|
||||
char core_assets_directory[PATH_MAX_LENGTH];
|
||||
char assets_directory[PATH_MAX_LENGTH];
|
||||
char menu_config_directory[PATH_MAX_LENGTH];
|
||||
#if defined(HAVE_MENU)
|
||||
char menu_content_directory[PATH_MAX_LENGTH];
|
||||
bool menu_show_start_screen;
|
||||
#endif
|
||||
bool fps_show;
|
||||
bool load_dummy_on_core_shutdown;
|
||||
|
||||
bool core_specific_config;
|
||||
|
||||
char username[32];
|
||||
unsigned int user_language;
|
||||
|
||||
bool config_save_on_exit;
|
||||
};
|
||||
|
||||
typedef struct rarch_resolution
|
||||
{
|
||||
unsigned idx;
|
||||
@ -719,7 +444,6 @@ struct global
|
||||
};
|
||||
|
||||
/* Public data structures. */
|
||||
extern struct settings g_settings;
|
||||
extern struct global g_extern;
|
||||
extern struct defaults g_defaults;
|
||||
|
||||
|
278
settings.h
278
settings.h
@ -21,6 +21,281 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* All config related settings go here. */
|
||||
|
||||
struct settings
|
||||
{
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char context_driver[32];
|
||||
float scale;
|
||||
bool fullscreen;
|
||||
bool windowed_fullscreen;
|
||||
unsigned monitor_index;
|
||||
unsigned fullscreen_x;
|
||||
unsigned fullscreen_y;
|
||||
bool vsync;
|
||||
bool hard_sync;
|
||||
bool black_frame_insertion;
|
||||
unsigned swap_interval;
|
||||
unsigned hard_sync_frames;
|
||||
unsigned frame_delay;
|
||||
#ifdef GEKKO
|
||||
unsigned viwidth;
|
||||
bool vfilter;
|
||||
#endif
|
||||
bool smooth;
|
||||
bool force_aspect;
|
||||
bool crop_overscan;
|
||||
float aspect_ratio;
|
||||
bool aspect_ratio_auto;
|
||||
bool scale_integer;
|
||||
unsigned aspect_ratio_idx;
|
||||
unsigned rotation;
|
||||
|
||||
char shader_path[PATH_MAX_LENGTH];
|
||||
bool shader_enable;
|
||||
|
||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||
float refresh_rate;
|
||||
bool threaded;
|
||||
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
char shader_dir[PATH_MAX_LENGTH];
|
||||
|
||||
char font_path[PATH_MAX_LENGTH];
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
float msg_pos_x;
|
||||
float msg_pos_y;
|
||||
float msg_color_r;
|
||||
float msg_color_g;
|
||||
float msg_color_b;
|
||||
|
||||
bool disable_composition;
|
||||
|
||||
bool post_filter_record;
|
||||
bool gpu_record;
|
||||
bool gpu_screenshot;
|
||||
|
||||
bool allow_rotate;
|
||||
bool shared_context;
|
||||
bool force_srgb_disable;
|
||||
} video;
|
||||
|
||||
struct
|
||||
{
|
||||
bool menubar_enable;
|
||||
bool suspend_screensaver_enable;
|
||||
} ui;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool pause_libretro;
|
||||
bool timedate_enable;
|
||||
bool core_enable;
|
||||
bool throttle;
|
||||
char wallpaper[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
} mouse;
|
||||
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool horizontal_enable;
|
||||
bool vertical_enable;
|
||||
} wraparound;
|
||||
struct
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool supported_extensions_enable;
|
||||
} filter;
|
||||
} browser;
|
||||
} navigation;
|
||||
bool collapse_subgroups_enable;
|
||||
bool show_advanced_settings;
|
||||
#ifdef HAVE_THREADS
|
||||
bool threaded_data_runloop_enable;
|
||||
#endif
|
||||
|
||||
unsigned entry_normal_color;
|
||||
unsigned entry_hover_color;
|
||||
unsigned title_color;
|
||||
} menu;
|
||||
#endif
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char device[PATH_MAX_LENGTH];
|
||||
bool allow;
|
||||
unsigned width;
|
||||
unsigned height;
|
||||
} camera;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool allow;
|
||||
int update_interval_ms;
|
||||
int update_interval_distance;
|
||||
} location;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
bool enable;
|
||||
bool mute_enable;
|
||||
unsigned out_rate;
|
||||
unsigned block_frames;
|
||||
char device[PATH_MAX_LENGTH];
|
||||
unsigned latency;
|
||||
bool sync;
|
||||
|
||||
char dsp_plugin[PATH_MAX_LENGTH];
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
|
||||
bool rate_control;
|
||||
float rate_control_delta;
|
||||
float max_timing_skew;
|
||||
float volume; /* dB scale. */
|
||||
char resampler[32];
|
||||
} audio;
|
||||
|
||||
struct
|
||||
{
|
||||
char driver[32];
|
||||
char joypad_driver[32];
|
||||
char keyboard_layout[64];
|
||||
|
||||
unsigned remap_ids[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
struct retro_keybind autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
|
||||
unsigned max_users;
|
||||
|
||||
/* Set by autoconfiguration in joypad_autoconfig_dir.
|
||||
* Does not override main binds. */
|
||||
bool autoconfigured[MAX_USERS];
|
||||
|
||||
unsigned libretro_device[MAX_USERS];
|
||||
unsigned analog_dpad_mode[MAX_USERS];
|
||||
|
||||
bool remap_binds_enable;
|
||||
float axis_threshold;
|
||||
unsigned joypad_map[MAX_USERS];
|
||||
unsigned device[MAX_USERS];
|
||||
char device_names[MAX_USERS][64];
|
||||
bool autodetect_enable;
|
||||
bool netplay_client_swap_input;
|
||||
|
||||
unsigned turbo_period;
|
||||
unsigned turbo_duty_cycle;
|
||||
|
||||
bool overlay_enable;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float overlay_opacity;
|
||||
float overlay_scale;
|
||||
|
||||
char autoconfig_dir[PATH_MAX_LENGTH];
|
||||
bool autoconfig_descriptor_label_show;
|
||||
bool input_descriptor_label_show;
|
||||
bool input_descriptor_hide_unbound;
|
||||
|
||||
char remapping_path[PATH_MAX_LENGTH];
|
||||
} input;
|
||||
|
||||
struct
|
||||
{
|
||||
bool enable;
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
float opacity;
|
||||
float scale;
|
||||
} osk;
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned mode;
|
||||
} archive;
|
||||
|
||||
struct
|
||||
{
|
||||
char buildbot_url[PATH_MAX_LENGTH];
|
||||
char buildbot_assets_url[PATH_MAX_LENGTH];
|
||||
bool buildbot_auto_extract_archive;
|
||||
} network;
|
||||
|
||||
int state_slot;
|
||||
|
||||
char core_options_path[PATH_MAX_LENGTH];
|
||||
char content_history_path[PATH_MAX_LENGTH];
|
||||
char content_history_directory[PATH_MAX_LENGTH];
|
||||
unsigned content_history_size;
|
||||
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
char libretro_directory[PATH_MAX_LENGTH];
|
||||
unsigned libretro_log_level;
|
||||
char libretro_info_path[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char cursor_directory[PATH_MAX_LENGTH];
|
||||
char cheat_settings_path[PATH_MAX_LENGTH];
|
||||
char input_remapping_directory[PATH_MAX_LENGTH];
|
||||
|
||||
char resampler_directory[PATH_MAX_LENGTH];
|
||||
char screenshot_directory[PATH_MAX_LENGTH];
|
||||
char system_directory[PATH_MAX_LENGTH];
|
||||
|
||||
char extraction_directory[PATH_MAX_LENGTH];
|
||||
char playlist_directory[PATH_MAX_LENGTH];
|
||||
|
||||
bool history_list_enable;
|
||||
bool rewind_enable;
|
||||
size_t rewind_buffer_size;
|
||||
unsigned rewind_granularity;
|
||||
|
||||
float slowmotion_ratio;
|
||||
float fastforward_ratio;
|
||||
bool fastforward_ratio_throttle_enable;
|
||||
|
||||
bool pause_nonactive;
|
||||
unsigned autosave_interval;
|
||||
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
|
||||
bool network_cmd_enable;
|
||||
uint16_t network_cmd_port;
|
||||
bool stdin_cmd_enable;
|
||||
|
||||
char core_assets_directory[PATH_MAX_LENGTH];
|
||||
char assets_directory[PATH_MAX_LENGTH];
|
||||
char menu_config_directory[PATH_MAX_LENGTH];
|
||||
#if defined(HAVE_MENU)
|
||||
char menu_content_directory[PATH_MAX_LENGTH];
|
||||
bool menu_show_start_screen;
|
||||
#endif
|
||||
bool fps_show;
|
||||
bool load_dummy_on_core_shutdown;
|
||||
|
||||
bool core_specific_config;
|
||||
|
||||
char username[32];
|
||||
unsigned int user_language;
|
||||
|
||||
bool config_save_on_exit;
|
||||
};
|
||||
|
||||
/**
|
||||
* config_get_default_camera:
|
||||
*
|
||||
@ -132,6 +407,9 @@ bool config_save_keybinds_file(const char *path);
|
||||
**/
|
||||
bool config_save_file(const char *path);
|
||||
|
||||
/* Public data structures. */
|
||||
extern struct settings g_settings;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user