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) 2016-2019 - Brad Parker 5 * 6 * RetroArch is free software: you can redistribute it and/or modify it under the terms 7 * of the GNU General Public License as published by the Free Software Found- 8 * ation, either version 3 of the License, or (at your option) any later version. 9 * 10 * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 12 * PURPOSE. See the GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License along with RetroArch. 15 * If not, see <http://www.gnu.org/licenses/>. 16 */ 17 18 #ifndef __CONFIG_DEF_H 19 #define __CONFIG_DEF_H 20 21 #include <boolean.h> 22 #include <audio/audio_resampler.h> 23 #include "configuration.h" 24 #include "gfx/video_defines.h" 25 #include "input/input_driver.h" 26 27 #ifdef HAVE_CONFIG_H 28 #include "config.h" 29 #endif 30 31 #ifdef HAVE_NETWORKING 32 #include "network/netplay/netplay.h" 33 #endif 34 35 /* Required for 3DS display mode setting */ 36 #if defined(_3DS) 37 #include "gfx/common/ctr_common.h" 38 #endif 39 40 /* Required for OpenDingux IPU filter + refresh 41 * rate settings */ 42 #if defined(DINGUX) 43 #include "dingux/dingux_utils.h" 44 #endif 45 46 /* Required for menu screensaver animation */ 47 #if defined(HAVE_MATERIALUI) || defined(HAVE_XMB) || defined(HAVE_OZONE) 48 #include "menu/menu_screensaver.h" 49 #endif 50 51 /* Required for 'show inputs on overlay' setting */ 52 #if defined(HAVE_OVERLAY) 53 #include "../input/input_overlay.h" 54 #endif 55 56 #if defined(HW_RVL) 57 #define MAX_GAMMA_SETTING 30 58 #elif defined(GEKKO) 59 #define MAX_GAMMA_SETTING 2 60 #else 61 #define MAX_GAMMA_SETTING 1 62 #endif 63 64 #if defined(XENON) || defined(_XBOX360) || defined(__PSL1GHT__) || defined(__PS3__) 65 #define DEFAULT_ASPECT_RATIO 1.7778f 66 #elif defined(_XBOX1) || defined(GEKKO) || defined(ANDROID) 67 #define DEFAULT_ASPECT_RATIO 1.3333f 68 #else 69 #define DEFAULT_ASPECT_RATIO -1.0f 70 #endif 71 72 #if defined(GEKKO) 73 #define DEFAULT_MOUSE_SCALE 1 74 #endif 75 76 #define DEFAULT_TOUCH_SCALE 1 77 78 #if defined(RARCH_MOBILE) || defined(HAVE_LIBNX) || defined(__WINRT__) 79 #define DEFAULT_POINTER_ENABLE true 80 #else 81 #define DEFAULT_POINTER_ENABLE false 82 #endif 83 84 /* Certain platforms might have assets stored in the bundle that 85 * we need to extract to a user-writable directory on first boot. 86 * 87 * Examples include: Android, iOS/OSX) */ 88 #if defined(ANDROID) || defined(__APPLE__) 89 #define DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE true 90 #else 91 #define DEFAULT_BUNDLE_ASSETS_EXTRACT_ENABLE false 92 #endif 93 94 #ifdef HAVE_MATERIALUI 95 /* Show icons to the left of each menu entry */ 96 #define DEFAULT_MATERIALUI_ICONS_ENABLE true 97 /* Show system-specific icons in the playlists tab */ 98 #define DEFAULT_MATERIALUI_PLAYLIST_ICONS_ENABLE true 99 #endif 100 101 /* Material UI colour theme */ 102 #define DEFAULT_MATERIALUI_THEME MATERIALUI_THEME_OZONE_DARK 103 104 /* Type of animation to use when performing menu transitions 105 * > 'Auto' follows Material UI standards: 106 * - Slide when switching between parent menus (tabs) 107 * - Fade when changing levels in a menu 108 * Note: Not wrapping this with a HAVE_MATERIALUI ifdef 109 * because there's too much baggage involved... */ 110 #define DEFAULT_MATERIALUI_TRANSITION_ANIM MATERIALUI_TRANSITION_ANIM_AUTO 111 112 /* Adjust menu padding etc. to better fit the 113 * screen when using landscape layouts */ 114 #if defined(RARCH_MOBILE) 115 #define DEFAULT_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_DISABLED 116 #else 117 #define DEFAULT_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_ALWAYS 118 #endif 119 120 /* Show/hide navigation bar 121 * > When hidden, MaterialUI menu navigation 122 * behaves like RGUI */ 123 #define DEFAULT_MATERIALUI_SHOW_NAV_BAR true 124 125 /* Reposition navigation bar to make better use 126 * of screen space when using landscape layouts */ 127 #define DEFAULT_MATERIALUI_AUTO_ROTATE_NAV_BAR true 128 129 /* Default portrait/landscape playlist view modes 130 * (when thumbnails are enabled) */ 131 #define DEFAULT_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_SMALL 132 #define DEFAULT_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_MEDIUM 133 134 /* Enable second thumbnail when using 'list view' 135 * thumbnail views 136 * Note: Second thumbnail will only be drawn if 137 * display has sufficient horizontal real estate */ 138 #if defined(RARCH_MOBILE) 139 #define DEFAULT_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE false 140 #else 141 #define DEFAULT_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE true 142 #endif 143 144 /* Draw solid colour 4:3 background when rendering 145 * thumbnails 146 * > Helps to unify menu appearance when viewing 147 * thumbnails of different sizes */ 148 #define DEFAULT_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE true 149 150 #define DEFAULT_SCREEN_BRIGHTNESS 100 151 152 #define DEFAULT_CRT_SWITCH_RESOLUTION CRT_SWITCH_NONE 153 154 #define DEFAULT_CRT_SWITCH_RESOLUTION_SUPER 2560 155 156 #define DEFAULT_CRT_SWITCH_CENTER_ADJUST 0 157 158 #define DEFAULT_CRT_SWITCH_PORCH_ADJUST 0 159 160 #define DEFAULT_CRT_SWITCH_HIRES_MENU true 161 162 #define DEFAULT_HISTORY_LIST_ENABLE true 163 164 #define DEFAULT_PLAYLIST_ENTRY_RENAME true 165 166 #define DEFAULT_WIFI_ENABLE true 167 168 #define DEFAULT_ACCESSIBILITY_ENABLE false 169 170 #define DEFAULT_ACCESSIBILITY_NARRATOR_SPEECH_SPEED 5 171 172 #define DEFAULT_DRIVER_SWITCH_ENABLE true 173 174 #define DEFAULT_USER_LANGUAGE 0 175 176 #if (defined(_WIN32) && !defined(_XBOX)) || (defined(__linux) && !defined(ANDROID) && !defined(HAVE_LAKKA)) || (defined(__MACH__) && !defined(IOS)) || defined(EMSCRIPTEN) 177 #define DEFAULT_MOUSE_ENABLE true 178 #else 179 #define DEFAULT_MOUSE_ENABLE false 180 #endif 181 182 #ifdef HAVE_CHEEVOS 183 #define DEFAULT_CHEEVOS_ENABLE false 184 #endif 185 186 /* VIDEO */ 187 188 #if defined(_XBOX360) 189 #define DEFAULT_GAMMA 1 190 #else 191 #define DEFAULT_GAMMA 0 192 #endif 193 194 /* Windowed 195 * Real x resolution = aspect * base_size * x scale 196 * Real y resolution = base_size * y scale 197 */ 198 #define DEFAULT_SCALE (3.0) 199 200 /* Fullscreen */ 201 202 /* To start in Fullscreen, or not. */ 203 204 #if defined(HAVE_STEAM) || defined(DINGUX) || defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP 205 /* Start in fullscreen mode for Steam and Dingux 206 * WinRT and Winapi Family builds */ 207 #define DEFAULT_FULLSCREEN true 208 #else 209 #define DEFAULT_FULLSCREEN false 210 #endif 211 212 /* To use windowed mode or not when going fullscreen. */ 213 #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP 214 /* Do not use windowed mode for WinRT and Winapi Family builds on the Xbox UWP with fixed resolution shrinks the image into the left top corner of the screen with some libretro cores */ 215 #define DEFAULT_WINDOWED_FULLSCREEN false 216 #else 217 #define DEFAULT_WINDOWED_FULLSCREEN true 218 #endif 219 220 /* Which monitor to prefer. 0 is any monitor, 1 and up selects 221 * specific monitors, 1 being the first monitor. */ 222 #define DEFAULT_MONITOR_INDEX 0 223 224 /* Window */ 225 /* Window size. A value of 0 uses window scale 226 * multiplied by the core framebuffer size. */ 227 #define DEFAULT_WINDOW_WIDTH 1280 228 #define DEFAULT_WINDOW_HEIGHT 720 229 230 /* Fullscreen resolution. A value of 0 uses the desktop 231 * resolution. */ 232 #if defined(DINGUX) 233 #define DEFAULT_FULLSCREEN_X 320 234 #define DEFAULT_FULLSCREEN_Y 240 235 #elif defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP 236 #define DEFAULT_FULLSCREEN_X 1920 237 #define DEFAULT_FULLSCREEN_Y 1080 238 #else 239 #define DEFAULT_FULLSCREEN_X 0 240 #define DEFAULT_FULLSCREEN_Y 0 241 #endif 242 243 /* Force 4k resolution */ 244 #define DEFAULT_FORCE_RESOLUTION false 245 246 /* Number of threads to use for video recording */ 247 #define DEFAULT_VIDEO_RECORD_THREADS 2 248 249 /* Amount of transparency to use for the main window. 250 * 1 is the most transparent while 100 is opaque. 251 */ 252 #define DEFAULT_WINDOW_OPACITY 100 253 254 /* Whether to show the usual window decorations like border, titlebar etc. */ 255 #define DEFAULT_WINDOW_DECORATIONS true 256 257 #if defined(RARCH_CONSOLE) || defined(__APPLE__) 258 #define DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN false 259 #else 260 #define DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN true 261 #endif 262 #define DEFAULT_CHECK_FIRMWARE_BEFORE_LOADING false 263 264 /* Specifies whether to cache core info 265 * into a single (compressed) file for improved 266 * load times on platforms with slow IO */ 267 #define DEFAULT_CORE_INFO_CACHE_ENABLE true 268 269 /* Specifies whether to 'reload' (fork and quit) 270 * RetroArch when launching content with the 271 * currently loaded core 272 * > Only relevant on platforms without dynamic core 273 * loading support 274 * > Setting this to 'false' will decrease loading 275 * times when required core is already running, 276 * but may cause stability issues (if core misbehaves) */ 277 #ifndef HAVE_DYNAMIC 278 #define DEFAULT_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT true 279 #endif 280 281 /* Forcibly disable composition. 282 * Only valid on Windows Vista/7/8 for now. */ 283 #define DEFAULT_DISABLE_COMPOSITION false 284 285 /* Video VSYNC (recommended) */ 286 #define DEFAULT_VSYNC true 287 288 #define DEFAULT_MAX_SWAPCHAIN_IMAGES 3 289 290 #define DEFAULT_ADAPTIVE_VSYNC false 291 292 /* Attempts to hard-synchronize CPU and GPU. 293 * Can reduce latency at cost of performance. */ 294 #define DEFAULT_HARD_SYNC false 295 296 /* Configures how many frames the GPU can run ahead of CPU. 297 * 0: Syncs to GPU immediately. 298 * 1: Syncs to previous frame. 299 * 2: Etc ... 300 */ 301 #define DEFAULT_HARD_SYNC_FRAMES 0 302 303 /* Sets how many milliseconds to delay after VSync before running the core. 304 * Can reduce latency at cost of higher risk of stuttering. 305 */ 306 #define DEFAULT_FRAME_DELAY 0 307 #define MAXIMUM_FRAME_DELAY 19 308 309 /* Inserts black frame(s) inbetween frames. 310 * Useful for Higher Hz monitors (set to multiples of 60 Hz) who want to play 60 Hz 311 * material with eliminated ghosting. video_refresh_rate should still be configured 312 * as if it is a 60 Hz monitor (divide refresh rate by multiple of 60 Hz). 313 */ 314 #define DEFAULT_BLACK_FRAME_INSERTION 0 315 316 317 /* Uses a custom swap interval for VSync. 318 * Set this to effectively halve monitor refresh rate. 319 */ 320 #define DEFAULT_SWAP_INTERVAL 1 321 322 /* Threaded video. Will possibly increase performance significantly 323 * at the cost of worse synchronization and latency. 324 */ 325 #if defined(HAVE_LIBNX) || defined(ANDROID) 326 #define DEFAULT_VIDEO_THREADED true 327 #else 328 #define DEFAULT_VIDEO_THREADED false 329 #endif 330 331 #if defined(HAVE_THREADS) 332 #if defined(GEKKO) || defined(PSP) || defined(PS2) 333 /* For single-core consoles right now it's best to have this be disabled. */ 334 #define DEFAULT_THREADED_DATA_RUNLOOP_ENABLE false 335 #else 336 #define DEFAULT_THREADED_DATA_RUNLOOP_ENABLE true 337 #endif 338 #else 339 #define DEFAULT_THREADED_DATA_RUNLOOP_ENABLE false 340 #endif 341 342 /* Set to true if HW render cores should get their private context. */ 343 #define DEFAULT_VIDEO_SHARED_CONTEXT false 344 345 /* Sets GC/Wii screen width. */ 346 #define DEFAULT_VIDEO_VI_WIDTH 640 347 348 #ifdef GEKKO 349 /* Removes 480i flicker, smooths picture a little. */ 350 #define DEFAULT_VIDEO_VFILTER true 351 352 /* Allow overscan to be corrected on displays that 353 * do not have proper 'pixel perfect' scaling */ 354 #define DEFAULT_VIDEO_OVERSCAN_CORRECTION_TOP 0 355 #define DEFAULT_VIDEO_OVERSCAN_CORRECTION_BOTTOM 0 356 #endif 357 358 /* Smooths picture. */ 359 #if defined(_3DS) || defined(GEKKO) || defined(HW_RVL) || defined(PSP) || defined(VITA) || defined(SN_TARGET_PSP2) || defined(PS2) || defined(_XBOX) || defined(DINGUX) 360 #define DEFAULT_VIDEO_SMOOTH true 361 #else 362 #define DEFAULT_VIDEO_SMOOTH false 363 #endif 364 365 /* Graphics context specific scaling */ 366 #define DEFAULT_VIDEO_CTX_SCALING false 367 368 /* On resize and fullscreen, rendering area will stay 4:3 */ 369 #define DEFAULT_FORCE_ASPECT true 370 371 /* Only applies to Android 9.0 (API 28) and up */ 372 /* Choose if the screen will be able to write around the notch or not */ 373 #define DEFAULT_NOTCH_WRITE_OVER_ENABLE false 374 375 /* Enable use of shaders. */ 376 #ifdef RARCH_CONSOLE 377 #define DEFAULT_SHADER_ENABLE true 378 #else 379 #define DEFAULT_SHADER_ENABLE false 380 #endif 381 382 /* When presets are saved they will be saved using the #reference 383 * directive by default */ 384 #define DEFAULT_VIDEO_SHADER_PRESET_SAVE_REFERENCE_ENABLE true 385 386 #define DEFAULT_SHADER_DELAY 0 387 388 /* Only scale in integer steps. 389 * The base size depends on system-reported geometry and aspect ratio. 390 * If video_force_aspect is not set, X/Y will be integer scaled independently. 391 * Overscale rounds up instead of down, default is downscale. 392 */ 393 #define DEFAULT_SCALE_INTEGER false 394 #define DEFAULT_SCALE_INTEGER_OVERSCALE false 395 396 /* Controls aspect ratio handling. */ 397 398 /* 1:1 PAR */ 399 #define DEFAULT_ASPECT_RATIO_AUTO false 400 401 #if defined(_XBOX360) || defined(__PS3__) 402 #define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_16_9 403 #elif defined(PSP) || defined(_3DS) || defined(HAVE_LIBNX) || defined(VITA) 404 #define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE 405 #elif defined(RARCH_CONSOLE) 406 #define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_4_3 407 #else 408 #define DEFAULT_ASPECT_RATIO_IDX ASPECT_RATIO_CORE 409 #endif 410 411 #if defined(DINGUX) 412 /* Enables aspect ratio correction (1:1 PAR) when 413 * using the IPU hardware scaler in Dingux devices */ 414 #define DEFAULT_DINGUX_IPU_KEEP_ASPECT true 415 /* Sets image filtering method when using the 416 * IPU hardware scaler in Dingux devices */ 417 #define DEFAULT_DINGUX_IPU_FILTER_TYPE DINGUX_IPU_FILTER_BICUBIC 418 #if defined(DINGUX_BETA) 419 /* Sets refresh rate of integral LCD panel 420 * in Dingux devices */ 421 #define DEFAULT_DINGUX_REFRESH_RATE DINGUX_REFRESH_RATE_60HZ 422 #endif 423 #if defined(RS90) 424 /* Sets image filtering method on the RS90 425 * when integer scaling is disabled */ 426 #define DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE DINGUX_RS90_SOFTFILTER_POINT 427 #endif 428 #endif 429 430 /* Save configuration file on exit. */ 431 #define DEFAULT_CONFIG_SAVE_ON_EXIT true 432 433 #define DEFAULT_SHOW_HIDDEN_FILES false 434 435 /* Initialise file browser with the last used start directory */ 436 #define DEFAULT_USE_LAST_START_DIRECTORY false 437 438 #define DEFAULT_OVERLAY_HIDE_IN_MENU true 439 440 /* Automatically disable overlays when a 441 * controller is connected in port 1 */ 442 #define DEFAULT_OVERLAY_HIDE_WHEN_GAMEPAD_CONNECTED false 443 444 #define DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR true 445 446 #define DEFAULT_DISPLAY_KEYBOARD_OVERLAY false 447 448 #ifdef HAKCHI 449 #define DEFAULT_INPUT_OVERLAY_OPACITY 0.5f 450 #else 451 #define DEFAULT_INPUT_OVERLAY_OPACITY 0.7f 452 #endif 453 454 #define DEFAULT_INPUT_OVERLAY_SCALE_LANDSCAPE 1.0f 455 #define DEFAULT_INPUT_OVERLAY_ASPECT_ADJUST_LANDSCAPE 0.0f 456 #define DEFAULT_INPUT_OVERLAY_X_SEPARATION_LANDSCAPE 0.0f 457 #define DEFAULT_INPUT_OVERLAY_Y_SEPARATION_LANDSCAPE 0.0f 458 #define DEFAULT_INPUT_OVERLAY_X_OFFSET_LANDSCAPE 0.0f 459 #define DEFAULT_INPUT_OVERLAY_Y_OFFSET_LANDSCAPE 0.0f 460 461 #define DEFAULT_INPUT_OVERLAY_SCALE_PORTRAIT 1.0f 462 #define DEFAULT_INPUT_OVERLAY_ASPECT_ADJUST_PORTRAIT 0.0f 463 #define DEFAULT_INPUT_OVERLAY_X_SEPARATION_PORTRAIT 0.0f 464 #define DEFAULT_INPUT_OVERLAY_Y_SEPARATION_PORTRAIT 0.0f 465 #define DEFAULT_INPUT_OVERLAY_X_OFFSET_PORTRAIT 0.0f 466 #define DEFAULT_INPUT_OVERLAY_Y_OFFSET_PORTRAIT 0.0f 467 468 #if defined(RARCH_MOBILE) 469 #define DEFAULT_OVERLAY_AUTO_ROTATE true 470 #else 471 #define DEFAULT_OVERLAY_AUTO_ROTATE false 472 #endif 473 474 #if defined(RARCH_MOBILE) 475 #define DEFAULT_INPUT_OVERLAY_AUTO_SCALE true 476 #else 477 #define DEFAULT_INPUT_OVERLAY_AUTO_SCALE false 478 #endif 479 480 #include "runtime_file.h" 481 #ifdef HAVE_MENU 482 #include "menu/menu_driver.h" 483 484 #ifdef HAVE_LIBNX 485 #define DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME true 486 #else 487 #define DEFAULT_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME false 488 #endif 489 490 #ifdef HAVE_OZONE 491 /* Ozone colour theme: 1 == Basic Black */ 492 #define DEFAULT_OZONE_COLOR_THEME 1 493 #define DEFAULT_OZONE_COLLAPSE_SIDEBAR false 494 #define DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME true 495 #define DEFAULT_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME true 496 #define DEFAULT_OZONE_SCROLL_CONTENT_METADATA false 497 #endif 498 499 #define DEFAULT_SETTINGS_SHOW_DRIVERS true 500 501 #define DEFAULT_SETTINGS_SHOW_VIDEO true 502 503 #define DEFAULT_SETTINGS_SHOW_AUDIO true 504 505 #define DEFAULT_SETTINGS_SHOW_INPUT true 506 507 #define DEFAULT_SETTINGS_SHOW_LATENCY true 508 509 #define DEFAULT_SETTINGS_SHOW_CORE true 510 511 #define DEFAULT_SETTINGS_SHOW_CONFIGURATION true 512 513 #define DEFAULT_SETTINGS_SHOW_SAVING true 514 515 #define DEFAULT_SETTINGS_SHOW_LOGGING true 516 517 #define DEFAULT_SETTINGS_SHOW_FILE_BROWSER true 518 519 #define DEFAULT_SETTINGS_SHOW_FRAME_THROTTLE true 520 521 #define DEFAULT_SETTINGS_SHOW_RECORDING true 522 523 #define DEFAULT_SETTINGS_SHOW_ONSCREEN_DISPLAY true 524 525 #define DEFAULT_SETTINGS_SHOW_USER_INTERFACE true 526 527 #define DEFAULT_SETTINGS_SHOW_AI_SERVICE true 528 529 #define DEFAULT_SETTINGS_SHOW_ACCESSIBILITY true 530 531 #define DEFAULT_SETTINGS_SHOW_POWER_MANAGEMENT true 532 533 #define DEFAULT_SETTINGS_SHOW_ACHIEVEMENTS true 534 535 #define DEFAULT_SETTINGS_SHOW_NETWORK true 536 537 #define DEFAULT_SETTINGS_SHOW_PLAYLISTS true 538 539 #define DEFAULT_SETTINGS_SHOW_USER true 540 541 #define DEFAULT_SETTINGS_SHOW_DIRECTORY true 542 543 #define DEFAULT_QUICK_MENU_SHOW_RESUME_CONTENT true 544 545 #define DEFAULT_QUICK_MENU_SHOW_RESTART_CONTENT true 546 547 #define DEFAULT_QUICK_MENU_SHOW_CLOSE_CONTENT true 548 549 #define DEFAULT_QUICK_MENU_SHOW_TAKE_SCREENSHOT true 550 551 #define DEFAULT_QUICK_MENU_SHOW_SAVE_LOAD_STATE true 552 553 #define DEFAULT_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE true 554 555 static const bool quick_menu_show_add_to_favorites = true; 556 static const bool quick_menu_show_start_recording = true; 557 static const bool quick_menu_show_start_streaming = true; 558 static const bool quick_menu_show_set_core_association = true; 559 static const bool quick_menu_show_reset_core_association = true; 560 static const bool quick_menu_show_options = true; 561 static const bool quick_menu_show_controls = true; 562 static const bool quick_menu_show_cheats = true; 563 static const bool quick_menu_show_shaders = true; 564 static const bool quick_menu_show_information = true; 565 static const bool quick_menu_show_recording = true; 566 static const bool quick_menu_show_streaming = true; 567 568 static const bool quick_menu_show_save_core_overrides = true; 569 static const bool quick_menu_show_save_game_overrides = true; 570 static const bool quick_menu_show_save_content_dir_overrides = true; 571 572 #ifdef HAVE_NETWORKING 573 static const bool quick_menu_show_download_thumbnails = true; 574 #endif 575 576 #define DEFAULT_KIOSK_MODE_ENABLE false 577 578 #define DEFAULT_MENU_HORIZONTAL_ANIMATION true 579 580 static const bool menu_show_online_updater = true; 581 static const bool menu_show_load_core = true; 582 static const bool menu_show_load_content = true; 583 #ifdef HAVE_CDROM 584 static const bool menu_show_load_disc = true; 585 static const bool menu_show_dump_disc = true; 586 #endif 587 static const bool menu_show_information = true; 588 static const bool menu_show_configurations = true; 589 static const bool menu_show_help = true; 590 static const bool menu_show_quit_retroarch = true; 591 static const bool menu_show_restart_retroarch = true; 592 static const bool menu_show_reboot = true; 593 static const bool menu_show_shutdown = true; 594 #if defined(HAVE_LAKKA) || defined(VITA) 595 static const bool menu_show_core_updater = false; 596 #else 597 static const bool menu_show_core_updater = true; 598 #endif 599 static const bool menu_show_legacy_thumbnail_updater = false; 600 static const bool menu_show_sublabels = true; 601 static const bool menu_dynamic_wallpaper_enable = true; 602 static const bool menu_scroll_fast = false; 603 604 #define DEFAULT_MENU_SCROLL_DELAY 256 605 606 #define DEFAULT_MENU_TICKER_TYPE (TICKER_TYPE_LOOP) 607 static const float menu_ticker_speed = 2.0f; 608 609 #define DEFAULT_MENU_TICKER_SMOOTH true 610 611 #if defined(HAVE_THREADS) 612 static const bool menu_savestate_resume = true; 613 #else 614 static const bool menu_savestate_resume = false; 615 #endif 616 617 #define DEFAULT_MENU_INSERT_DISK_RESUME true 618 619 #define DEFAULT_QUIT_ON_CLOSE_CONTENT QUIT_ON_CLOSE_CONTENT_DISABLED 620 621 /* While the menu is active, supported drivers 622 * will display a screensaver after SCREENSAVER_TIMEOUT 623 * seconds of inactivity. A timeout of zero disables 624 * the screensaver */ 625 #define DEFAULT_MENU_SCREENSAVER_TIMEOUT 0 626 627 #if defined(HAVE_MATERIALUI) || defined(HAVE_XMB) || defined(HAVE_OZONE) 628 /* When menu screensaver is enabled, specifies 629 * animation effect and animation speed */ 630 #define DEFAULT_MENU_SCREENSAVER_ANIMATION MENU_SCREENSAVER_BLANK 631 #define DEFAULT_MENU_SCREENSAVER_ANIMATION_SPEED 1.0f 632 #endif 633 634 static const bool content_show_settings = true; 635 static const bool content_show_favorites = true; 636 #ifdef HAVE_IMAGEVIEWER 637 static const bool content_show_images = true; 638 #endif 639 static const bool content_show_music = true; 640 #if defined(HAVE_FFMPEG) || defined(HAVE_MPV) 641 static const bool content_show_video = true; 642 #endif 643 #if defined(HAVE_NETWORKING) 644 #if defined(_3DS) 645 static const bool content_show_netplay = false; 646 #else 647 static const bool content_show_netplay = true; 648 #endif 649 #endif 650 static const bool content_show_history = true; 651 652 /* Specifies 'add content' visibility when using 653 * menus WITH a dedicated 'Import Content' tab */ 654 #define DEFAULT_MENU_CONTENT_SHOW_ADD true 655 /* Specifies 'add content' visibility when using 656 * menus WITHOUT a dedicated 'Import Content' tab */ 657 #define DEFAULT_MENU_CONTENT_SHOW_ADD_ENTRY MENU_ADD_CONTENT_ENTRY_DISPLAY_PLAYLISTS_TAB 658 659 static const bool content_show_playlists = true; 660 #if defined(HAVE_LIBRETRODB) 661 #define DEFAULT_MENU_CONTENT_SHOW_EXPLORE true 662 #endif 663 664 #ifdef HAVE_XMB 665 #define DEFAULT_XMB_ANIMATION 0 666 667 static const unsigned xmb_alpha_factor = 75; 668 static const unsigned menu_font_color_red = 255; 669 static const unsigned menu_font_color_green = 255; 670 static const unsigned menu_font_color_blue = 255; 671 #ifdef HAVE_ODROIDGO2 672 static const unsigned xmb_menu_layout = 2; 673 #else 674 static const unsigned xmb_menu_layout = 0; 675 #endif 676 static const unsigned xmb_icon_theme = XMB_ICON_THEME_MONOCHROME; 677 static const unsigned xmb_theme = XMB_THEME_ELECTRIC_BLUE; 678 679 #if defined(HAVE_LAKKA) || defined(__arm__) || defined(__PPC64__) || defined(__ppc64__) || defined(__powerpc64__) || defined(__powerpc__) || defined(__ppc__) || defined(__POWERPC__) 680 #define DEFAULT_XMB_SHADOWS_ENABLE false 681 #else 682 #define DEFAULT_XMB_SHADOWS_ENABLE true 683 #endif 684 #endif 685 686 static const float menu_framebuffer_opacity = 0.900; 687 688 static const float menu_wallpaper_opacity = 0.300; 689 690 static const float menu_footer_opacity = 1.000; 691 692 static const float menu_header_opacity = 1.000; 693 694 #if defined(HAVE_OPENGLES2) || (defined(__MACH__) && (defined(__ppc__) || defined(__ppc64__))) 695 #define DEFAULT_MENU_SHADER_PIPELINE 1 696 #else 697 #define DEFAULT_MENU_SHADER_PIPELINE 2 698 #endif 699 700 #define DEFAULT_SHOW_ADVANCED_SETTINGS false 701 702 #define DEFAULT_RGUI_COLOR_THEME RGUI_THEME_CLASSIC_GREEN 703 #define DEFAULT_RGUI_TRANSPARENCY true 704 705 static const bool rgui_inline_thumbnails = false; 706 static const bool rgui_swap_thumbnails = false; 707 static const unsigned rgui_thumbnail_downscaler = RGUI_THUMB_SCALE_POINT; 708 static const unsigned rgui_thumbnail_delay = 0; 709 static const unsigned rgui_internal_upscale_level = RGUI_UPSCALE_NONE; 710 static const bool rgui_full_width_layout = true; 711 static const unsigned rgui_aspect = RGUI_ASPECT_RATIO_4_3; 712 static const unsigned rgui_aspect_lock = RGUI_ASPECT_RATIO_LOCK_NONE; 713 static const bool rgui_shadows = false; 714 static const unsigned rgui_particle_effect = RGUI_PARTICLE_EFFECT_NONE; 715 #define DEFAULT_RGUI_PARTICLE_EFFECT_SPEED 1.0f 716 #define DEFAULT_RGUI_PARTICLE_EFFECT_SCREENSAVER true 717 static const bool rgui_extended_ascii = false; 718 #define DEFAULT_RGUI_SWITCH_ICONS true 719 #endif 720 721 #ifdef HAVE_MENU 722 #define DEFAULT_BLOCK_CONFIG_READ true 723 #else 724 #define DEFAULT_BLOCK_CONFIG_READ false 725 #endif 726 727 /* TODO/FIXME - this setting is thread-unsafe right now and can corrupt the stack - default to off */ 728 #define DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST false 729 730 static const bool default_game_specific_options = true; 731 static const bool default_auto_overrides_enable = true; 732 static const bool default_auto_remaps_enable = true; 733 static const bool default_global_core_options = false; 734 static const bool default_auto_shaders_enable = true; 735 736 static const bool default_sort_savefiles_enable = false; 737 static const bool default_sort_savestates_enable = false; 738 static const bool default_sort_savefiles_by_content_enable = false; 739 static const bool default_sort_savestates_by_content_enable = false; 740 static const bool default_sort_screenshots_by_content_enable = false; 741 742 static const bool default_savestates_in_content_dir = false; 743 static const bool default_savefiles_in_content_dir = false; 744 static const bool default_systemfiles_in_content_dir = false; 745 static const bool default_screenshots_in_content_dir = false; 746 747 #if defined(RS90) 748 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_START_SELECT 749 #elif defined(_XBOX1) || defined(__PS3__) || defined(_XBOX360) || defined(DINGUX) 750 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_L3_R3 751 #elif defined(PS2) || defined(PSP) 752 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_HOLD_START 753 #elif defined(VITA) 754 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_L1_R1_START_SELECT 755 #elif defined(SWITCH) || defined(ORBIS) 756 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_START_SELECT 757 #elif TARGET_OS_TV 758 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_DOWN_Y_L_R 759 #else 760 #define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_NONE 761 #endif 762 763 #if defined(VITA) 764 static const unsigned input_backtouch_enable = false; 765 static const unsigned input_backtouch_toggle = false; 766 #endif 767 768 #define DEFAULT_OVERLAY_ENABLE_AUTOPREFERRED true 769 770 #if defined(HAVE_OVERLAY) 771 #if defined(RARCH_MOBILE) 772 #define DEFAULT_OVERLAY_SHOW_INPUTS OVERLAY_SHOW_INPUT_TOUCHED 773 #else 774 #define DEFAULT_OVERLAY_SHOW_INPUTS OVERLAY_SHOW_INPUT_PHYSICAL 775 #endif 776 #endif 777 778 #define DEFAULT_OVERLAY_SHOW_INPUTS_PORT 0 779 780 #define DEFAULT_ALL_USERS_CONTROL_MENU false 781 782 #if defined(ANDROID) || defined(_WIN32) 783 #define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS true 784 #else 785 #define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS false 786 #endif 787 788 #define DEFAULT_QUIT_PRESS_TWICE true 789 790 #define DEFAULT_LOG_TO_FILE false 791 792 #define DEFAULT_LOG_TO_FILE_TIMESTAMP false 793 794 /* Crop overscanned frames. */ 795 #define DEFAULT_CROP_OVERSCAN true 796 797 /* Font size for on-screen messages. */ 798 #if defined(DINGUX) 799 #define DEFAULT_FONT_SIZE 12 800 #elif defined(PS2) 801 #define DEFAULT_FONT_SIZE 16 802 #else 803 #define DEFAULT_FONT_SIZE 32 804 #endif 805 806 807 /* Offset for where messages will be placed on-screen. 808 * Values are in range [0.0, 1.0]. */ 809 static const float message_pos_offset_x = 0.05; 810 static const float message_pos_offset_y = 0.05; 811 812 /* Color of the message. 813 * RGB hex value. */ 814 static const uint32_t message_color = 0xffff00; 815 816 static const bool message_bgcolor_enable = false; 817 static const uint32_t message_bgcolor_red = 0; 818 static const uint32_t message_bgcolor_green = 0; 819 static const uint32_t message_bgcolor_blue = 0; 820 static const float message_bgcolor_opacity = 1.0f; 821 822 /* Record post-filtered (CPU filter) video, 823 * rather than raw game output. */ 824 #define DEFAULT_POST_FILTER_RECORD false 825 826 /* Screenshots post-shaded GPU output if available. */ 827 #define DEFAULT_GPU_SCREENSHOT true 828 829 /* Watch shader files for changes and auto-apply as necessary. */ 830 #define DEFAULT_VIDEO_SHADER_WATCH_FILES false 831 832 /* Initialise file browser with last used directory 833 * when selecting shader presets/passes via the menu */ 834 #define DEFAULT_VIDEO_SHADER_REMEMBER_LAST_DIR false 835 836 /* Screenshots named automatically. */ 837 #define DEFAULT_AUTO_SCREENSHOT_FILENAME true 838 839 /* Record post-shaded GPU output instead of raw game footage if available. */ 840 #define DEFAULT_GPU_RECORD false 841 842 /* OSD-messages. */ 843 #define DEFAULT_FONT_ENABLE true 844 845 /* The accurate refresh rate of your monitor (Hz). 846 * This is used to calculate audio input rate with the formula: 847 * audio_input_rate = game_input_rate * display_refresh_rate / 848 * game_refresh_rate. 849 * 850 * If the implementation does not report any values, 851 * NTSC defaults will be assumed for compatibility. 852 * This value should stay close to 60Hz to avoid large pitch changes. 853 * If your monitor does not run at 60Hz, or something close to it, 854 * disable VSync, and leave this at its default. */ 855 #ifdef _3DS 856 #define DEFAULT_REFRESH_RATE ((32730.0 * 8192.0) / 4481134.0) 857 #elif defined(RARCH_CONSOLE) 858 #define DEFAULT_REFRESH_RATE (60/1.001) 859 #else 860 #define DEFAULT_REFRESH_RATE (60) 861 #endif 862 #define DEFAULT_CRT_REFRESH_RATE (DEFAULT_REFRESH_RATE) 863 864 /* Allow games to set rotation. If false, rotation requests are 865 * honored, but ignored. 866 * Used for setups where one manually rotates the monitor. */ 867 #define DEFAULT_ALLOW_ROTATE true 868 869 #if defined(_3DS) 870 /* Enable bottom LCD screen */ 871 static const bool video_3ds_lcd_bottom = true; 872 /* Sets video display mode (3D, 2D, etc.) */ 873 static const unsigned video_3ds_display_mode = CTR_VIDEO_MODE_3D; 874 #endif 875 876 /* AUDIO */ 877 878 /* Will enable audio or not. */ 879 #define DEFAULT_AUDIO_ENABLE true 880 881 /* Enable menu audio sounds. */ 882 static const bool audio_enable_menu = false; 883 static const bool audio_enable_menu_ok = false; 884 static const bool audio_enable_menu_cancel = false; 885 static const bool audio_enable_menu_notice = false; 886 static const bool audio_enable_menu_bgm = false; 887 888 #ifdef HAVE_GFX_WIDGETS 889 #define DEFAULT_MENU_ENABLE_WIDGETS true 890 #else 891 #define DEFAULT_MENU_ENABLE_WIDGETS false 892 #endif 893 894 /* Display an animation when loading content 895 * > Currently implemented only as a widget */ 896 #define DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION DEFAULT_MENU_ENABLE_WIDGETS 897 898 /* Display a notification when successfully 899 * connecting/disconnecting an autoconfigured 900 * controller 901 * > Disabled by default on the Switch */ 902 #if defined(HAVE_LIBNX) && defined(HAVE_GFX_WIDGETS) 903 #define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG false 904 #else 905 #define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG true 906 #endif 907 908 /* Display a notification when cheats are being 909 * applied */ 910 #define DEFAULT_NOTIFICATION_SHOW_CHEATS_APPLIED true 911 912 /* Display a notification when applying an 913 * IPS/BPS/UPS patch file */ 914 #define DEFAULT_NOTIFICATION_SHOW_PATCH_APPLIED true 915 916 /* Display a notification when loading an 917 * input remap file */ 918 #define DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD true 919 920 /* Display a notification when loading a 921 * configuration override file */ 922 #define DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD true 923 924 /* Display a notification when automatically restoring 925 * at launch the last used disk of multi-disk content */ 926 #define DEFAULT_NOTIFICATION_SHOW_SET_INITIAL_DISK true 927 928 /* Display a notification when fast forwarding 929 * content */ 930 #define DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD true 931 932 #if defined(HAVE_SCREENSHOTS) 933 /*Display a notification when taking a screenshot*/ 934 #define DEFAULT_NOTIFICATION_SHOW_SCREENSHOT true 935 936 /*Desired duration of the screenshot notification*/ 937 #define DEFAULT_NOTIFICATION_SHOW_SCREENSHOT_DURATION 0 938 939 /* Display a white flashing effect with the desired 940 * duration when taking a screenshot*/ 941 #define DEFAULT_NOTIFICATION_SHOW_SCREENSHOT_FLASH 0 942 #endif 943 944 /* Display a notification when setting the refresh rate*/ 945 #if defined(_3DS) || (defined(DINGUX) && defined(DINGUX_BETA)) 946 /* 3DS and OpenDingux Beta devices set refresh rate 947 * on gfx driver init - set default notification 948 * state to 'false' in order to avoid OSD log spam */ 949 #define DEFAULT_NOTIFICATION_SHOW_REFRESH_RATE false 950 #else 951 #define DEFAULT_NOTIFICATION_SHOW_REFRESH_RATE true 952 #endif 953 954 /* Output samplerate. */ 955 #ifdef GEKKO 956 #define DEFAULT_OUTPUT_RATE 32000 957 #elif defined(_3DS) 958 #define DEFAULT_OUTPUT_RATE 32730 959 #else 960 #define DEFAULT_OUTPUT_RATE 48000 961 #endif 962 963 /* Audio device (e.g. hw:0,0 or /dev/audio). If NULL, will use defaults. */ 964 #define DEFAULT_AUDIO_DEVICE NULL 965 966 /* Desired audio latency in milliseconds. Might not be honored 967 * if driver can't provide given latency. */ 968 #if defined(ANDROID) || defined(EMSCRIPTEN) 969 /* For most Android devices, 64ms is way too low. */ 970 #define DEFAULT_OUT_LATENCY 128 971 #else 972 #define DEFAULT_OUT_LATENCY 64 973 #endif 974 975 /* Will sync audio. (recommended) */ 976 #define DEFAULT_AUDIO_SYNC true 977 978 /* Audio rate control. */ 979 #if !defined(RARCH_CONSOLE) 980 #define DEFAULT_RATE_CONTROL true 981 #else 982 #define DEFAULT_RATE_CONTROL false 983 #endif 984 985 /* Rate control delta. Defines how much rate_control 986 * is allowed to adjust input rate. */ 987 #define DEFAULT_RATE_CONTROL_DELTA 0.005 988 989 /* Maximum timing skew. Defines how much adjust_system_rates 990 * is allowed to adjust input rate. */ 991 #define DEFAULT_MAX_TIMING_SKEW 0.05 992 993 /* Default audio volume in dB. (0.0 dB == unity gain). */ 994 #define DEFAULT_AUDIO_VOLUME 0.0 995 996 /* Default audio volume of the audio mixer in dB. (0.0 dB == unity gain). */ 997 #define DEFAULT_AUDIO_MIXER_VOLUME 0.0 998 999 #ifdef HAVE_WASAPI 1000 /* WASAPI defaults */ 1001 #define DEFAULT_WASAPI_EXCLUSIVE_MODE true 1002 #define DEFAULT_WASAPI_FLOAT_FORMAT false 1003 /* auto */ 1004 #define DEFAULT_WASAPI_SH_BUFFER_LENGTH -16 1005 #endif 1006 1007 /* Automatically mute audio when fast forward 1008 * is enabled */ 1009 #define DEFAULT_AUDIO_FASTFORWARD_MUTE false 1010 1011 /* MISC */ 1012 1013 /* Enables displaying the current frames per second. */ 1014 #define DEFAULT_FPS_SHOW false 1015 1016 /* FPS display will be updated at the set interval (in frames) */ 1017 #define DEFAULT_FPS_UPDATE_INTERVAL 256 1018 1019 /* Memory status display will be updated at the set interval (in frames) */ 1020 #define DEFAULT_MEMORY_UPDATE_INTERVAL 256 1021 1022 /* Enables displaying the current frame count. */ 1023 #define DEFAULT_FRAMECOUNT_SHOW false 1024 1025 /* Includes displaying the current memory usage/total with FPS/Frames. */ 1026 #define DEFAULT_MEMORY_SHOW false 1027 1028 /* Enables displaying various timing statistics. */ 1029 #define DEFAULT_STATISTICS_SHOW false 1030 1031 /* Enables use of rewind. This will incur some memory footprint 1032 * depending on the save state buffer. */ 1033 #define DEFAULT_REWIND_ENABLE false 1034 1035 /* When set, any time a cheat is toggled it is immediately applied. */ 1036 #define DEFAULT_APPLY_CHEATS_AFTER_TOGGLE false 1037 1038 /* When set, all enabled cheats are auto-applied when a game is loaded. */ 1039 #define DEFAULT_APPLY_CHEATS_AFTER_LOAD false 1040 1041 /* The buffer size for the rewind buffer. This needs to be about 1042 * 15-20MB per minute. Very game dependant. */ 1043 #define DEFAULT_REWIND_BUFFER_SIZE (20 << 20) /* 20MiB */ 1044 1045 /* The amount of MB to increase/decrease the rewind_buffer_size when it is changed via the UI. */ 1046 #define DEFAULT_REWIND_BUFFER_SIZE_STEP 10 /* 10MB */ 1047 1048 /* How many frames to rewind at a time. */ 1049 #define DEFAULT_REWIND_GRANULARITY 1 1050 1051 /* Pause gameplay when gameplay loses focus. */ 1052 #ifdef EMSCRIPTEN 1053 #define DEFAULT_PAUSE_NONACTIVE false 1054 #else 1055 #define DEFAULT_PAUSE_NONACTIVE true 1056 #endif 1057 1058 /* Saves non-volatile SRAM at a regular interval. 1059 * It is measured in seconds. A value of 0 disables autosave. */ 1060 #if defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(__x86_64__) || defined(_M_X64) || defined(_WIN32) || defined(OSX) || defined(ANDROID) || defined(IOS) || defined(DINGUX) 1061 /* Flush to file every 10 seconds on modern platforms by default */ 1062 #define DEFAULT_AUTOSAVE_INTERVAL 10 1063 #else 1064 /* Default to disabled on I/O-constrained platforms */ 1065 #define DEFAULT_AUTOSAVE_INTERVAL 0 1066 #endif 1067 1068 /* Publicly announce netplay */ 1069 #define DEFAULT_NETPLAY_PUBLIC_ANNOUNCE true 1070 1071 /* Start netplay in spectator mode */ 1072 static const bool netplay_start_as_spectator = false; 1073 1074 /* Allow connections in slave mode */ 1075 static const bool netplay_allow_slaves = true; 1076 1077 /* Require connections only in slave mode */ 1078 static const bool netplay_require_slaves = false; 1079 1080 /* Netplay without savestates/rewind */ 1081 static const bool netplay_stateless_mode = false; 1082 1083 /* When being client over netplay, use keybinds for 1084 * user 1 rather than user 2. */ 1085 static const bool netplay_client_swap_input = true; 1086 1087 static const bool netplay_nat_traversal = false; 1088 1089 static const unsigned netplay_delay_frames = 16; 1090 1091 static const int netplay_check_frames = 600; 1092 1093 static const bool netplay_use_mitm_server = false; 1094 1095 #define DEFAULT_NETPLAY_MITM_SERVER "nyc" 1096 1097 #ifdef HAVE_NETWORKING 1098 static const unsigned netplay_share_digital = RARCH_NETPLAY_SHARE_DIGITAL_NO_PREFERENCE; 1099 1100 static const unsigned netplay_share_analog = RARCH_NETPLAY_SHARE_ANALOG_NO_PREFERENCE; 1101 #endif 1102 1103 /* On save state load, block SRAM from being overwritten. 1104 * This could potentially lead to buggy games. */ 1105 #define DEFAULT_BLOCK_SRAM_OVERWRITE false 1106 1107 /* When saving savestates, state index is automatically 1108 * incremented before saving. 1109 * When the content is loaded, state index will be set 1110 * to the highest existing value. */ 1111 static const bool savestate_auto_index = false; 1112 1113 /* Specifies the maximum number of savestates to keep 1114 * when savestate auto index is enabled 1115 * > When limit is exceeded, savestate with the lowest 1116 * index will be deleted automatically when creating 1117 * a new savestate 1118 * > Setting value to zero disables the limit (no 1119 * savestates will be deleted in this case) */ 1120 #define DEFAULT_SAVESTATE_MAX_KEEP 0 1121 1122 /* Automatically saves a savestate at the end of RetroArch's lifetime. 1123 * The path is $SRAM_PATH.auto. 1124 * RetroArch will automatically load any savestate with this path on 1125 * startup if savestate_auto_load is set. */ 1126 static const bool savestate_auto_save = false; 1127 static const bool savestate_auto_load = false; 1128 1129 static const bool savestate_thumbnail_enable = false; 1130 1131 /* When creating save (srm) files, compress 1132 * written data */ 1133 #define DEFAULT_SAVE_FILE_COMPRESSION false 1134 1135 /* When creating save state files, compress 1136 * written data */ 1137 #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP 1138 /* TODO/FIXME Apparently this is an issue on UWP for now, so disable it for now */ 1139 #define DEFAULT_SAVESTATE_FILE_COMPRESSION false 1140 #else 1141 #define DEFAULT_SAVESTATE_FILE_COMPRESSION true 1142 #endif 1143 1144 /* Slowmotion ratio. */ 1145 #define DEFAULT_SLOWMOTION_RATIO 3.0 1146 1147 /* Maximum fast forward ratio. */ 1148 #define DEFAULT_FASTFORWARD_RATIO 0.0 1149 1150 /* Enable runloop for variable refresh rate screens. Force x1 speed while handling fast forward too. */ 1151 #define DEFAULT_VRR_RUNLOOP_ENABLE false 1152 1153 /* Run core logic one or more frames ahead then load the state back to reduce perceived input lag. */ 1154 #define DEFAULT_RUN_AHEAD_FRAMES 1 1155 1156 /* When using the Run Ahead feature, use a secondary instance of the core. */ 1157 #define DEFAULT_RUN_AHEAD_SECONDARY_INSTANCE true 1158 1159 /* Hide warning messages when using the Run Ahead feature. */ 1160 #define DEFAULT_RUN_AHEAD_HIDE_WARNINGS false 1161 1162 /* Enable stdin/network command interface. */ 1163 static const bool network_cmd_enable = false; 1164 static const uint16_t network_cmd_port = 55355; 1165 static const bool stdin_cmd_enable = false; 1166 1167 static const uint16_t network_remote_base_port = 55400; 1168 1169 #define DEFAULT_NETWORK_BUILDBOT_AUTO_EXTRACT_ARCHIVE true 1170 #define DEFAULT_NETWORK_BUILDBOT_SHOW_EXPERIMENTAL_CORES false 1171 1172 /* Automatically create a backup whenever a core is 1173 * updated via the online updater 1174 * > Enable by default on all modern platforms with 1175 * online updater support */ 1176 #if defined(HAVE_ONLINE_UPDATER) && (defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(__x86_64__) || defined(_M_X64) || defined(_WIN32) || defined(OSX) || defined(ANDROID) || defined(IOS)) 1177 #define DEFAULT_CORE_UPDATER_AUTO_BACKUP true 1178 #else 1179 #define DEFAULT_CORE_UPDATER_AUTO_BACKUP false 1180 #endif 1181 /* Number of automatic core backups to retain 1182 * (oldest backup will be deleted when creating 1183 * a new one) */ 1184 #define DEFAULT_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE 1 1185 1186 #if defined(ANDROID) || defined(__APPLE__) 1187 #define DEFAULT_NETWORK_ON_DEMAND_THUMBNAILS true 1188 #else 1189 #define DEFAULT_NETWORK_ON_DEMAND_THUMBNAILS false 1190 #endif 1191 1192 /* Number of entries that will be kept in content history playlist file. */ 1193 static const unsigned default_content_history_size = 200; 1194 1195 /* Number of entries that will be kept in content favorites playlist file. 1196 * -1 == 'unlimited' (99999) */ 1197 static const int default_content_favorites_size = 200; 1198 1199 /* Sort all playlists (apart from histories) alphabetically */ 1200 #define DEFAULT_PLAYLIST_SORT_ALPHABETICAL true 1201 1202 /* File format to use when writing playlists to disk */ 1203 #define DEFAULT_PLAYLIST_USE_OLD_FORMAT false 1204 1205 /* When creating/updating playlists, compress written data */ 1206 #define DEFAULT_PLAYLIST_COMPRESSION false 1207 1208 #ifdef HAVE_MENU 1209 /* Specify when to display 'core name' inline on playlist entries */ 1210 #define DEFAULT_PLAYLIST_SHOW_INLINE_CORE_NAME PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV 1211 1212 /* Specifies which runtime record to use on playlist sublabels */ 1213 #define DEFAULT_PLAYLIST_SUBLABEL_RUNTIME_TYPE PLAYLIST_RUNTIME_PER_CORE 1214 1215 /* Specifies time/date display format for runtime 'last played' data */ 1216 #define DEFAULT_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE PLAYLIST_LAST_PLAYED_STYLE_YMD_HMS 1217 1218 #define DEFAULT_PLAYLIST_ENTRY_REMOVE_ENABLE PLAYLIST_ENTRY_REMOVE_ENABLE_ALL 1219 #endif 1220 1221 #define DEFAULT_SCAN_WITHOUT_CORE_MATCH false 1222 1223 #ifdef __WINRT__ 1224 /* Be paranoid about WinRT file I/O performance, and leave this disabled by 1225 * default */ 1226 #define DEFAULT_PLAYLIST_SHOW_SUBLABELS false 1227 #else 1228 #define DEFAULT_PLAYLIST_SHOW_SUBLABELS true 1229 #endif 1230 1231 /* Show the indices of playlist entries in 1232 * a menu-driver-specific fashion */ 1233 #define DEFAULT_PLAYLIST_SHOW_ENTRY_IDX true 1234 1235 #define DEFAULT_PLAYLIST_FUZZY_ARCHIVE_MATCH false 1236 1237 #define DEFAULT_PLAYLIST_PORTABLE_PATHS false 1238 1239 /* Show Menu start-up screen on boot. */ 1240 #define DEFAULT_MENU_SHOW_START_SCREEN true 1241 1242 /* Default scale factor for non-frambuffer-based display 1243 * drivers and display widgets */ 1244 #if defined(VITA) 1245 #define DEFAULT_MENU_SCALE_FACTOR 1.5f 1246 #else 1247 #define DEFAULT_MENU_SCALE_FACTOR 1.0f 1248 #endif 1249 /* Specifies whether display widgets should be scaled 1250 * automatically using the default menu scale factor */ 1251 #define DEFAULT_MENU_WIDGET_SCALE_AUTO true 1252 /* Default scale factor for display widgets when widget 1253 * auto scaling is disabled (fullscreen mode) */ 1254 #define DEFAULT_MENU_WIDGET_SCALE_FACTOR 1.0f 1255 /* Default scale factor for display widgets when widget 1256 * auto scaling is disabled (windowed mode) */ 1257 #define DEFAULT_MENU_WIDGET_SCALE_FACTOR_WINDOWED 1.0f 1258 1259 /* Log level for the frontend */ 1260 #define DEFAULT_FRONTEND_LOG_LEVEL 1 1261 1262 /* Log level for libretro cores (GET_LOG_INTERFACE). */ 1263 #define DEFAULT_LIBRETRO_LOG_LEVEL 1 1264 1265 #ifndef RARCH_DEFAULT_PORT 1266 #define RARCH_DEFAULT_PORT 55435 1267 #endif 1268 1269 #ifndef RARCH_STREAM_DEFAULT_PORT 1270 #define RARCH_STREAM_DEFAULT_PORT 56400 1271 #endif 1272 1273 /* KEYBINDS, JOYPAD */ 1274 1275 /* Axis threshold (between 0.0 and 1.0) 1276 * How far an axis must be tilted to result in a button press. */ 1277 #define DEFAULT_AXIS_THRESHOLD 0.5f 1278 1279 #define DEFAULT_ANALOG_DEADZONE 0.0f 1280 1281 #define DEFAULT_ANALOG_SENSITIVITY 1.0f 1282 1283 /* Describes speed of which turbo-enabled buttons toggle. */ 1284 static const unsigned turbo_period = 6; 1285 static const unsigned turbo_duty_cycle = 3; 1286 static const unsigned turbo_mode = 0; 1287 static const unsigned turbo_default_btn = RETRO_DEVICE_ID_JOYPAD_B; 1288 1289 /* Enable input auto-detection. Will attempt to autoconfigure 1290 * gamepads, plug-and-play style. */ 1291 static const bool input_autodetect_enable = true; 1292 1293 /* Enables accelerometer/gyroscope/illuminance 1294 * sensor input, if supported */ 1295 #if defined(ANDROID) 1296 /* Hardware sensors cause substantial battery 1297 * drain on Android... */ 1298 #define DEFAULT_INPUT_SENSORS_ENABLE false 1299 #else 1300 #define DEFAULT_INPUT_SENSORS_ENABLE true 1301 #endif 1302 1303 /* Automatically enable game focus when running or 1304 * resuming content */ 1305 #define DEFAULT_INPUT_AUTO_GAME_FOCUS AUTO_GAME_FOCUS_OFF 1306 1307 /* Show the input descriptors set by the core instead 1308 * of the default ones. */ 1309 static const bool input_descriptor_label_show = true; 1310 1311 static const bool input_descriptor_hide_unbound = false; 1312 1313 #if defined(DINGUX) 1314 static const unsigned input_max_users = 1; 1315 #else 1316 static const unsigned input_max_users = 5; 1317 #endif 1318 1319 static const unsigned input_poll_type_behavior = 2; 1320 1321 static const unsigned input_bind_timeout = 5; 1322 1323 static const unsigned input_bind_hold = 2; 1324 1325 #define DEFAULT_INPUT_HOTKEY_BLOCK_DELAY 5 1326 1327 static const unsigned gfx_thumbnails_default = 3; 1328 1329 static const unsigned menu_left_thumbnails_default = 0; 1330 1331 static const unsigned gfx_thumbnail_upscale_threshold = 0; 1332 1333 #ifdef HAVE_MENU 1334 #if defined(RS90) 1335 /* The RS-90 has a hardware clock that is neither 1336 * configurable nor persistent, rendering it useless. 1337 * We therefore hide it in the menu by default. */ 1338 #define DEFAULT_MENU_TIMEDATE_ENABLE false 1339 #else 1340 #define DEFAULT_MENU_TIMEDATE_ENABLE true 1341 #endif 1342 #define DEFAULT_MENU_TIMEDATE_STYLE MENU_TIMEDATE_STYLE_DDMM_HM 1343 #define DEFAULT_MENU_TIMEDATE_DATE_SEPARATOR MENU_TIMEDATE_DATE_SEPARATOR_HYPHEN 1344 #endif 1345 1346 static const bool xmb_vertical_thumbnails = false; 1347 1348 static const unsigned xmb_thumbnail_scale_factor = 100; 1349 1350 #ifdef IOS 1351 static const bool ui_companion_start_on_boot = false; 1352 #else 1353 static const bool ui_companion_start_on_boot = true; 1354 #endif 1355 1356 static const bool ui_companion_enable = false; 1357 1358 /* Currently only used to show the WIMP UI on startup */ 1359 static const bool ui_companion_toggle = false; 1360 1361 /* Only init the WIMP UI for this session if this is enabled */ 1362 #define DEFAULT_DESKTOP_MENU_ENABLE true 1363 1364 /* Keep track of how long each core+content has been running for over time */ 1365 1366 #ifdef __WINRT__ 1367 /* Be paranoid about WinRT file I/O performance, and leave this disabled by 1368 * default */ 1369 #define DEFAULT_CONTENT_RUNTIME_LOG false 1370 #else 1371 #define DEFAULT_CONTENT_RUNTIME_LOG true 1372 #endif 1373 1374 /* Keep track of how long each content has been running 1375 * for over time (ignores core) */ 1376 #define DEFAULT_CONTENT_RUNTIME_LOG_AGGREGATE false 1377 1378 #define DEFAULT_UI_MENUBAR_ENABLE true 1379 1380 #if defined(__QNX__) || defined(_XBOX1) || defined(_XBOX360) || (defined(__MACH__) && defined(IOS)) || defined(ANDROID) || defined(WIIU) || defined(HAVE_NEON) || defined(GEKKO) || defined(__ARM_NEON__) || defined(__PS3__) 1381 static const enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWER; 1382 #elif defined(PSP) || defined(_3DS) || defined(VITA) || defined(PS2) || defined(DINGUX) 1383 static const enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWEST; 1384 #else 1385 static const enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_NORMAL; 1386 #endif 1387 1388 /* MIDI */ 1389 #define DEFAULT_MIDI_INPUT "Off" 1390 1391 #define DEFAULT_MIDI_OUTPUT "Off" 1392 1393 static const unsigned midi_volume = 100; 1394 1395 /* Only applies to Android 7.0 (API 24) and up */ 1396 static const bool sustained_performance_mode = false; 1397 1398 static const bool vibrate_on_keypress = false; 1399 static const bool enable_device_vibration = false; 1400 1401 /* Defines the strength of rumble effects 1402 * on OpenDingux devices */ 1403 #if defined(DINGUX) && defined(HAVE_LIBSHAKE) 1404 #define DEFAULT_DINGUX_RUMBLE_GAIN 50 1405 #endif 1406 1407 #ifdef HAVE_VULKAN 1408 #define DEFAULT_VULKAN_GPU_INDEX 0 1409 #endif 1410 1411 #ifdef HAVE_D3D10 1412 #define DEFAULT_D3D10_GPU_INDEX 0 1413 #endif 1414 1415 #ifdef HAVE_D3D11 1416 #define DEFAULT_D3D11_GPU_INDEX 0 1417 #endif 1418 1419 #ifdef HAVE_D3D12 1420 #define DEFAULT_D3D12_GPU_INDEX 0 1421 #endif 1422 1423 #if defined(HAKCHI) 1424 #define DEFAULT_BUILDBOT_SERVER_URL "http://hakchicloud.com/Libretro_Cores/" 1425 #elif defined(ANDROID) 1426 #if defined(ANDROID_ARM_V7) 1427 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/android/latest/armeabi-v7a/" 1428 #elif defined(ANDROID_ARM) 1429 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/android/latest/armeabi/" 1430 #elif defined(ANDROID_AARCH64) 1431 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/android/latest/arm64-v8a/" 1432 #elif defined(ANDROID_X86) 1433 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/android/latest/x86/" 1434 #elif defined(ANDROID_X64) 1435 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/android/latest/x86_64/" 1436 #else 1437 #define DEFAULT_BUILDBOT_SERVER_URL "" 1438 #endif 1439 #elif defined(__QNX__) 1440 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/blackberry/latest/" 1441 #elif defined(IOS) 1442 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/apple/ios/latest/" 1443 #elif defined(OSX) 1444 #if defined(__x86_64__) 1445 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/apple/osx/x86_64/latest/" 1446 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) 1447 #define DEFAULT_BUILDBOT_SERVER_URL "http://bot.libretro.com/nightly/apple/osx/x86/latest/" 1448 #elif defined(__aarch64__) 1449 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/apple/osx/arm64/latest/" 1450 #else 1451 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/apple/osx/ppc/latest/" 1452 #endif 1453 #elif defined(_WIN32) && !defined(_XBOX) 1454 #if _MSC_VER >= 1910 1455 #ifndef __WINRT__ 1456 #if defined(__x86_64__) || defined(_M_X64) 1457 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x64/latest/" 1458 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64) 1459 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86/latest/" 1460 #elif defined(__arm__) || defined(_M_ARM) 1461 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/arm/latest/" 1462 #elif defined(__aarch64__) || defined(_M_ARM64) 1463 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/arm64/latest/" 1464 #endif 1465 #else 1466 #if defined(__x86_64__) || defined(_M_X64) 1467 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/x64/latest/" 1468 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64) 1469 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/x86/latest/" 1470 #elif defined(__arm__) || defined(_M_ARM) 1471 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/arm/latest/" 1472 #elif defined(__aarch64__) || defined(_M_ARM64) 1473 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/arm64/latest/" 1474 #endif 1475 #endif 1476 #elif _MSC_VER == 1600 1477 #if defined(__x86_64__) || defined(_M_X64) 1478 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/" 1479 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64) 1480 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2010/x86/latest/" 1481 #endif 1482 #elif _MSC_VER == 1400 1483 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2005/x86/latest/" 1484 #elif _MSC_VER == 1310 1485 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows-msvc2003/x86/latest/" 1486 #else 1487 #if defined(__x86_64__) || defined(_M_X64) 1488 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows/x86_64/latest/" 1489 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64) 1490 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/windows/x86/latest/" 1491 #endif 1492 #endif 1493 #elif defined(__linux__) 1494 #if defined(__x86_64__) 1495 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/linux/x86_64/latest/" 1496 #elif defined(__i386__) || defined(__i486__) || defined(__i686__) 1497 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/linux/x86/latest/" 1498 #elif defined(__arm__) && __ARM_ARCH == 7 && defined(__ARM_PCS_VFP) 1499 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/linux/armhf/latest/" 1500 #else 1501 #define DEFAULT_BUILDBOT_SERVER_URL "" 1502 #endif 1503 #elif defined(WIIU) 1504 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/nintendo/wiiu/latest/" 1505 #elif defined(HAVE_LIBNX) 1506 #define DEFAULT_BUILDBOT_SERVER_URL "http://buildbot.libretro.com/nightly/nintendo/switch/libnx/latest/" 1507 #elif defined(_3DS) 1508 #define DEFAULT_BUILDBOT_SERVER_URL envIsHomebrew() ? "http://buildbot.libretro.com/nightly/nintendo/3ds/latest/3dsx/" : "http://buildbot.libretro.com/nightly/nintendo/3ds/latest/cia/" 1509 #else 1510 #define DEFAULT_BUILDBOT_SERVER_URL "" 1511 #endif 1512 1513 #define DEFAULT_BUILDBOT_ASSETS_SERVER_URL "http://buildbot.libretro.com/assets/" 1514 1515 #define DEFAULT_DISCORD_APP_ID "475456035851599874" 1516 1517 #define DEFAULT_AI_SERVICE_SOURCE_LANG 0 1518 1519 #define DEFAULT_AI_SERVICE_TARGET_LANG 0 1520 1521 #define DEFAULT_AI_SERVICE_ENABLE true 1522 1523 #define DEFAULT_AI_SERVICE_PAUSE false 1524 1525 #define DEFAULT_AI_SERVICE_MODE 1 1526 1527 #define DEFAULT_AI_SERVICE_URL "http://localhost:4404/" 1528 1529 #if defined(HAVE_FFMPEG) || defined(HAVE_MPV) 1530 #define DEFAULT_BUILTIN_MEDIAPLAYER_ENABLE true 1531 #else 1532 #define DEFAULT_BUILTIN_MEDIAPLAYER_ENABLE false 1533 #endif 1534 1535 #if defined(HAVE_IMAGEVIEWER) 1536 #define DEFAULT_BUILTIN_IMAGEVIEWER_ENABLE true 1537 #else 1538 #define DEFAULT_BUILTIN_IMAGEVIEWER_ENABLE false 1539 #endif 1540 1541 #define DEFAULT_FILTER_BY_CURRENT_CORE false 1542 1543 #endif 1544