RetroArch/configuration.h

908 lines
26 KiB
C
Raw Normal View History

2015-01-09 15:56:21 +00:00
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
2016-01-10 03:06:50 +00:00
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2014-2016 - Jean-André Santoni
2019-01-09 22:19:19 +00:00
* Copyright (C) 2016-2019 - Brad Parker
*
2015-01-09 15:56:21 +00:00
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __RARCH_CONFIGURATION_H__
#define __RARCH_CONFIGURATION_H__
2015-01-09 15:56:21 +00:00
2015-03-21 06:05:08 +00:00
#include <stdint.h>
2015-12-05 06:45:36 +00:00
2015-12-06 12:12:27 +00:00
#include <boolean.h>
#include <retro_common_api.h>
2017-04-29 11:20:50 +00:00
#include <retro_miscellaneous.h>
2015-12-05 06:45:36 +00:00
2019-01-31 19:43:07 +00:00
#include "gfx/video_defines.h"
2016-09-05 15:29:19 +00:00
#include "input/input_defines.h"
#include "led/led_defines.h"
2015-03-21 06:05:08 +00:00
2017-09-27 22:03:50 +00:00
#define configuration_set_float(settings, var, newvar) \
2017-12-03 02:43:05 +00:00
{ \
2017-09-27 22:03:50 +00:00
settings->modified = true; \
2017-12-03 02:43:05 +00:00
var = newvar; \
}
2017-09-27 22:03:50 +00:00
#define configuration_set_bool(settings, var, newvar) \
2017-12-03 02:43:05 +00:00
{ \
2017-09-27 22:03:50 +00:00
settings->modified = true; \
2017-12-03 02:43:05 +00:00
var = newvar; \
}
2017-09-27 22:03:50 +00:00
#define configuration_set_uint(settings, var, newvar) \
2017-12-03 02:43:05 +00:00
{ \
2017-09-27 22:03:50 +00:00
settings->modified = true; \
2017-12-03 02:43:05 +00:00
var = newvar; \
}
2017-09-27 22:03:50 +00:00
#define configuration_set_int(settings, var, newvar) \
2017-12-03 02:43:05 +00:00
{ \
2017-09-27 22:03:50 +00:00
settings->modified = true; \
2017-12-03 02:43:05 +00:00
var = newvar; \
}
2017-09-27 22:03:50 +00:00
#define configuration_set_string(settings, var, newvar) \
{ \
settings->modified = true; \
strlcpy(var, newvar, sizeof(var)); \
}
enum crt_switch_type
{
CRT_SWITCH_NONE = 0,
CRT_SWITCH_15KHZ,
CRT_SWITCH_31KHZ
};
2016-08-31 13:21:12 +00:00
enum override_type
{
OVERRIDE_NONE = 0,
OVERRIDE_CORE,
2018-05-13 21:20:51 +00:00
OVERRIDE_CONTENT_DIR,
2016-08-31 13:21:12 +00:00
OVERRIDE_GAME
};
2016-08-26 05:44:05 +00:00
RETRO_BEGIN_DECLS
2015-01-09 15:56:21 +00:00
2015-03-20 18:32:46 +00:00
typedef struct settings
{
2017-04-27 22:00:43 +00:00
struct
{
bool placeholder;
2017-04-27 22:53:06 +00:00
2017-04-28 11:43:47 +00:00
/* Video */
2017-04-27 22:53:06 +00:00
bool video_fullscreen;
bool video_windowed_fullscreen;
bool video_vsync;
bool video_adaptive_vsync;
2017-04-27 22:53:06 +00:00
bool video_hard_sync;
bool video_black_frame_insertion;
bool video_vfilter;
bool video_smooth;
bool video_ctx_scaling;
2017-04-27 22:53:06 +00:00
bool video_force_aspect;
bool video_crop_overscan;
bool video_aspect_ratio_auto;
bool video_scale_integer;
bool video_shader_enable;
bool video_shader_watch_files;
2017-04-27 22:53:06 +00:00
bool video_threaded;
bool video_font_enable;
bool video_disable_composition;
bool video_post_filter_record;
bool video_gpu_record;
bool video_gpu_screenshot;
bool video_allow_rotate;
bool video_shared_context;
bool video_force_srgb_disable;
2017-04-28 10:26:01 +00:00
bool video_fps_show;
bool video_statistics_show;
bool video_framecount_show;
bool video_memory_show;
bool video_msg_bgcolor_enable;
bool video_3ds_lcd_bottom;
2019-04-16 16:41:06 +00:00
#ifdef HAVE_VIDEO_LAYOUT
bool video_layout_enable;
#endif
2017-04-27 22:53:06 +00:00
/* Accessibility */
bool accessibility_enable;
2017-04-28 11:43:47 +00:00
/* Audio */
2017-04-28 10:23:59 +00:00
bool audio_enable;
2018-04-28 22:41:53 +00:00
bool audio_enable_menu;
2019-01-27 16:22:16 +00:00
bool audio_enable_menu_ok;
bool audio_enable_menu_cancel;
bool audio_enable_menu_notice;
bool audio_enable_menu_bgm;
2017-04-28 10:23:59 +00:00
bool audio_sync;
bool audio_rate_control;
bool audio_wasapi_exclusive_mode;
bool audio_wasapi_float_format;
2017-04-28 11:43:47 +00:00
/* Input */
bool input_remap_binds_enable;
bool input_autodetect_enable;
bool input_overlay_enable;
bool input_overlay_enable_autopreferred;
bool input_overlay_hide_in_menu;
bool input_overlay_show_physical_inputs;
bool input_overlay_show_mouse_cursor;
bool input_overlay_auto_rotate;
2017-04-28 11:43:47 +00:00
bool input_descriptor_label_show;
bool input_descriptor_hide_unbound;
bool input_all_users_control_menu;
bool input_menu_swap_ok_cancel_buttons;
bool input_backtouch_enable;
bool input_backtouch_toggle;
bool input_small_keyboard_enable;
bool input_keyboard_gamepad_enable;
2019-08-24 16:18:24 +00:00
/* Frame time counter */
bool frame_time_counter_reset_after_fastforwarding;
bool frame_time_counter_reset_after_load_state;
bool frame_time_counter_reset_after_save_state;
2017-04-28 11:43:47 +00:00
/* Menu */
2017-05-31 22:25:13 +00:00
bool filter_by_current_core;
bool menu_enable_widgets;
bool menu_widget_scale_auto;
2017-04-28 11:43:47 +00:00
bool menu_show_start_screen;
bool menu_pause_libretro;
bool menu_savestate_resume;
2020-01-14 12:28:10 +00:00
bool menu_insert_disk_resume;
2017-04-28 11:43:47 +00:00
bool menu_timedate_enable;
bool menu_battery_level_enable;
bool menu_core_enable;
2019-02-11 14:38:10 +00:00
bool menu_show_sublabels;
2017-04-28 11:43:47 +00:00
bool menu_dynamic_wallpaper_enable;
bool menu_throttle;
bool menu_mouse_enable;
bool menu_pointer_enable;
bool menu_navigation_wraparound_enable;
bool menu_navigation_browser_filter_supported_extensions_enable;
bool menu_show_advanced_settings;
bool menu_throttle_framerate;
bool menu_linear_filter;
2017-07-14 19:11:27 +00:00
bool menu_horizontal_animation;
bool menu_scroll_fast;
2017-06-19 23:42:28 +00:00
bool menu_show_online_updater;
2017-06-20 00:22:07 +00:00
bool menu_show_core_updater;
bool menu_show_load_core;
bool menu_show_load_content;
2019-07-21 10:16:16 +00:00
bool menu_show_load_disc;
bool menu_show_dump_disc;
bool menu_show_information;
bool menu_show_configurations;
bool menu_show_help;
bool menu_show_quit_retroarch;
bool menu_show_restart_retroarch;
bool menu_show_reboot;
bool menu_show_shutdown;
bool menu_show_latency;
bool menu_show_rewind;
bool menu_show_overlays;
bool menu_show_legacy_thumbnail_updater;
2019-04-16 16:41:06 +00:00
#ifdef HAVE_VIDEO_LAYOUT
bool menu_show_video_layout;
#endif
bool menu_materialui_icons_enable;
bool menu_materialui_show_nav_bar;
bool menu_materialui_auto_rotate_nav_bar;
2019-11-08 16:25:36 +00:00
bool menu_materialui_dual_thumbnail_list_view_enable;
2019-11-11 16:11:32 +00:00
bool menu_materialui_thumbnail_background_enable;
bool menu_rgui_background_filler_thickness_enable;
bool menu_rgui_border_filler_thickness_enable;
2018-04-24 14:01:51 +00:00
bool menu_rgui_border_filler_enable;
2019-02-25 12:24:59 +00:00
bool menu_rgui_full_width_layout;
2019-04-01 12:52:10 +00:00
bool menu_rgui_shadows;
bool menu_rgui_inline_thumbnails;
bool menu_rgui_swap_thumbnails;
bool menu_rgui_extended_ascii;
2017-04-28 11:43:47 +00:00
bool menu_xmb_shadows_enable;
2018-04-04 22:52:46 +00:00
bool menu_xmb_vertical_thumbnails;
bool menu_content_show_settings;
bool menu_content_show_favorites;
bool menu_content_show_images;
bool menu_content_show_music;
bool menu_content_show_video;
bool menu_content_show_netplay;
bool menu_content_show_history;
bool menu_content_show_add;
2018-04-17 15:53:24 +00:00
bool menu_content_show_playlists;
bool menu_use_preferred_system_color_theme;
bool menu_preferred_system_color_theme_set;
2017-04-28 11:43:47 +00:00
bool menu_unified_controls;
bool menu_ticker_smooth;
bool settings_show_drivers;
bool settings_show_video;
bool settings_show_audio;
2019-08-20 22:27:40 +00:00
bool settings_show_input;
bool settings_show_latency;
bool settings_show_core;
bool settings_show_configuration;
bool settings_show_saving;
bool settings_show_logging;
bool settings_show_frame_throttle;
bool settings_show_recording;
bool settings_show_onscreen_display;
bool settings_show_user_interface;
bool settings_show_ai_service;
bool settings_show_power_management;
bool settings_show_achievements;
bool settings_show_network;
bool settings_show_playlists;
bool settings_show_user;
bool settings_show_directory;
bool quick_menu_show_resume_content;
bool quick_menu_show_restart_content;
bool quick_menu_show_close_content;
bool quick_menu_show_take_screenshot;
bool quick_menu_show_save_load_state;
bool quick_menu_show_undo_save_load_state;
bool quick_menu_show_add_to_favorites;
bool quick_menu_show_start_recording;
bool quick_menu_show_start_streaming;
bool quick_menu_show_set_core_association;
bool quick_menu_show_reset_core_association;
bool quick_menu_show_options;
bool quick_menu_show_controls;
bool quick_menu_show_cheats;
bool quick_menu_show_shaders;
bool quick_menu_show_save_core_overrides;
bool quick_menu_show_save_game_overrides;
2018-05-13 21:20:51 +00:00
bool quick_menu_show_save_content_dir_overrides;
bool quick_menu_show_information;
bool quick_menu_show_recording;
bool quick_menu_show_streaming;
bool quick_menu_show_download_thumbnails;
bool kiosk_mode_enable;
2017-04-28 11:43:47 +00:00
2018-09-16 23:56:18 +00:00
bool crt_switch_custom_refresh_enable;
2017-04-28 11:43:47 +00:00
/* Netplay */
bool netplay_public_announce;
bool netplay_start_as_spectator;
bool netplay_allow_slaves;
bool netplay_require_slaves;
bool netplay_stateless_mode;
bool netplay_nat_traversal;
bool netplay_use_mitm_server;
bool netplay_request_devices[MAX_USERS];
2017-04-28 11:43:47 +00:00
/* Network */
bool network_buildbot_auto_extract_archive;
bool network_on_demand_thumbnails;
2017-04-28 11:43:47 +00:00
/* UI */
2017-04-27 22:53:06 +00:00
bool ui_menubar_enable;
bool ui_suspend_screensaver_enable;
bool ui_companion_start_on_boot;
bool ui_companion_enable;
2018-04-30 18:33:05 +00:00
bool ui_companion_toggle;
bool desktop_menu_enable;
2017-04-28 11:43:47 +00:00
/* Cheevos */
bool cheevos_enable;
bool cheevos_test_unofficial;
bool cheevos_hardcore_mode_enable;
2017-10-31 05:58:35 +00:00
bool cheevos_leaderboards_enable;
bool cheevos_richpresence_enable;
2017-11-23 16:55:53 +00:00
bool cheevos_badges_enable;
bool cheevos_verbose_enable;
2018-03-14 07:49:48 +00:00
bool cheevos_auto_screenshot;
2017-04-28 11:43:47 +00:00
/* Camera */
bool camera_allow;
/* WiFi */
bool wifi_allow;
/* Location */
bool location_allow;
/* Multimedia */
bool multimedia_builtin_mediaplayer_enable;
bool multimedia_builtin_imageviewer_enable;
/* Bundle */
bool bundle_finished;
bool bundle_assets_extract_enable;
/* Driver */
bool driver_switch_enable;
2017-04-28 11:43:47 +00:00
/* Misc. */
2018-05-29 10:18:01 +00:00
bool discord_enable;
2017-04-28 11:43:47 +00:00
bool threaded_data_runloop_enable;
bool set_supports_no_game_enable;
bool auto_screenshot_filename;
bool history_list_enable;
bool playlist_entry_rename;
2017-04-28 11:43:47 +00:00
bool rewind_enable;
2018-08-04 22:34:10 +00:00
bool vrr_runloop_enable;
bool apply_cheats_after_toggle;
bool apply_cheats_after_load;
2018-03-28 19:22:07 +00:00
bool run_ahead_enabled;
bool run_ahead_secondary_instance;
bool run_ahead_hide_warnings;
2017-04-28 11:43:47 +00:00
bool pause_nonactive;
bool block_sram_overwrite;
bool savestate_auto_index;
bool savestate_auto_save;
bool savestate_auto_load;
bool savestate_thumbnail_enable;
bool save_file_compression;
2020-04-15 14:48:41 +00:00
bool savestate_file_compression;
2017-04-28 11:43:47 +00:00
bool network_cmd_enable;
bool stdin_cmd_enable;
2017-09-10 16:57:07 +00:00
bool keymapper_enable;
2017-04-28 11:43:47 +00:00
bool network_remote_enable;
bool network_remote_enable_user[MAX_USERS];
bool load_dummy_on_core_shutdown;
bool check_firmware_before_loading;
bool game_specific_options;
bool auto_overrides_enable;
bool auto_remaps_enable;
bool global_core_options;
2017-04-28 11:43:47 +00:00
bool auto_shaders_enable;
bool sort_savefiles_enable;
bool sort_savestates_enable;
bool config_save_on_exit;
bool show_hidden_files;
2017-08-05 17:31:58 +00:00
bool savefiles_in_content_dir;
bool savestates_in_content_dir;
bool screenshots_in_content_dir;
bool systemfiles_in_content_dir;
2017-04-28 11:43:47 +00:00
bool ssh_enable;
bool samba_enable;
bool bluetooth_enable;
bool localap_enable;
bool video_window_show_decorations;
bool video_window_save_positions;
bool sustained_performance_mode;
2019-01-09 22:13:13 +00:00
bool playlist_use_old_format;
2020-04-21 15:44:26 +00:00
bool playlist_compression;
bool content_runtime_log;
bool content_runtime_log_aggregate;
bool playlist_sort_alphabetical;
bool playlist_show_sublabels;
bool playlist_fuzzy_archive_match;
2019-02-25 18:12:50 +00:00
bool quit_press_twice;
bool vibrate_on_keypress;
bool enable_device_vibration;
bool ozone_collapse_sidebar;
bool ozone_truncate_playlist_name;
bool ozone_scroll_content_metadata;
2019-03-05 22:34:05 +00:00
bool log_to_file;
bool log_to_file_timestamp;
2019-05-05 19:54:49 +00:00
bool scan_without_core_match;
bool ai_service_enable;
2019-10-19 18:53:17 +00:00
bool ai_service_pause;
2017-04-27 22:00:43 +00:00
} bools;
2017-04-28 12:57:55 +00:00
struct
{
float placeholder;
float video_scale;
float video_aspect_ratio;
float video_refresh_rate;
2018-09-16 23:56:18 +00:00
float crt_video_refresh_rate;
2017-04-28 12:57:55 +00:00
float video_font_size;
float video_msg_pos_x;
float video_msg_pos_y;
float video_msg_color_r;
float video_msg_color_g;
float video_msg_color_b;
float video_msg_bgcolor_opacity;
2017-04-28 12:57:55 +00:00
2019-10-09 10:33:02 +00:00
float menu_scale_factor;
float menu_widget_scale_factor;
float menu_widget_scale_factor_windowed;
2017-04-28 12:57:55 +00:00
float menu_wallpaper_opacity;
float menu_framebuffer_opacity;
2017-04-28 12:57:55 +00:00
float menu_footer_opacity;
float menu_header_opacity;
float menu_ticker_speed;
float menu_rgui_particle_effect_speed;
2017-04-28 12:57:55 +00:00
float audio_max_timing_skew;
float audio_volume; /* dB scale. */
2017-06-08 20:58:43 +00:00
float audio_mixer_volume; /* dB scale. */
2017-04-28 12:57:55 +00:00
float input_overlay_opacity;
float input_overlay_scale;
float slowmotion_ratio;
float fastforward_ratio;
float input_analog_deadzone;
float input_analog_sensitivity;
2017-04-28 12:57:55 +00:00
} floats;
2017-04-28 17:12:48 +00:00
struct
{
2017-04-28 18:08:12 +00:00
int placeholder;
2017-04-28 17:12:48 +00:00
int netplay_check_frames;
int location_update_interval_ms;
int location_update_interval_distance;
int state_slot;
2017-05-24 14:25:36 +00:00
int audio_wasapi_sh_buffer_length;
int crt_switch_center_adjust;
#ifdef HAVE_VULKAN
int vulkan_gpu_index;
2019-06-18 20:33:37 +00:00
#endif
#ifdef HAVE_D3D10
int d3d10_gpu_index;
#endif
#ifdef HAVE_D3D11
int d3d11_gpu_index;
#endif
#ifdef HAVE_D3D12
int d3d12_gpu_index;
#endif
int content_favorites_size;
2017-04-28 17:12:48 +00:00
} ints;
2017-04-28 19:03:04 +00:00
struct
{
unsigned placeholder;
unsigned audio_out_rate;
unsigned audio_block_frames;
unsigned audio_latency;
unsigned fps_update_interval;
unsigned input_block_timeout;
unsigned audio_resampler_quality;
2017-04-28 19:03:04 +00:00
unsigned input_turbo_period;
unsigned input_turbo_duty_cycle;
unsigned input_turbo_mode;
unsigned input_turbo_default_button;
2017-04-28 19:03:04 +00:00
unsigned input_bind_timeout;
2018-04-04 08:33:59 +00:00
unsigned input_bind_hold;
2019-09-14 22:46:02 +00:00
#ifdef GEKKO
unsigned input_mouse_scale;
#endif
2017-04-28 19:03:04 +00:00
unsigned input_menu_toggle_gamepad_combo;
unsigned input_keyboard_gamepad_mapping_type;
unsigned input_poll_type_behavior;
unsigned netplay_port;
unsigned netplay_input_latency_frames_min;
unsigned netplay_input_latency_frames_range;
unsigned netplay_share_digital;
unsigned netplay_share_analog;
2017-04-28 19:03:04 +00:00
unsigned bundle_assets_extract_version_current;
unsigned bundle_assets_extract_last_version;
unsigned content_history_size;
2019-08-19 23:18:26 +00:00
unsigned frontend_log_level;
2017-04-28 19:03:04 +00:00
unsigned libretro_log_level;
unsigned rewind_granularity;
unsigned rewind_buffer_size_step;
2017-04-28 19:03:04 +00:00
unsigned autosave_interval;
unsigned network_cmd_port;
unsigned network_remote_base_port;
2017-09-10 16:57:07 +00:00
unsigned keymapper_port;
unsigned video_window_opacity;
unsigned crt_switch_resolution;
unsigned crt_switch_resolution_super;
2017-04-28 19:03:04 +00:00
unsigned video_monitor_index;
unsigned video_fullscreen_x;
unsigned video_fullscreen_y;
unsigned video_max_swapchain_images;
unsigned video_swap_interval;
unsigned video_hard_sync_frames;
unsigned video_frame_delay;
unsigned video_viwidth;
unsigned video_aspect_ratio_idx;
unsigned video_rotation;
unsigned screen_orientation;
unsigned video_msg_bgcolor_red;
unsigned video_msg_bgcolor_green;
unsigned video_msg_bgcolor_blue;
unsigned video_stream_port;
2018-09-23 23:43:26 +00:00
unsigned video_record_quality;
unsigned video_stream_quality;
unsigned video_record_scale_factor;
unsigned video_stream_scale_factor;
unsigned video_3ds_display_mode;
2019-04-16 16:41:06 +00:00
#ifdef HAVE_VIDEO_LAYOUT
unsigned video_layout_selected_view;
#endif
#ifdef GEKKO
unsigned video_overscan_correction_top;
unsigned video_overscan_correction_bottom;
#endif
unsigned video_shader_delay;
2017-04-28 19:03:04 +00:00
/* Accessibility */
unsigned accessibility_narrator_speech_speed;
unsigned menu_timedate_style;
unsigned gfx_thumbnails;
unsigned menu_left_thumbnails;
unsigned gfx_thumbnail_upscale_threshold;
unsigned menu_rgui_thumbnail_downscaler;
unsigned menu_rgui_thumbnail_delay;
2019-01-09 10:44:38 +00:00
unsigned menu_rgui_color_theme;
unsigned menu_xmb_animation_opening_main_menu;
unsigned menu_xmb_animation_horizontal_highlight;
unsigned menu_xmb_animation_move_up_down;
unsigned menu_xmb_layout;
2017-04-28 19:03:04 +00:00
unsigned menu_xmb_shader_pipeline;
unsigned menu_xmb_alpha_factor;
unsigned menu_xmb_theme;
unsigned menu_xmb_color_theme;
2019-06-07 15:38:17 +00:00
unsigned menu_xmb_thumbnail_scale_factor;
2017-04-28 19:03:04 +00:00
unsigned menu_materialui_color_theme;
2019-10-23 14:34:17 +00:00
unsigned menu_materialui_transition_animation;
2019-10-31 17:24:24 +00:00
unsigned menu_materialui_thumbnail_view_portrait;
unsigned menu_materialui_thumbnail_view_landscape;
2019-11-08 16:25:36 +00:00
unsigned menu_materialui_landscape_layout_optimization;
2018-10-27 14:50:48 +00:00
unsigned menu_ozone_color_theme;
unsigned menu_font_color_red;
unsigned menu_font_color_green;
unsigned menu_font_color_blue;
2019-02-13 11:02:15 +00:00
unsigned menu_rgui_internal_upscale_level;
2019-03-19 11:48:22 +00:00
unsigned menu_rgui_aspect_ratio;
unsigned menu_rgui_aspect_ratio_lock;
unsigned menu_rgui_particle_effect;
unsigned menu_ticker_type;
2017-04-28 19:03:04 +00:00
unsigned playlist_entry_remove_enable;
unsigned playlist_show_inline_core_name;
unsigned playlist_sublabel_runtime_type;
unsigned playlist_sublabel_last_played_style;
2017-04-28 19:03:04 +00:00
unsigned camera_width;
unsigned camera_height;
unsigned input_overlay_show_physical_inputs_port;
2017-09-27 22:09:59 +00:00
unsigned input_split_joycon[MAX_USERS];
2017-09-27 22:09:59 +00:00
unsigned input_joypad_map[MAX_USERS];
unsigned input_device[MAX_USERS];
unsigned input_mouse_index[MAX_USERS];
/* Set by autoconfiguration in joypad_autoconfig_dir.
* Does not override main binds. */
unsigned input_libretro_device[MAX_USERS];
unsigned input_analog_dpad_mode[MAX_USERS];
unsigned input_keymapper_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
2017-09-27 22:09:59 +00:00
unsigned input_remap_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
unsigned led_map[MAX_LEDS];
2018-03-28 19:22:07 +00:00
unsigned run_ahead_frames;
2018-06-04 05:48:08 +00:00
unsigned midi_volume;
2018-09-26 21:34:45 +00:00
unsigned streaming_mode;
unsigned window_position_x;
unsigned window_position_y;
unsigned window_position_width;
unsigned window_position_height;
2018-11-25 20:41:26 +00:00
unsigned video_record_threads;
unsigned libnx_overclock;
unsigned ai_service_mode;
2019-08-22 17:39:00 +00:00
unsigned ai_service_target_lang;
unsigned ai_service_source_lang;
2017-04-28 19:03:04 +00:00
} uints;
struct
{
size_t placeholder;
size_t rewind_buffer_size;
} sizes;
2017-04-28 20:59:13 +00:00
struct
{
2017-04-28 21:02:22 +00:00
char placeholder;
2017-04-28 20:59:13 +00:00
char video_driver[32];
char record_driver[32];
char camera_driver[32];
char wifi_driver[32];
char led_driver[32];
2017-04-28 20:59:13 +00:00
char location_driver[32];
char menu_driver[32];
char cheevos_username[32];
char cheevos_password[32];
char cheevos_token[32];
2017-04-28 20:59:13 +00:00
char video_context_driver[32];
char audio_driver[32];
char audio_resampler[32];
char input_driver[32];
char input_joypad_driver[32];
2018-06-04 05:48:08 +00:00
char midi_driver[32];
2020-03-05 10:27:25 +00:00
char midi_input[32];
char midi_output[32];
2017-09-27 22:09:59 +00:00
2017-04-28 20:59:13 +00:00
char input_keyboard_layout[64];
2017-09-27 22:09:59 +00:00
char audio_device[255];
char camera_device[255];
2020-03-05 10:27:25 +00:00
char netplay_mitm_server[255];
char translation_service_url[2048];
2017-09-27 22:09:59 +00:00
2017-04-28 20:59:13 +00:00
char bundle_assets_src[PATH_MAX_LENGTH];
char bundle_assets_dst[PATH_MAX_LENGTH];
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
2018-09-26 21:22:12 +00:00
char youtube_stream_key[PATH_MAX_LENGTH];
char twitch_stream_key[PATH_MAX_LENGTH];
2018-10-13 23:17:17 +00:00
char discord_app_id[PATH_MAX_LENGTH];
char ai_service_url[PATH_MAX_LENGTH];
2017-04-28 20:59:13 +00:00
} arrays;
struct
{
2017-04-28 22:39:29 +00:00
char placeholder;
2016-12-26 05:39:12 +00:00
2017-09-27 22:09:59 +00:00
char username[32];
2020-03-05 10:27:25 +00:00
2017-09-27 22:09:59 +00:00
char netplay_password[128];
char netplay_spectate_password[128];
2020-03-05 10:27:25 +00:00
2017-09-27 22:09:59 +00:00
char netplay_server[255];
char network_buildbot_url[255];
char network_buildbot_assets_url[255];
2020-03-05 10:27:25 +00:00
2017-04-28 22:39:29 +00:00
char browse_url[4096];
2020-03-05 10:27:25 +00:00
2019-07-11 22:20:44 +00:00
char path_stream_url[8192];
2016-04-28 17:26:02 +00:00
2017-04-28 22:39:29 +00:00
char path_menu_xmb_font[PATH_MAX_LENGTH];
char menu_content_show_settings_password[PATH_MAX_LENGTH];
char kiosk_mode_password[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char path_cheat_database[PATH_MAX_LENGTH];
char path_content_database[PATH_MAX_LENGTH];
char path_overlay[PATH_MAX_LENGTH];
2019-04-16 16:41:06 +00:00
#ifdef HAVE_VIDEO_LAYOUT
char path_video_layout[PATH_MAX_LENGTH];
#endif
char path_record_config[PATH_MAX_LENGTH];
char path_stream_config[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char path_menu_wallpaper[PATH_MAX_LENGTH];
char path_audio_dsp_plugin[PATH_MAX_LENGTH];
char path_softfilter_plugin[PATH_MAX_LENGTH];
char path_core_options[PATH_MAX_LENGTH];
char path_content_history[PATH_MAX_LENGTH];
2017-08-12 15:10:14 +00:00
char path_content_favorites[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char path_content_music_history[PATH_MAX_LENGTH];
char path_content_image_history[PATH_MAX_LENGTH];
char path_content_video_history[PATH_MAX_LENGTH];
char path_libretro_info[PATH_MAX_LENGTH];
char path_cheat_settings[PATH_MAX_LENGTH];
char path_font[PATH_MAX_LENGTH];
char path_rgui_theme_preset[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char directory_audio_filter[PATH_MAX_LENGTH];
char directory_autoconfig[PATH_MAX_LENGTH];
char directory_video_filter[PATH_MAX_LENGTH];
char directory_video_shader[PATH_MAX_LENGTH];
char directory_content_history[PATH_MAX_LENGTH];
2017-08-12 15:10:14 +00:00
char directory_content_favorites[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char directory_libretro[PATH_MAX_LENGTH];
char directory_cursor[PATH_MAX_LENGTH];
char directory_input_remapping[PATH_MAX_LENGTH];
char directory_overlay[PATH_MAX_LENGTH];
2019-04-16 16:41:06 +00:00
#ifdef HAVE_VIDEO_LAYOUT
char directory_video_layout[PATH_MAX_LENGTH];
#endif
2017-04-28 22:39:29 +00:00
char directory_resampler[PATH_MAX_LENGTH];
char directory_screenshot[PATH_MAX_LENGTH];
char directory_system[PATH_MAX_LENGTH];
char directory_cache[PATH_MAX_LENGTH];
char directory_playlist[PATH_MAX_LENGTH];
char directory_runtime_log[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
char directory_core_assets[PATH_MAX_LENGTH];
char directory_assets[PATH_MAX_LENGTH];
char directory_dynamic_wallpapers[PATH_MAX_LENGTH];
char directory_thumbnails[PATH_MAX_LENGTH];
char directory_menu_config[PATH_MAX_LENGTH];
char directory_menu_content[PATH_MAX_LENGTH];
2018-09-27 11:38:32 +00:00
char streaming_title[PATH_MAX_LENGTH];
2019-03-05 22:34:05 +00:00
char log_dir[PATH_MAX_LENGTH];
2017-04-28 22:39:29 +00:00
} paths;
bool modified;
video_viewport_t video_viewport_custom;
2015-03-20 18:32:46 +00:00
} settings_t;
2015-01-11 04:29:32 +00:00
/**
* config_get_default_camera:
*
* Gets default camera driver.
*
* Returns: Default camera driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_camera(void);
/**
* config_get_default_wifi:
*
* Gets default wifi driver.
*
* Returns: Default wifi driver.
**/
const char *config_get_default_wifi(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_location:
*
* Gets default location driver.
*
* Returns: Default location driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_location(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_video:
*
* Gets default video driver.
*
* Returns: Default video driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_video(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_audio:
*
* Gets default audio driver.
*
* Returns: Default audio driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_audio(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_audio_resampler:
*
* Gets default audio resampler driver.
*
* Returns: Default audio resampler driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_audio_resampler(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_input:
*
* Gets default input driver.
*
* Returns: Default input driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_input(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_joypad:
*
* Gets default input joypad driver.
*
* Returns: Default input joypad driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_joypad(void);
2015-01-11 04:29:32 +00:00
/**
* config_get_default_menu:
*
* Gets default menu driver.
*
* Returns: Default menu driver.
**/
2015-01-09 15:56:21 +00:00
const char *config_get_default_menu(void);
2018-06-04 05:48:08 +00:00
const char *config_get_default_midi(void);
const char *config_get_midi_driver_options(void);
2015-04-15 11:37:38 +00:00
const char *config_get_default_record(void);
#ifdef HAVE_CONFIGFILE
/**
* config_load_override:
*
* Tries to append game-specific and core-specific configuration.
* These settings will always have precedence, thus this feature
* can be used to enforce overrides.
*
* Returns: false if there was an error or no action was performed.
*
*/
bool config_load_override(void *data);
/**
* config_unload_override:
*
* Unloads configuration overrides if overrides are active.
*
*
* Returns: false if there was an error.
*/
bool config_unload_override(void);
/**
* config_load_remap:
*
* Tries to append game-specific and core-specific remap files.
*
* Returns: false if there was an error or no action was performed.
*
*/
2020-02-04 01:57:16 +00:00
bool config_load_remap(const char *directory_input_remapping,
void *data);
/**
* config_save_autoconf_profile:
* @path : Path that shall be written to.
* @user : Controller number to save
* Writes a controller autoconf file to disk.
**/
bool config_save_autoconf_profile(const char *path, unsigned user);
2015-01-09 15:56:21 +00:00
/**
* config_save_file:
* @path : Path that shall be written to.
*
* Writes a config file to disk.
*
* Returns: true (1) on success, otherwise returns false (0).
2015-01-19 06:43:28 +00:00
**/
bool config_save_file(const char *path);
2015-01-09 15:56:21 +00:00
2016-08-25 06:34:51 +00:00
/**
2016-08-26 14:43:29 +00:00
* config_save_overrides:
2016-08-25 06:34:51 +00:00
* @path : Path that shall be written to.
*
* Writes a config file override to disk.
*
* Returns: true (1) on success, otherwise returns false (0).
**/
bool config_save_overrides(enum override_type type, void *data);
2016-08-25 06:34:51 +00:00
2016-05-27 14:42:20 +00:00
/* Replaces currently loaded configuration file with
* another one. Will load a dummy core to flush state
* properly. */
bool config_replace(bool config_save_on_exit, char *path);
#endif
2016-05-27 14:42:20 +00:00
2016-08-01 12:14:21 +00:00
bool config_overlay_enable_default(void);
void config_set_defaults(void *data);
2018-10-01 00:13:53 +00:00
2020-02-10 19:39:53 +00:00
void config_load(void *data);
2015-03-20 18:32:46 +00:00
settings_t *config_get_ptr(void);
RETRO_END_DECLS
2015-01-09 15:56:21 +00:00
#endif