1 /* RetroArch - A frontend for libretro. 2 * Copyright (C) 2010-2014 - Hans-Kristian Arntzen 3 * Copyright (C) 2011-2016 - Daniel De Matteis 4 * Copyright (C) 2014-2016 - Jean-André Santoni 5 * Copyright (C) 2016-2019 - Brad Parker 6 * 7 * RetroArch is free software: you can redistribute it and/or modify it under the terms 8 * of the GNU General Public License as published by the Free Software Found- 9 * ation, either version 3 of the License, or (at your option) any later version. 10 * 11 * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 * PURPOSE. See the GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along with RetroArch. 16 * If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __RARCH_CONFIGURATION_H__ 20 #define __RARCH_CONFIGURATION_H__ 21 22 #include <stdint.h> 23 24 #include <boolean.h> 25 #include <retro_common_api.h> 26 #include <retro_miscellaneous.h> 27 28 #include "gfx/video_defines.h" 29 #include "input/input_defines.h" 30 #include "led/led_defines.h" 31 32 #ifdef HAVE_LAKKA 33 #include "lakka.h" 34 #endif 35 36 #define configuration_set_float(settings, var, newvar) \ 37 { \ 38 settings->modified = true; \ 39 var = newvar; \ 40 } 41 42 #define configuration_set_bool(settings, var, newvar) \ 43 { \ 44 settings->modified = true; \ 45 var = newvar; \ 46 } 47 48 #define configuration_set_uint(settings, var, newvar) \ 49 { \ 50 settings->modified = true; \ 51 var = newvar; \ 52 } 53 54 #define configuration_set_int(settings, var, newvar) \ 55 { \ 56 settings->modified = true; \ 57 var = newvar; \ 58 } 59 60 #define configuration_set_string(settings, var, newvar) \ 61 { \ 62 settings->modified = true; \ 63 strlcpy(var, newvar, sizeof(var)); \ 64 } 65 66 enum crt_switch_type 67 { 68 CRT_SWITCH_NONE = 0, 69 CRT_SWITCH_15KHZ, 70 CRT_SWITCH_31KHZ, 71 CRT_SWITCH_32_120, 72 CRT_SWITCH_INI 73 }; 74 75 enum override_type 76 { 77 OVERRIDE_NONE = 0, 78 OVERRIDE_CORE, 79 OVERRIDE_CONTENT_DIR, 80 OVERRIDE_GAME 81 }; 82 83 RETRO_BEGIN_DECLS 84 85 typedef struct settings 86 { 87 struct 88 { 89 size_t placeholder; 90 size_t rewind_buffer_size; 91 } sizes; 92 93 video_viewport_t video_viewport_custom; /* int alignment */ 94 95 struct 96 { 97 int placeholder; 98 int netplay_check_frames; 99 int location_update_interval_ms; 100 int location_update_interval_distance; 101 int state_slot; 102 int audio_wasapi_sh_buffer_length; 103 int crt_switch_center_adjust; 104 int crt_switch_porch_adjust; 105 #ifdef HAVE_VULKAN 106 int vulkan_gpu_index; 107 #endif 108 #ifdef HAVE_D3D10 109 int d3d10_gpu_index; 110 #endif 111 #ifdef HAVE_D3D11 112 int d3d11_gpu_index; 113 #endif 114 #ifdef HAVE_D3D12 115 int d3d12_gpu_index; 116 #endif 117 int content_favorites_size; 118 } ints; 119 120 struct 121 { 122 unsigned placeholder; 123 124 unsigned input_split_joycon[MAX_USERS]; 125 unsigned input_joypad_index[MAX_USERS]; 126 unsigned input_device[MAX_USERS]; 127 unsigned input_mouse_index[MAX_USERS]; 128 /* Set by autoconfiguration in joypad_autoconfig_dir. 129 * Does not override main binds. */ 130 unsigned input_libretro_device[MAX_USERS]; 131 unsigned input_analog_dpad_mode[MAX_USERS]; 132 133 unsigned input_remap_ports[MAX_USERS]; 134 unsigned input_remap_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END]; 135 unsigned input_keymapper_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END]; 136 unsigned input_remap_port_map[MAX_USERS][MAX_USERS + 1]; 137 138 unsigned led_map[MAX_LEDS]; 139 140 unsigned audio_output_sample_rate; 141 unsigned audio_block_frames; 142 unsigned audio_latency; 143 144 unsigned fps_update_interval; 145 unsigned memory_update_interval; 146 147 unsigned input_block_timeout; 148 149 unsigned audio_resampler_quality; 150 151 unsigned input_turbo_period; 152 unsigned input_turbo_duty_cycle; 153 unsigned input_turbo_mode; 154 unsigned input_turbo_default_button; 155 156 unsigned input_bind_timeout; 157 unsigned input_bind_hold; 158 #ifdef GEKKO 159 unsigned input_mouse_scale; 160 #endif 161 unsigned input_touch_scale; 162 unsigned input_hotkey_block_delay; 163 unsigned input_menu_toggle_gamepad_combo; 164 unsigned input_keyboard_gamepad_mapping_type; 165 unsigned input_poll_type_behavior; 166 unsigned input_dingux_rumble_gain; 167 unsigned input_auto_game_focus; 168 169 unsigned netplay_port; 170 unsigned netplay_input_latency_frames_min; 171 unsigned netplay_input_latency_frames_range; 172 unsigned netplay_share_digital; 173 unsigned netplay_share_analog; 174 unsigned bundle_assets_extract_version_current; 175 unsigned bundle_assets_extract_last_version; 176 unsigned content_history_size; 177 unsigned frontend_log_level; 178 unsigned libretro_log_level; 179 unsigned rewind_granularity; 180 unsigned rewind_buffer_size_step; 181 unsigned autosave_interval; 182 unsigned savestate_max_keep; 183 unsigned network_cmd_port; 184 unsigned network_remote_base_port; 185 unsigned keymapper_port; 186 unsigned video_window_opacity; 187 unsigned crt_switch_resolution; 188 unsigned crt_switch_resolution_super; 189 unsigned screen_brightness; 190 unsigned video_monitor_index; 191 unsigned video_fullscreen_x; 192 unsigned video_fullscreen_y; 193 unsigned video_max_swapchain_images; 194 unsigned video_swap_interval; 195 unsigned video_hard_sync_frames; 196 unsigned video_frame_delay; 197 unsigned video_viwidth; 198 unsigned video_aspect_ratio_idx; 199 unsigned video_rotation; 200 unsigned screen_orientation; 201 unsigned video_msg_bgcolor_red; 202 unsigned video_msg_bgcolor_green; 203 unsigned video_msg_bgcolor_blue; 204 unsigned video_stream_port; 205 unsigned video_record_quality; 206 unsigned video_stream_quality; 207 unsigned video_record_scale_factor; 208 unsigned video_stream_scale_factor; 209 unsigned video_3ds_display_mode; 210 unsigned video_dingux_ipu_filter_type; 211 unsigned video_dingux_refresh_rate; 212 unsigned video_dingux_rs90_softfilter_type; 213 #ifdef HAVE_VIDEO_LAYOUT 214 unsigned video_layout_selected_view; 215 #endif 216 #ifdef GEKKO 217 unsigned video_overscan_correction_top; 218 unsigned video_overscan_correction_bottom; 219 #endif 220 unsigned video_shader_delay; 221 #ifdef HAVE_SCREENSHOTS 222 unsigned notification_show_screenshot_duration; 223 unsigned notification_show_screenshot_flash; 224 #endif 225 226 /* Accessibility */ 227 unsigned accessibility_narrator_speech_speed; 228 229 unsigned menu_timedate_style; 230 unsigned menu_timedate_date_separator; 231 unsigned gfx_thumbnails; 232 unsigned menu_left_thumbnails; 233 unsigned gfx_thumbnail_upscale_threshold; 234 unsigned menu_rgui_thumbnail_downscaler; 235 unsigned menu_rgui_thumbnail_delay; 236 unsigned menu_rgui_color_theme; 237 unsigned menu_xmb_animation_opening_main_menu; 238 unsigned menu_xmb_animation_horizontal_highlight; 239 unsigned menu_xmb_animation_move_up_down; 240 unsigned menu_xmb_layout; 241 unsigned menu_xmb_shader_pipeline; 242 unsigned menu_xmb_alpha_factor; 243 unsigned menu_xmb_theme; 244 unsigned menu_xmb_color_theme; 245 unsigned menu_xmb_thumbnail_scale_factor; 246 unsigned menu_materialui_color_theme; 247 unsigned menu_materialui_transition_animation; 248 unsigned menu_materialui_thumbnail_view_portrait; 249 unsigned menu_materialui_thumbnail_view_landscape; 250 unsigned menu_materialui_landscape_layout_optimization; 251 unsigned menu_ozone_color_theme; 252 unsigned menu_font_color_red; 253 unsigned menu_font_color_green; 254 unsigned menu_font_color_blue; 255 unsigned menu_rgui_internal_upscale_level; 256 unsigned menu_rgui_aspect_ratio; 257 unsigned menu_rgui_aspect_ratio_lock; 258 unsigned menu_rgui_particle_effect; 259 unsigned menu_ticker_type; 260 unsigned menu_scroll_delay; 261 unsigned menu_content_show_add_entry; 262 unsigned menu_screensaver_timeout; 263 unsigned menu_screensaver_animation; 264 265 unsigned playlist_entry_remove_enable; 266 unsigned playlist_show_inline_core_name; 267 unsigned playlist_sublabel_runtime_type; 268 unsigned playlist_sublabel_last_played_style; 269 270 unsigned camera_width; 271 unsigned camera_height; 272 273 unsigned input_overlay_show_inputs; 274 unsigned input_overlay_show_inputs_port; 275 276 unsigned run_ahead_frames; 277 278 unsigned midi_volume; 279 unsigned streaming_mode; 280 281 unsigned window_position_x; 282 unsigned window_position_y; 283 unsigned window_position_width; 284 unsigned window_position_height; 285 286 unsigned video_record_threads; 287 288 unsigned libnx_overclock; 289 unsigned ai_service_mode; 290 unsigned ai_service_target_lang; 291 unsigned ai_service_source_lang; 292 293 unsigned core_updater_auto_backup_history_size; 294 unsigned video_black_frame_insertion; 295 unsigned quit_on_close_content; 296 297 #ifdef HAVE_LAKKA 298 unsigned cpu_scaling_mode; 299 unsigned cpu_min_freq; 300 unsigned cpu_max_freq; 301 #endif 302 } uints; 303 304 struct 305 { 306 float placeholder; 307 float video_scale; 308 float video_aspect_ratio; 309 float video_refresh_rate; 310 float crt_video_refresh_rate; 311 float video_font_size; 312 float video_msg_pos_x; 313 float video_msg_pos_y; 314 float video_msg_color_r; 315 float video_msg_color_g; 316 float video_msg_color_b; 317 float video_msg_bgcolor_opacity; 318 319 float menu_scale_factor; 320 float menu_widget_scale_factor; 321 float menu_widget_scale_factor_windowed; 322 float menu_wallpaper_opacity; 323 float menu_framebuffer_opacity; 324 float menu_footer_opacity; 325 float menu_header_opacity; 326 float menu_ticker_speed; 327 float menu_rgui_particle_effect_speed; 328 float menu_screensaver_animation_speed; 329 330 float audio_max_timing_skew; 331 float audio_volume; /* dB scale. */ 332 float audio_mixer_volume; /* dB scale. */ 333 334 float input_overlay_opacity; 335 336 float input_overlay_scale_landscape; 337 float input_overlay_aspect_adjust_landscape; 338 float input_overlay_x_separation_landscape; 339 float input_overlay_y_separation_landscape; 340 float input_overlay_x_offset_landscape; 341 float input_overlay_y_offset_landscape; 342 343 float input_overlay_scale_portrait; 344 float input_overlay_aspect_adjust_portrait; 345 float input_overlay_x_separation_portrait; 346 float input_overlay_y_separation_portrait; 347 float input_overlay_x_offset_portrait; 348 float input_overlay_y_offset_portrait; 349 350 float slowmotion_ratio; 351 float fastforward_ratio; 352 float input_analog_deadzone; 353 float input_analog_sensitivity; 354 } floats; 355 356 struct 357 { 358 char placeholder; 359 360 char video_driver[32]; 361 char record_driver[32]; 362 char camera_driver[32]; 363 char bluetooth_driver[32]; 364 char wifi_driver[32]; 365 char led_driver[32]; 366 char location_driver[32]; 367 char menu_driver[32]; 368 char cheevos_username[32]; 369 char cheevos_password[256]; 370 char cheevos_token[32]; 371 char cheevos_leaderboards_enable[32]; 372 char video_context_driver[32]; 373 char audio_driver[32]; 374 char audio_resampler[32]; 375 char input_driver[32]; 376 char input_joypad_driver[32]; 377 char midi_driver[32]; 378 char midi_input[32]; 379 char midi_output[32]; 380 381 char input_keyboard_layout[64]; 382 383 char audio_device[255]; 384 char camera_device[255]; 385 char netplay_mitm_server[255]; 386 387 char translation_service_url[2048]; 388 389 char bundle_assets_src[PATH_MAX_LENGTH]; 390 char bundle_assets_dst[PATH_MAX_LENGTH]; 391 char bundle_assets_dst_subdir[PATH_MAX_LENGTH]; 392 char youtube_stream_key[PATH_MAX_LENGTH]; 393 char twitch_stream_key[PATH_MAX_LENGTH]; 394 char facebook_stream_key[PATH_MAX_LENGTH]; 395 char discord_app_id[PATH_MAX_LENGTH]; 396 char ai_service_url[PATH_MAX_LENGTH]; 397 398 char crt_switch_timings[255]; 399 #ifdef HAVE_LAKKA 400 char timezone[TIMEZONE_LENGTH]; 401 char cpu_main_gov[32]; 402 char cpu_menu_gov[32]; 403 #endif 404 } arrays; 405 406 struct 407 { 408 char placeholder; 409 410 char username[32]; 411 412 char netplay_password[128]; 413 char netplay_spectate_password[128]; 414 415 char netplay_server[255]; 416 char network_buildbot_url[255]; 417 char network_buildbot_assets_url[255]; 418 419 char browse_url[4096]; 420 421 char path_stream_url[8192]; 422 423 char path_menu_xmb_font[PATH_MAX_LENGTH]; 424 char menu_content_show_settings_password[PATH_MAX_LENGTH]; 425 char kiosk_mode_password[PATH_MAX_LENGTH]; 426 char path_cheat_database[PATH_MAX_LENGTH]; 427 char path_content_database[PATH_MAX_LENGTH]; 428 char path_overlay[PATH_MAX_LENGTH]; 429 #ifdef HAVE_VIDEO_LAYOUT 430 char path_video_layout[PATH_MAX_LENGTH]; 431 #endif 432 char path_record_config[PATH_MAX_LENGTH]; 433 char path_stream_config[PATH_MAX_LENGTH]; 434 char path_menu_wallpaper[PATH_MAX_LENGTH]; 435 char path_audio_dsp_plugin[PATH_MAX_LENGTH]; 436 char path_softfilter_plugin[PATH_MAX_LENGTH]; 437 char path_core_options[PATH_MAX_LENGTH]; 438 char path_content_favorites[PATH_MAX_LENGTH]; 439 char path_content_history[PATH_MAX_LENGTH]; 440 char path_content_image_history[PATH_MAX_LENGTH]; 441 char path_content_music_history[PATH_MAX_LENGTH]; 442 char path_content_video_history[PATH_MAX_LENGTH]; 443 char path_libretro_info[PATH_MAX_LENGTH]; 444 char path_cheat_settings[PATH_MAX_LENGTH]; 445 char path_font[PATH_MAX_LENGTH]; 446 char path_rgui_theme_preset[PATH_MAX_LENGTH]; 447 448 char directory_audio_filter[PATH_MAX_LENGTH]; 449 char directory_autoconfig[PATH_MAX_LENGTH]; 450 char directory_video_filter[PATH_MAX_LENGTH]; 451 char directory_video_shader[PATH_MAX_LENGTH]; 452 char directory_libretro[PATH_MAX_LENGTH]; 453 char directory_cursor[PATH_MAX_LENGTH]; 454 char directory_input_remapping[PATH_MAX_LENGTH]; 455 char directory_overlay[PATH_MAX_LENGTH]; 456 #ifdef HAVE_VIDEO_LAYOUT 457 char directory_video_layout[PATH_MAX_LENGTH]; 458 #endif 459 char directory_resampler[PATH_MAX_LENGTH]; 460 char directory_screenshot[PATH_MAX_LENGTH]; 461 char directory_system[PATH_MAX_LENGTH]; 462 char directory_cache[PATH_MAX_LENGTH]; 463 char directory_playlist[PATH_MAX_LENGTH]; 464 char directory_content_favorites[PATH_MAX_LENGTH]; 465 char directory_content_history[PATH_MAX_LENGTH]; 466 char directory_content_image_history[PATH_MAX_LENGTH]; 467 char directory_content_music_history[PATH_MAX_LENGTH]; 468 char directory_content_video_history[PATH_MAX_LENGTH]; 469 char directory_runtime_log[PATH_MAX_LENGTH]; 470 char directory_core_assets[PATH_MAX_LENGTH]; 471 char directory_assets[PATH_MAX_LENGTH]; 472 char directory_dynamic_wallpapers[PATH_MAX_LENGTH]; 473 char directory_thumbnails[PATH_MAX_LENGTH]; 474 char directory_menu_config[PATH_MAX_LENGTH]; 475 char directory_menu_content[PATH_MAX_LENGTH]; 476 char streaming_title[PATH_MAX_LENGTH]; 477 478 char log_dir[PATH_MAX_LENGTH]; 479 } paths; 480 481 bool modified; 482 483 struct 484 { 485 bool placeholder; 486 487 /* Video */ 488 bool video_fullscreen; 489 bool video_windowed_fullscreen; 490 bool video_vsync; 491 bool video_adaptive_vsync; 492 bool video_hard_sync; 493 bool video_vfilter; 494 bool video_smooth; 495 bool video_ctx_scaling; 496 bool video_force_aspect; 497 bool video_crop_overscan; 498 bool video_aspect_ratio_auto; 499 bool video_dingux_ipu_keep_aspect; 500 bool video_scale_integer; 501 bool video_scale_integer_overscale; 502 bool video_shader_enable; 503 bool video_shader_watch_files; 504 bool video_shader_remember_last_dir; 505 bool video_shader_preset_save_reference_enable; 506 bool video_threaded; 507 bool video_font_enable; 508 bool video_disable_composition; 509 bool video_post_filter_record; 510 bool video_gpu_record; 511 bool video_gpu_screenshot; 512 bool video_allow_rotate; 513 bool video_shared_context; 514 bool video_force_srgb_disable; 515 bool video_fps_show; 516 bool video_statistics_show; 517 bool video_framecount_show; 518 bool video_memory_show; 519 bool video_msg_bgcolor_enable; 520 bool video_3ds_lcd_bottom; 521 bool video_notch_write_over_enable; 522 #ifdef HAVE_VIDEO_LAYOUT 523 bool video_layout_enable; 524 #endif 525 bool video_force_resolution; 526 527 /* Accessibility */ 528 bool accessibility_enable; 529 530 /* Audio */ 531 bool audio_enable; 532 bool audio_enable_menu; 533 bool audio_enable_menu_ok; 534 bool audio_enable_menu_cancel; 535 bool audio_enable_menu_notice; 536 bool audio_enable_menu_bgm; 537 bool audio_sync; 538 bool audio_rate_control; 539 bool audio_wasapi_exclusive_mode; 540 bool audio_wasapi_float_format; 541 bool audio_fastforward_mute; 542 543 /* Input */ 544 bool input_remap_binds_enable; 545 bool input_autodetect_enable; 546 bool input_sensors_enable; 547 bool input_overlay_enable; 548 bool input_overlay_enable_autopreferred; 549 bool input_overlay_hide_in_menu; 550 bool input_overlay_hide_when_gamepad_connected; 551 bool input_overlay_show_mouse_cursor; 552 bool input_overlay_auto_rotate; 553 bool input_overlay_auto_scale; 554 bool input_descriptor_label_show; 555 bool input_descriptor_hide_unbound; 556 bool input_menu_swap_ok_cancel_buttons; 557 bool input_backtouch_enable; 558 bool input_backtouch_toggle; 559 bool input_small_keyboard_enable; 560 bool input_keyboard_gamepad_enable; 561 #if defined(HAVE_DINPUT) || defined(HAVE_WINRAWINPUT) 562 bool input_nowinkey_enable; 563 #endif 564 565 /* Frame time counter */ 566 bool frame_time_counter_reset_after_fastforwarding; 567 bool frame_time_counter_reset_after_load_state; 568 bool frame_time_counter_reset_after_save_state; 569 570 /* Menu */ 571 bool filter_by_current_core; 572 bool menu_enable_widgets; 573 bool menu_show_load_content_animation; 574 bool notification_show_autoconfig; 575 bool notification_show_cheats_applied; 576 bool notification_show_patch_applied; 577 bool notification_show_remap_load; 578 bool notification_show_config_override_load; 579 bool notification_show_set_initial_disk; 580 bool notification_show_fast_forward; 581 #ifdef HAVE_SCREENSHOTS 582 bool notification_show_screenshot; 583 #endif 584 bool notification_show_refresh_rate; 585 bool menu_widget_scale_auto; 586 bool menu_show_start_screen; 587 bool menu_pause_libretro; 588 bool menu_savestate_resume; 589 bool menu_insert_disk_resume; 590 bool menu_timedate_enable; 591 bool menu_battery_level_enable; 592 bool menu_core_enable; 593 bool menu_show_sublabels; 594 bool menu_dynamic_wallpaper_enable; 595 bool menu_throttle; 596 bool menu_mouse_enable; 597 bool menu_pointer_enable; 598 bool menu_navigation_wraparound_enable; 599 bool menu_navigation_browser_filter_supported_extensions_enable; 600 bool menu_show_advanced_settings; 601 bool menu_throttle_framerate; 602 bool menu_linear_filter; 603 bool menu_horizontal_animation; 604 bool menu_scroll_fast; 605 bool menu_show_online_updater; 606 bool menu_show_core_updater; 607 bool menu_show_load_core; 608 bool menu_show_load_content; 609 bool menu_show_load_disc; 610 bool menu_show_dump_disc; 611 bool menu_show_information; 612 bool menu_show_configurations; 613 bool menu_show_help; 614 bool menu_show_quit_retroarch; 615 bool menu_show_restart_retroarch; 616 bool menu_show_reboot; 617 bool menu_show_shutdown; 618 bool menu_show_latency; 619 bool menu_show_rewind; 620 bool menu_show_overlays; 621 bool menu_show_legacy_thumbnail_updater; 622 #ifdef HAVE_VIDEO_LAYOUT 623 bool menu_show_video_layout; 624 #endif 625 bool menu_materialui_icons_enable; 626 bool menu_materialui_playlist_icons_enable; 627 bool menu_materialui_show_nav_bar; 628 bool menu_materialui_auto_rotate_nav_bar; 629 bool menu_materialui_dual_thumbnail_list_view_enable; 630 bool menu_materialui_thumbnail_background_enable; 631 bool menu_rgui_background_filler_thickness_enable; 632 bool menu_rgui_border_filler_thickness_enable; 633 bool menu_rgui_border_filler_enable; 634 bool menu_rgui_full_width_layout; 635 bool menu_rgui_transparency; 636 bool menu_rgui_shadows; 637 bool menu_rgui_inline_thumbnails; 638 bool menu_rgui_swap_thumbnails; 639 bool menu_rgui_extended_ascii; 640 bool menu_rgui_switch_icons; 641 bool menu_rgui_particle_effect_screensaver; 642 bool menu_xmb_shadows_enable; 643 bool menu_xmb_vertical_thumbnails; 644 bool menu_content_show_settings; 645 bool menu_content_show_favorites; 646 bool menu_content_show_images; 647 bool menu_content_show_music; 648 bool menu_content_show_video; 649 bool menu_content_show_netplay; 650 bool menu_content_show_history; 651 bool menu_content_show_add; 652 bool menu_content_show_playlists; 653 bool menu_content_show_explore; 654 bool menu_use_preferred_system_color_theme; 655 bool menu_preferred_system_color_theme_set; 656 bool menu_unified_controls; 657 bool menu_ticker_smooth; 658 bool settings_show_drivers; 659 bool settings_show_video; 660 bool settings_show_audio; 661 bool settings_show_input; 662 bool settings_show_latency; 663 bool settings_show_core; 664 bool settings_show_configuration; 665 bool settings_show_saving; 666 bool settings_show_logging; 667 bool settings_show_file_browser; 668 bool settings_show_frame_throttle; 669 bool settings_show_recording; 670 bool settings_show_onscreen_display; 671 bool settings_show_user_interface; 672 bool settings_show_ai_service; 673 bool settings_show_accessibility; 674 bool settings_show_power_management; 675 bool settings_show_achievements; 676 bool settings_show_network; 677 bool settings_show_playlists; 678 bool settings_show_user; 679 bool settings_show_directory; 680 bool quick_menu_show_resume_content; 681 bool quick_menu_show_restart_content; 682 bool quick_menu_show_close_content; 683 bool quick_menu_show_take_screenshot; 684 bool quick_menu_show_save_load_state; 685 bool quick_menu_show_undo_save_load_state; 686 bool quick_menu_show_add_to_favorites; 687 bool quick_menu_show_start_recording; 688 bool quick_menu_show_start_streaming; 689 bool quick_menu_show_set_core_association; 690 bool quick_menu_show_reset_core_association; 691 bool quick_menu_show_options; 692 bool quick_menu_show_controls; 693 bool quick_menu_show_cheats; 694 bool quick_menu_show_shaders; 695 bool quick_menu_show_save_core_overrides; 696 bool quick_menu_show_save_game_overrides; 697 bool quick_menu_show_save_content_dir_overrides; 698 bool quick_menu_show_information; 699 bool quick_menu_show_recording; 700 bool quick_menu_show_streaming; 701 bool quick_menu_show_download_thumbnails; 702 bool kiosk_mode_enable; 703 704 bool crt_switch_custom_refresh_enable; 705 bool crt_switch_hires_menu; 706 707 /* Netplay */ 708 bool netplay_public_announce; 709 bool netplay_start_as_spectator; 710 bool netplay_allow_slaves; 711 bool netplay_require_slaves; 712 bool netplay_stateless_mode; 713 bool netplay_nat_traversal; 714 bool netplay_use_mitm_server; 715 bool netplay_request_devices[MAX_USERS]; 716 717 /* Network */ 718 bool network_buildbot_auto_extract_archive; 719 bool network_buildbot_show_experimental_cores; 720 bool network_on_demand_thumbnails; 721 bool core_updater_auto_backup; 722 723 /* UI */ 724 bool ui_menubar_enable; 725 bool ui_suspend_screensaver_enable; 726 bool ui_companion_start_on_boot; 727 bool ui_companion_enable; 728 bool ui_companion_toggle; 729 bool desktop_menu_enable; 730 731 /* Cheevos */ 732 bool cheevos_enable; 733 bool cheevos_test_unofficial; 734 bool cheevos_hardcore_mode_enable; 735 bool cheevos_richpresence_enable; 736 bool cheevos_badges_enable; 737 bool cheevos_verbose_enable; 738 bool cheevos_auto_screenshot; 739 bool cheevos_start_active; 740 bool cheevos_unlock_sound_enable; 741 bool cheevos_challenge_indicators; 742 743 /* Camera */ 744 bool camera_allow; 745 746 /* Bluetooth */ 747 bool bluetooth_allow; 748 749 /* WiFi */ 750 bool wifi_allow; 751 bool wifi_enabled; 752 753 /* Location */ 754 bool location_allow; 755 756 /* Multimedia */ 757 bool multimedia_builtin_mediaplayer_enable; 758 bool multimedia_builtin_imageviewer_enable; 759 760 /* Bundle */ 761 bool bundle_finished; 762 bool bundle_assets_extract_enable; 763 764 /* Driver */ 765 bool driver_switch_enable; 766 767 /* Misc. */ 768 bool discord_enable; 769 bool threaded_data_runloop_enable; 770 bool set_supports_no_game_enable; 771 bool auto_screenshot_filename; 772 bool history_list_enable; 773 bool playlist_entry_rename; 774 bool rewind_enable; 775 bool vrr_runloop_enable; 776 bool apply_cheats_after_toggle; 777 bool apply_cheats_after_load; 778 bool run_ahead_enabled; 779 bool run_ahead_secondary_instance; 780 bool run_ahead_hide_warnings; 781 bool pause_nonactive; 782 bool block_sram_overwrite; 783 bool savestate_auto_index; 784 bool savestate_auto_save; 785 bool savestate_auto_load; 786 bool savestate_thumbnail_enable; 787 bool save_file_compression; 788 bool savestate_file_compression; 789 bool network_cmd_enable; 790 bool stdin_cmd_enable; 791 bool keymapper_enable; 792 bool network_remote_enable; 793 bool network_remote_enable_user[MAX_USERS]; 794 bool load_dummy_on_core_shutdown; 795 bool check_firmware_before_loading; 796 bool core_info_cache_enable; 797 #ifndef HAVE_DYNAMIC 798 bool always_reload_core_on_run_content; 799 #endif 800 801 bool game_specific_options; 802 bool auto_overrides_enable; 803 bool auto_remaps_enable; 804 bool global_core_options; 805 bool auto_shaders_enable; 806 807 bool sort_savefiles_enable; 808 bool sort_savestates_enable; 809 bool sort_savefiles_by_content_enable; 810 bool sort_savestates_by_content_enable; 811 bool sort_screenshots_by_content_enable; 812 bool config_save_on_exit; 813 bool show_hidden_files; 814 bool use_last_start_directory; 815 816 bool savefiles_in_content_dir; 817 bool savestates_in_content_dir; 818 bool screenshots_in_content_dir; 819 bool systemfiles_in_content_dir; 820 bool ssh_enable; 821 bool samba_enable; 822 bool bluetooth_enable; 823 bool localap_enable; 824 825 bool video_window_show_decorations; 826 bool video_window_save_positions; 827 828 bool sustained_performance_mode; 829 bool playlist_use_old_format; 830 bool playlist_compression; 831 bool content_runtime_log; 832 bool content_runtime_log_aggregate; 833 834 bool playlist_sort_alphabetical; 835 bool playlist_show_sublabels; 836 bool playlist_show_entry_idx; 837 bool playlist_fuzzy_archive_match; 838 bool playlist_portable_paths; 839 840 bool quit_press_twice; 841 bool vibrate_on_keypress; 842 bool enable_device_vibration; 843 bool ozone_collapse_sidebar; 844 bool ozone_truncate_playlist_name; 845 bool ozone_sort_after_truncate_playlist_name; 846 bool ozone_scroll_content_metadata; 847 848 bool log_to_file; 849 bool log_to_file_timestamp; 850 851 bool scan_without_core_match; 852 853 bool ai_service_enable; 854 bool ai_service_pause; 855 } bools; 856 857 } settings_t; 858 859 /** 860 * config_get_default_camera: 861 * 862 * Gets default camera driver. 863 * 864 * Returns: Default camera driver. 865 **/ 866 const char *config_get_default_camera(void); 867 868 /** 869 * config_get_default_bluetooth: 870 * 871 * Gets default bluetooth driver. 872 * 873 * Returns: Default bluetooth driver. 874 **/ 875 const char *config_get_default_bluetooth(void); 876 877 /** 878 * config_get_default_wifi: 879 * 880 * Gets default wifi driver. 881 * 882 * Returns: Default wifi driver. 883 **/ 884 const char *config_get_default_wifi(void); 885 886 /** 887 * config_get_default_location: 888 * 889 * Gets default location driver. 890 * 891 * Returns: Default location driver. 892 **/ 893 const char *config_get_default_location(void); 894 895 /** 896 * config_get_default_video: 897 * 898 * Gets default video driver. 899 * 900 * Returns: Default video driver. 901 **/ 902 const char *config_get_default_video(void); 903 904 /** 905 * config_get_default_audio: 906 * 907 * Gets default audio driver. 908 * 909 * Returns: Default audio driver. 910 **/ 911 const char *config_get_default_audio(void); 912 913 /** 914 * config_get_default_audio_resampler: 915 * 916 * Gets default audio resampler driver. 917 * 918 * Returns: Default audio resampler driver. 919 **/ 920 const char *config_get_default_audio_resampler(void); 921 922 /** 923 * config_get_default_input: 924 * 925 * Gets default input driver. 926 * 927 * Returns: Default input driver. 928 **/ 929 const char *config_get_default_input(void); 930 931 /** 932 * config_get_default_joypad: 933 * 934 * Gets default input joypad driver. 935 * 936 * Returns: Default input joypad driver. 937 **/ 938 const char *config_get_default_joypad(void); 939 940 /** 941 * config_get_default_menu: 942 * 943 * Gets default menu driver. 944 * 945 * Returns: Default menu driver. 946 **/ 947 const char *config_get_default_menu(void); 948 949 const char *config_get_default_midi(void); 950 const char *config_get_midi_driver_options(void); 951 952 const char *config_get_default_record(void); 953 954 #ifdef HAVE_CONFIGFILE 955 /** 956 * config_load_override: 957 * 958 * Tries to append game-specific and core-specific configuration. 959 * These settings will always have precedence, thus this feature 960 * can be used to enforce overrides. 961 * 962 * Returns: false if there was an error or no action was performed. 963 * 964 */ 965 bool config_load_override(void *data); 966 967 /** 968 * config_unload_override: 969 * 970 * Unloads configuration overrides if overrides are active. 971 * 972 * 973 * Returns: false if there was an error. 974 */ 975 bool config_unload_override(void); 976 977 /** 978 * config_load_remap: 979 * 980 * Tries to append game-specific and core-specific remap files. 981 * 982 * Returns: false if there was an error or no action was performed. 983 * 984 */ 985 bool config_load_remap(const char *directory_input_remapping, 986 void *data); 987 988 /** 989 * config_save_autoconf_profile: 990 * @device_name : Input device name 991 * @user : Controller number to save 992 * Writes a controller autoconf file to disk. 993 **/ 994 bool config_save_autoconf_profile(const char *device_name, unsigned user); 995 996 /** 997 * config_save_file: 998 * @path : Path that shall be written to. 999 * 1000 * Writes a config file to disk. 1001 * 1002 * Returns: true (1) on success, otherwise returns false (0). 1003 **/ 1004 bool config_save_file(const char *path); 1005 1006 /** 1007 * config_save_overrides: 1008 * @path : Path that shall be written to. 1009 * 1010 * Writes a config file override to disk. 1011 * 1012 * Returns: true (1) on success, otherwise returns false (0). 1013 **/ 1014 bool config_save_overrides(enum override_type type, void *data); 1015 1016 /* Replaces currently loaded configuration file with 1017 * another one. Will load a dummy core to flush state 1018 * properly. */ 1019 bool config_replace(bool config_save_on_exit, char *path); 1020 #endif 1021 1022 bool config_overlay_enable_default(void); 1023 1024 void config_set_defaults(void *data); 1025 1026 void config_load(void *data); 1027 1028 #if !defined(HAVE_DYNAMIC) 1029 /* Salamander config file contains a single 1030 * entry (libretro_path), which is linked to 1031 * RARCH_PATH_CORE 1032 * > Used to select which core to load 1033 * when launching a salamander build */ 1034 void config_load_file_salamander(void); 1035 void config_save_file_salamander(void); 1036 #endif 1037 1038 settings_t *config_get_ptr(void); 1039 1040 #ifdef HAVE_LAKKA 1041 const char *config_get_all_timezones(void); 1042 void config_set_timezone(char *timezone); 1043 #endif 1044 1045 RETRO_END_DECLS 1046 1047 #endif 1048