diff options
Diffstat (limited to 'src/yuzu_cmd')
| -rw-r--r-- | src/yuzu_cmd/CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 30 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 146 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | 28 |
6 files changed, 136 insertions, 89 deletions
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 4bf25727b..e55a19649 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt | |||
| @@ -38,6 +38,11 @@ target_include_directories(yuzu-cmd PRIVATE ${RESOURCES_DIR}) | |||
| 38 | 38 | ||
| 39 | target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include) | 39 | target_include_directories(yuzu-cmd PRIVATE ../../externals/Vulkan-Headers/include) |
| 40 | 40 | ||
| 41 | if (YUZU_USE_EXTERNAL_SDL2) | ||
| 42 | target_compile_definitions(yuzu-cmd PRIVATE -DYUZU_USE_EXTERNAL_SDL2) | ||
| 43 | target_include_directories(yuzu-cmd PRIVATE ${PROJECT_BINARY_DIR}/externals/SDL/include) | ||
| 44 | endif() | ||
| 45 | |||
| 41 | if(UNIX AND NOT APPLE) | 46 | if(UNIX AND NOT APPLE) |
| 42 | install(TARGETS yuzu-cmd RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") | 47 | install(TARGETS yuzu-cmd RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}/bin") |
| 43 | endif() | 48 | endif() |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 325584a1a..b18056baf 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -242,17 +242,15 @@ static const std::array<int, 8> keyboard_mods{ | |||
| 242 | }; | 242 | }; |
| 243 | 243 | ||
| 244 | template <> | 244 | template <> |
| 245 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<float>& setting) { | ||
| 246 | setting = sdl2_config->GetReal(group, setting.GetLabel(), setting.GetDefault()); | ||
| 247 | } | ||
| 248 | template <> | ||
| 249 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) { | 245 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<std::string>& setting) { |
| 250 | setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); | 246 | setting = sdl2_config->Get(group, setting.GetLabel(), setting.GetDefault()); |
| 251 | } | 247 | } |
| 248 | |||
| 252 | template <> | 249 | template <> |
| 253 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<bool>& setting) { | 250 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<bool>& setting) { |
| 254 | setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); | 251 | setting = sdl2_config->GetBoolean(group, setting.GetLabel(), setting.GetDefault()); |
| 255 | } | 252 | } |
| 253 | |||
| 256 | template <typename Type> | 254 | template <typename Type> |
| 257 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<Type>& setting) { | 255 | void Config::ReadSetting(const std::string& group, Settings::BasicSetting<Type>& setting) { |
| 258 | setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), | 256 | setting = static_cast<Type>(sdl2_config->GetInteger(group, setting.GetLabel(), |
| @@ -294,6 +292,8 @@ void Config::ReadValues() { | |||
| 294 | 292 | ||
| 295 | ReadSetting("ControlsGeneral", Settings::values.motion_device); | 293 | ReadSetting("ControlsGeneral", Settings::values.motion_device); |
| 296 | 294 | ||
| 295 | ReadSetting("ControlsGeneral", Settings::values.touch_device); | ||
| 296 | |||
| 297 | ReadSetting("ControlsGeneral", Settings::values.keyboard_enabled); | 297 | ReadSetting("ControlsGeneral", Settings::values.keyboard_enabled); |
| 298 | 298 | ||
| 299 | ReadSetting("ControlsGeneral", Settings::values.debug_pad_enabled); | 299 | ReadSetting("ControlsGeneral", Settings::values.debug_pad_enabled); |
| @@ -416,11 +416,31 @@ void Config::ReadValues() { | |||
| 416 | } | 416 | } |
| 417 | 417 | ||
| 418 | ReadSetting("System", Settings::values.language_index); | 418 | ReadSetting("System", Settings::values.language_index); |
| 419 | ReadSetting("System", Settings::values.region_index); | ||
| 419 | ReadSetting("System", Settings::values.time_zone_index); | 420 | ReadSetting("System", Settings::values.time_zone_index); |
| 421 | ReadSetting("System", Settings::values.sound_index); | ||
| 420 | 422 | ||
| 421 | // Core | 423 | // Core |
| 422 | ReadSetting("Core", Settings::values.use_multi_core); | 424 | ReadSetting("Core", Settings::values.use_multi_core); |
| 423 | 425 | ||
| 426 | // Cpu | ||
| 427 | ReadSetting("Cpu", Settings::values.cpu_accuracy); | ||
| 428 | ReadSetting("Cpu", Settings::values.cpu_debug_mode); | ||
| 429 | ReadSetting("Cpu", Settings::values.cpuopt_page_tables); | ||
| 430 | ReadSetting("Cpu", Settings::values.cpuopt_block_linking); | ||
| 431 | ReadSetting("Cpu", Settings::values.cpuopt_return_stack_buffer); | ||
| 432 | ReadSetting("Cpu", Settings::values.cpuopt_fast_dispatcher); | ||
| 433 | ReadSetting("Cpu", Settings::values.cpuopt_context_elimination); | ||
| 434 | ReadSetting("Cpu", Settings::values.cpuopt_const_prop); | ||
| 435 | ReadSetting("Cpu", Settings::values.cpuopt_misc_ir); | ||
| 436 | ReadSetting("Cpu", Settings::values.cpuopt_reduce_misalign_checks); | ||
| 437 | ReadSetting("Cpu", Settings::values.cpuopt_fastmem); | ||
| 438 | ReadSetting("Cpu", Settings::values.cpuopt_unsafe_unfuse_fma); | ||
| 439 | ReadSetting("Cpu", Settings::values.cpuopt_unsafe_reduce_fp_error); | ||
| 440 | ReadSetting("Cpu", Settings::values.cpuopt_unsafe_ignore_standard_fpcr); | ||
| 441 | ReadSetting("Cpu", Settings::values.cpuopt_unsafe_inaccurate_nan); | ||
| 442 | ReadSetting("Cpu", Settings::values.cpuopt_unsafe_fastmem_check); | ||
| 443 | |||
| 424 | // Renderer | 444 | // Renderer |
| 425 | ReadSetting("Renderer", Settings::values.renderer_backend); | 445 | ReadSetting("Renderer", Settings::values.renderer_backend); |
| 426 | ReadSetting("Renderer", Settings::values.renderer_debug); | 446 | ReadSetting("Renderer", Settings::values.renderer_debug); |
| @@ -440,6 +460,7 @@ void Config::ReadValues() { | |||
| 440 | ReadSetting("Renderer", Settings::values.use_nvdec_emulation); | 460 | ReadSetting("Renderer", Settings::values.use_nvdec_emulation); |
| 441 | ReadSetting("Renderer", Settings::values.accelerate_astc); | 461 | ReadSetting("Renderer", Settings::values.accelerate_astc); |
| 442 | ReadSetting("Renderer", Settings::values.use_fast_gpu_time); | 462 | ReadSetting("Renderer", Settings::values.use_fast_gpu_time); |
| 463 | ReadSetting("Renderer", Settings::values.use_caches_gc); | ||
| 443 | 464 | ||
| 444 | ReadSetting("Renderer", Settings::values.bg_red); | 465 | ReadSetting("Renderer", Settings::values.bg_red); |
| 445 | ReadSetting("Renderer", Settings::values.bg_green); | 466 | ReadSetting("Renderer", Settings::values.bg_green); |
| @@ -460,7 +481,6 @@ void Config::ReadValues() { | |||
| 460 | // Debugging | 481 | // Debugging |
| 461 | Settings::values.record_frame_times = | 482 | Settings::values.record_frame_times = |
| 462 | sdl2_config->GetBoolean("Debugging", "record_frame_times", false); | 483 | sdl2_config->GetBoolean("Debugging", "record_frame_times", false); |
| 463 | ReadSetting("Debugging", Settings::values.program_args); | ||
| 464 | ReadSetting("Debugging", Settings::values.dump_exefs); | 484 | ReadSetting("Debugging", Settings::values.dump_exefs); |
| 465 | ReadSetting("Debugging", Settings::values.dump_nso); | 485 | ReadSetting("Debugging", Settings::values.dump_nso); |
| 466 | ReadSetting("Debugging", Settings::values.enable_fs_access_log); | 486 | ReadSetting("Debugging", Settings::values.enable_fs_access_log); |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index cc9850aad..b362f10b4 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -65,6 +65,13 @@ button_screenshot= | |||
| 65 | lstick= | 65 | lstick= |
| 66 | rstick= | 66 | rstick= |
| 67 | 67 | ||
| 68 | # To use the debug_pad, prepend `debug_pad_` before each button setting above. | ||
| 69 | # i.e. debug_pad_button_a= | ||
| 70 | |||
| 71 | # Enable debug pad inputs to the guest | ||
| 72 | # 0 (default): Disabled, 1: Enabled | ||
| 73 | debug_pad_enabled = | ||
| 74 | |||
| 68 | # Whether to enable or disable vibration | 75 | # Whether to enable or disable vibration |
| 69 | # 0: Disabled, 1 (default): Enabled | 76 | # 0: Disabled, 1 (default): Enabled |
| 70 | vibration_enabled= | 77 | vibration_enabled= |
| @@ -73,6 +80,10 @@ vibration_enabled= | |||
| 73 | # 0 (default): Disabled, 1: Enabled | 80 | # 0 (default): Disabled, 1: Enabled |
| 74 | enable_accurate_vibrations= | 81 | enable_accurate_vibrations= |
| 75 | 82 | ||
| 83 | # Enables controller motion inputs | ||
| 84 | # 0: Disabled, 1 (default): Enabled | ||
| 85 | motion_enabled = | ||
| 86 | |||
| 76 | # for motion input, the following devices are available: | 87 | # for motion input, the following devices are available: |
| 77 | # - "motion_emu" (default) for emulating motion input from mouse input. Required parameters: | 88 | # - "motion_emu" (default) for emulating motion input from mouse input. Required parameters: |
| 78 | # - "update_period": update period in milliseconds (default to 100) | 89 | # - "update_period": update period in milliseconds (default to 100) |
| @@ -98,19 +109,30 @@ use_touch_from_button= | |||
| 98 | #touch_from_button_maps_0_bind_1=bar | 109 | #touch_from_button_maps_0_bind_1=bar |
| 99 | # etc. | 110 | # etc. |
| 100 | 111 | ||
| 101 | # Most desktop operating systems do not expose a way to poll the motion state of the controllers | 112 | # List of Cemuhook UDP servers, delimited by ','. |
| 102 | # so as a way around it, cemuhook created a udp client/server protocol to broadcast the data directly | 113 | # Default: 127.0.0.1:26760 |
| 103 | # from a controller device to the client program. Citra has a client that can connect and read | 114 | # Example: 127.0.0.1:26760,123.4.5.67:26761 |
| 104 | # from any cemuhook compatible motion program. | 115 | udp_input_servers = |
| 105 | 116 | ||
| 106 | # IPv4 address of the udp input server (Default "127.0.0.1") | 117 | # Enable controlling an axis via a mouse input. |
| 107 | udp_input_address=127.0.0.1 | 118 | # 0 (default): Off, 1: On |
| 119 | mouse_panning = | ||
| 120 | |||
| 121 | # Set mouse sensitivity. | ||
| 122 | # Default: 1.0 | ||
| 123 | mouse_panning_sensitivity = | ||
| 124 | |||
| 125 | # Emulate an analog control stick from keyboard inputs. | ||
| 126 | # 0 (default): Disabled, 1: Enabled | ||
| 127 | emulate_analog_keyboard = | ||
| 108 | 128 | ||
| 109 | # Port of the udp input server. (Default 26760) | 129 | # Enable mouse inputs to the guest |
| 110 | udp_input_port= | 130 | # 0 (default): Disabled, 1: Enabled |
| 131 | mouse_enabled = | ||
| 111 | 132 | ||
| 112 | # The pad to request data on. Should be between 0 (Pad 1) and 3 (Pad 4). (Default 0) | 133 | # Enable keyboard inputs to the guest |
| 113 | udp_pad_index= | 134 | # 0 (default): Disabled, 1: Enabled |
| 135 | keyboard_enabled = | ||
| 114 | 136 | ||
| 115 | [Core] | 137 | [Core] |
| 116 | # Whether to use multi-core for CPU emulation | 138 | # Whether to use multi-core for CPU emulation |
| @@ -118,6 +140,17 @@ udp_pad_index= | |||
| 118 | use_multi_core= | 140 | use_multi_core= |
| 119 | 141 | ||
| 120 | [Cpu] | 142 | [Cpu] |
| 143 | # Adjusts various optimizations. | ||
| 144 | # Auto-select mode enables choice unsafe optimizations. | ||
| 145 | # Accurate enables only safe optimizations. | ||
| 146 | # Unsafe allows any unsafe optimizations. | ||
| 147 | # 0 (default): Auto-select, 1: Accurate, 2: Enable unsafe optimizations | ||
| 148 | cpu_accuracy = | ||
| 149 | |||
| 150 | # Allow disabling safe optimizations. | ||
| 151 | # 0 (default): Disabled, 1: Enabled | ||
| 152 | cpu_debug_mode = | ||
| 153 | |||
| 121 | # Enable inline page tables optimization (faster guest memory access) | 154 | # Enable inline page tables optimization (faster guest memory access) |
| 122 | # 0: Disabled, 1 (default): Enabled | 155 | # 0: Disabled, 1 (default): Enabled |
| 123 | cpuopt_page_tables = | 156 | cpuopt_page_tables = |
| @@ -154,6 +187,31 @@ cpuopt_reduce_misalign_checks = | |||
| 154 | # 0: Disabled, 1 (default): Enabled | 187 | # 0: Disabled, 1 (default): Enabled |
| 155 | cpuopt_fastmem = | 188 | cpuopt_fastmem = |
| 156 | 189 | ||
| 190 | # Enable unfuse FMA (improve performance on CPUs without FMA) | ||
| 191 | # Only enabled if cpu_accuracy is set to Unsafe. Automatically chosen with cpu_accuracy = Auto-select. | ||
| 192 | # 0: Disabled, 1 (default): Enabled | ||
| 193 | cpuopt_unsafe_unfuse_fma = | ||
| 194 | |||
| 195 | # Enable faster FRSQRTE and FRECPE | ||
| 196 | # Only enabled if cpu_accuracy is set to Unsafe. | ||
| 197 | # 0: Disabled, 1 (default): Enabled | ||
| 198 | cpuopt_unsafe_reduce_fp_error = | ||
| 199 | |||
| 200 | # Enable faster ASIMD instructions (32 bits only) | ||
| 201 | # Only enabled if cpu_accuracy is set to Unsafe. Automatically chosen with cpu_accuracy = Auto-select. | ||
| 202 | # 0: Disabled, 1 (default): Enabled | ||
| 203 | cpuopt_unsafe_ignore_standard_fpcr = | ||
| 204 | |||
| 205 | # Enable inaccurate NaN handling | ||
| 206 | # Only enabled if cpu_accuracy is set to Unsafe. Automatically chosen with cpu_accuracy = Auto-select. | ||
| 207 | # 0: Disabled, 1 (default): Enabled | ||
| 208 | cpuopt_unsafe_inaccurate_nan = | ||
| 209 | |||
| 210 | # Disable address space checks (64 bits only) | ||
| 211 | # Only enabled if cpu_accuracy is set to Unsafe. Automatically chosen with cpu_accuracy = Auto-select. | ||
| 212 | # 0: Disabled, 1 (default): Enabled | ||
| 213 | cpuopt_unsafe_fastmem_check = | ||
| 214 | |||
| 157 | [Renderer] | 215 | [Renderer] |
| 158 | # Which backend API to use. | 216 | # Which backend API to use. |
| 159 | # 0 (default): OpenGL, 1: Vulkan | 217 | # 0 (default): OpenGL, 1: Vulkan |
| @@ -166,14 +224,6 @@ debug = | |||
| 166 | # Which Vulkan physical device to use (defaults to 0) | 224 | # Which Vulkan physical device to use (defaults to 0) |
| 167 | vulkan_device = | 225 | vulkan_device = |
| 168 | 226 | ||
| 169 | # Whether to use software or hardware rendering. | ||
| 170 | # 0: Software, 1 (default): Hardware | ||
| 171 | use_hw_renderer = | ||
| 172 | |||
| 173 | # Whether to use the Just-In-Time (JIT) compiler for shader emulation | ||
| 174 | # 0: Interpreter (slow), 1 (default): JIT (fast) | ||
| 175 | use_shader_jit = | ||
| 176 | |||
| 177 | # Aspect ratio | 227 | # Aspect ratio |
| 178 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window | 228 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window |
| 179 | aspect_ratio = | 229 | aspect_ratio = |
| @@ -211,57 +261,31 @@ use_frame_limit = | |||
| 211 | frame_limit = | 261 | frame_limit = |
| 212 | 262 | ||
| 213 | # Whether to use disk based shader cache | 263 | # Whether to use disk based shader cache |
| 214 | # 0 (default): Off, 1 : On | 264 | # 0: Off, 1 (default): On |
| 215 | use_disk_shader_cache = | 265 | use_disk_shader_cache = |
| 216 | 266 | ||
| 217 | # Which gpu accuracy level to use | 267 | # Which gpu accuracy level to use |
| 218 | # 0 (Normal), 1 (High), 2 (Extreme) | 268 | # 0: Normal, 1 (default): High, 2: Extreme (Very slow) |
| 219 | gpu_accuracy = | 269 | gpu_accuracy = |
| 220 | 270 | ||
| 221 | # Whether to use asynchronous GPU emulation | 271 | # Whether to use asynchronous GPU emulation |
| 222 | # 0 : Off (slow), 1 (default): On (fast) | 272 | # 0 : Off (slow), 1 (default): On (fast) |
| 223 | use_asynchronous_gpu_emulation = | 273 | use_asynchronous_gpu_emulation = |
| 224 | 274 | ||
| 225 | # Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can | 275 | # Inform the guest that GPU operations completed more quickly than they did. |
| 226 | # so only turn this off if you notice a speed difference. | ||
| 227 | # 0: Off, 1 (default): On | 276 | # 0: Off, 1 (default): On |
| 228 | use_vsync = | 277 | use_fast_gpu_time = |
| 229 | 278 | ||
| 230 | # Whether to use garbage collection or not for GPU caches. | 279 | # Whether to use garbage collection or not for GPU caches. |
| 231 | # 0 (default): Off, 1: On | 280 | # 0 (default): Off, 1: On |
| 232 | use_caches_gc = | 281 | use_caches_gc = |
| 233 | 282 | ||
| 234 | # The clear color for the renderer. What shows up on the sides of the bottom screen. | 283 | # The clear color for the renderer. What shows up on the sides of the bottom screen. |
| 235 | # Must be in range of 0.0-1.0. Defaults to 1.0 for all. | 284 | # Must be in range of 0-255. Defaults to 0 for all. |
| 236 | bg_red = | 285 | bg_red = |
| 237 | bg_blue = | 286 | bg_blue = |
| 238 | bg_green = | 287 | bg_green = |
| 239 | 288 | ||
| 240 | [Layout] | ||
| 241 | # Layout for the screen inside the render window. | ||
| 242 | # 0 (default): Default Top Bottom Screen, 1: Single Screen Only, 2: Large Screen Small Screen | ||
| 243 | layout_option = | ||
| 244 | |||
| 245 | # Toggle custom layout (using the settings below) on or off. | ||
| 246 | # 0 (default): Off, 1: On | ||
| 247 | custom_layout = | ||
| 248 | |||
| 249 | # Screen placement when using Custom layout option | ||
| 250 | # 0x, 0y is the top left corner of the render window. | ||
| 251 | custom_top_left = | ||
| 252 | custom_top_top = | ||
| 253 | custom_top_right = | ||
| 254 | custom_top_bottom = | ||
| 255 | custom_bottom_left = | ||
| 256 | custom_bottom_top = | ||
| 257 | custom_bottom_right = | ||
| 258 | custom_bottom_bottom = | ||
| 259 | |||
| 260 | # Swaps the prominent screen with the other screen. | ||
| 261 | # For example, if Single Screen is chosen, setting this to 1 will display the bottom screen instead of the top screen. | ||
| 262 | # 0 (default): Top Screen is prominent, 1: Bottom Screen is prominent | ||
| 263 | swap_screen = | ||
| 264 | |||
| 265 | [Audio] | 289 | [Audio] |
| 266 | # Which audio output engine to use. | 290 | # Which audio output engine to use. |
| 267 | # auto (default): Auto-select | 291 | # auto (default): Auto-select |
| @@ -281,7 +305,7 @@ enable_audio_stretching = | |||
| 281 | output_device = | 305 | output_device = |
| 282 | 306 | ||
| 283 | # Output volume. | 307 | # Output volume. |
| 284 | # 1.0 (default): 100%, 0.0; mute | 308 | # 100 (default): 100%, 0; mute |
| 285 | volume = | 309 | volume = |
| 286 | 310 | ||
| 287 | [Data Storage] | 311 | [Data Storage] |
| @@ -308,10 +332,6 @@ gamecard_path = | |||
| 308 | # 1 (default): Yes, 0: No | 332 | # 1 (default): Yes, 0: No |
| 309 | use_docked_mode = | 333 | use_docked_mode = |
| 310 | 334 | ||
| 311 | # Allow the use of NFC in games | ||
| 312 | # 1 (default): Yes, 0 : No | ||
| 313 | enable_nfc = | ||
| 314 | |||
| 315 | # Sets the seed for the RNG generator built into the switch | 335 | # Sets the seed for the RNG generator built into the switch |
| 316 | # rng_seed will be ignored and randomly generated if rng_seed_enabled is false | 336 | # rng_seed will be ignored and randomly generated if rng_seed_enabled is false |
| 317 | rng_seed_enabled = | 337 | rng_seed_enabled = |
| @@ -323,10 +343,6 @@ rng_seed = | |||
| 323 | custom_rtc_enabled = | 343 | custom_rtc_enabled = |
| 324 | custom_rtc = | 344 | custom_rtc = |
| 325 | 345 | ||
| 326 | # Sets the account username, max length is 32 characters | ||
| 327 | # yuzu (default) | ||
| 328 | username = yuzu | ||
| 329 | |||
| 330 | # Sets the systems language index | 346 | # Sets the systems language index |
| 331 | # 0: Japanese, 1: English (default), 2: French, 3: German, 4: Italian, 5: Spanish, 6: Chinese, | 347 | # 0: Japanese, 1: English (default), 2: French, 3: German, 4: Italian, 5: Spanish, 6: Chinese, |
| 332 | # 7: Korean, 8: Dutch, 9: Portuguese, 10: Russian, 11: Taiwanese, 12: British English, 13: Canadian French, | 348 | # 7: Korean, 8: Dutch, 9: Portuguese, 10: Russian, 11: Taiwanese, 12: British English, 13: Canadian French, |
| @@ -335,17 +351,25 @@ language_index = | |||
| 335 | 351 | ||
| 336 | # The system region that yuzu will use during emulation | 352 | # The system region that yuzu will use during emulation |
| 337 | # -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan | 353 | # -1: Auto-select (default), 0: Japan, 1: USA, 2: Europe, 3: Australia, 4: China, 5: Korea, 6: Taiwan |
| 338 | region_value = | 354 | region_index = |
| 339 | 355 | ||
| 340 | # The system time zone that yuzu will use during emulation | 356 | # The system time zone that yuzu will use during emulation |
| 341 | # 0: Auto-select (default), 1: Default (system archive value), Others: Index for specified time zone | 357 | # 0: Auto-select (default), 1: Default (system archive value), Others: Index for specified time zone |
| 342 | time_zone_index = | 358 | time_zone_index = |
| 343 | 359 | ||
| 360 | # Sets the sound output mode. | ||
| 361 | # 0: Mono, 1 (default): Stereo, 2: Surround | ||
| 362 | sound_index = | ||
| 363 | |||
| 344 | [Miscellaneous] | 364 | [Miscellaneous] |
| 345 | # A filter which removes logs below a certain logging level. | 365 | # A filter which removes logs below a certain logging level. |
| 346 | # Examples: *:Debug Kernel.SVC:Trace Service.*:Critical | 366 | # Examples: *:Debug Kernel.SVC:Trace Service.*:Critical |
| 347 | log_filter = *:Trace | 367 | log_filter = *:Trace |
| 348 | 368 | ||
| 369 | # Use developer keys | ||
| 370 | # 0 (default): Disabled, 1: Enabled | ||
| 371 | use_dev_keys = | ||
| 372 | |||
| 349 | [Debugging] | 373 | [Debugging] |
| 350 | # Record frame time data, can be found in the log directory. Boolean value | 374 | # Record frame time data, can be found in the log directory. Boolean value |
| 351 | record_frame_times = | 375 | record_frame_times = |
| @@ -355,6 +379,8 @@ dump_exefs=false | |||
| 355 | dump_nso=false | 379 | dump_nso=false |
| 356 | # Determines whether or not yuzu will save the filesystem access log. | 380 | # Determines whether or not yuzu will save the filesystem access log. |
| 357 | enable_fs_access_log=false | 381 | enable_fs_access_log=false |
| 382 | # Enables verbose reporting services | ||
| 383 | reporting_services = | ||
| 358 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode | 384 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode |
| 359 | # false: Retail/Normal Mode (default), true: Kiosk Mode | 385 | # false: Retail/Normal Mode (default), true: Kiosk Mode |
| 360 | quest_flag = | 386 | quest_flag = |
| @@ -393,4 +419,4 @@ title_ids = | |||
| 393 | # For each title ID, have a key/value pair called `disabled_<title_id>` equal to the names of the add-ons to disable (sep. by '|') | 419 | # For each title ID, have a key/value pair called `disabled_<title_id>` equal to the names of the add-ons to disable (sep. by '|') |
| 394 | # e.x. disabled_0100000000010000 = Update|DLC <- disables Updates and DLC on Super Mario Odyssey | 420 | # e.x. disabled_0100000000010000 = Update|DLC <- disables Updates and DLC on Super Mario Odyssey |
| 395 | )"; | 421 | )"; |
| 396 | } | 422 | } // namespace DefaultINI |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp index 06b20c975..896181f0b 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2.cpp | |||
| @@ -2,15 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | // Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 | ||
| 6 | #ifdef __clang__ | ||
| 7 | #pragma clang diagnostic push | ||
| 8 | #pragma clang diagnostic ignored "-Wimplicit-fallthrough" | ||
| 9 | #endif | ||
| 10 | #include <SDL.h> | 5 | #include <SDL.h> |
| 11 | #ifdef __clang__ | ||
| 12 | #pragma clang diagnostic pop | ||
| 13 | #endif | ||
| 14 | 6 | ||
| 15 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 16 | #include "common/scm_rev.h" | 8 | #include "common/scm_rev.h" |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index 837a44be7..eadb41790 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | |||
| @@ -7,15 +7,7 @@ | |||
| 7 | #include <string> | 7 | #include <string> |
| 8 | 8 | ||
| 9 | #define SDL_MAIN_HANDLED | 9 | #define SDL_MAIN_HANDLED |
| 10 | // Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 | ||
| 11 | #ifdef __clang__ | ||
| 12 | #pragma clang diagnostic push | ||
| 13 | #pragma clang diagnostic ignored "-Wimplicit-fallthrough" | ||
| 14 | #endif | ||
| 15 | #include <SDL.h> | 10 | #include <SDL.h> |
| 16 | #ifdef __clang__ | ||
| 17 | #pragma clang diagnostic pop | ||
| 18 | #endif | ||
| 19 | 11 | ||
| 20 | #include <fmt/format.h> | 12 | #include <fmt/format.h> |
| 21 | #include <glad/glad.h> | 13 | #include <glad/glad.h> |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index 3401ad4b4..152e56db8 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | |||
| @@ -15,16 +15,13 @@ | |||
| 15 | #include "video_core/renderer_vulkan/renderer_vulkan.h" | 15 | #include "video_core/renderer_vulkan/renderer_vulkan.h" |
| 16 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" | 16 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" |
| 17 | 17 | ||
| 18 | // Include these late to avoid polluting everything with Xlib macros | 18 | #ifdef YUZU_USE_EXTERNAL_SDL2 |
| 19 | // Ignore -Wimplicit-fallthrough due to https://github.com/libsdl-org/SDL/issues/4307 | 19 | // Include this before SDL.h to prevent the external from including a dummy |
| 20 | #ifdef __clang__ | 20 | #define USING_GENERATED_CONFIG_H |
| 21 | #pragma clang diagnostic push | 21 | #include <SDL_config.h> |
| 22 | #pragma clang diagnostic ignored "-Wimplicit-fallthrough" | ||
| 23 | #endif | 22 | #endif |
| 23 | |||
| 24 | #include <SDL.h> | 24 | #include <SDL.h> |
| 25 | #ifdef __clang__ | ||
| 26 | #pragma clang diagnostic pop | ||
| 27 | #endif | ||
| 28 | #include <SDL_syswm.h> | 25 | #include <SDL_syswm.h> |
| 29 | 26 | ||
| 30 | EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem) | 27 | EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsystem) |
| @@ -51,6 +48,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste | |||
| 51 | window_info.type = Core::Frontend::WindowSystemType::Windows; | 48 | window_info.type = Core::Frontend::WindowSystemType::Windows; |
| 52 | window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window); | 49 | window_info.render_surface = reinterpret_cast<void*>(wm.info.win.window); |
| 53 | break; | 50 | break; |
| 51 | #else | ||
| 52 | case SDL_SYSWM_TYPE::SDL_SYSWM_WINDOWS: | ||
| 53 | LOG_CRITICAL(Frontend, "Window manager subsystem Windows not compiled"); | ||
| 54 | std::exit(EXIT_FAILURE); | ||
| 55 | break; | ||
| 54 | #endif | 56 | #endif |
| 55 | #ifdef SDL_VIDEO_DRIVER_X11 | 57 | #ifdef SDL_VIDEO_DRIVER_X11 |
| 56 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: | 58 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: |
| @@ -58,6 +60,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste | |||
| 58 | window_info.display_connection = wm.info.x11.display; | 60 | window_info.display_connection = wm.info.x11.display; |
| 59 | window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window); | 61 | window_info.render_surface = reinterpret_cast<void*>(wm.info.x11.window); |
| 60 | break; | 62 | break; |
| 63 | #else | ||
| 64 | case SDL_SYSWM_TYPE::SDL_SYSWM_X11: | ||
| 65 | LOG_CRITICAL(Frontend, "Window manager subsystem X11 not compiled"); | ||
| 66 | std::exit(EXIT_FAILURE); | ||
| 67 | break; | ||
| 61 | #endif | 68 | #endif |
| 62 | #ifdef SDL_VIDEO_DRIVER_WAYLAND | 69 | #ifdef SDL_VIDEO_DRIVER_WAYLAND |
| 63 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: | 70 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: |
| @@ -65,6 +72,11 @@ EmuWindow_SDL2_VK::EmuWindow_SDL2_VK(InputCommon::InputSubsystem* input_subsyste | |||
| 65 | window_info.display_connection = wm.info.wl.display; | 72 | window_info.display_connection = wm.info.wl.display; |
| 66 | window_info.render_surface = wm.info.wl.surface; | 73 | window_info.render_surface = wm.info.wl.surface; |
| 67 | break; | 74 | break; |
| 75 | #else | ||
| 76 | case SDL_SYSWM_TYPE::SDL_SYSWM_WAYLAND: | ||
| 77 | LOG_CRITICAL(Frontend, "Window manager subsystem Wayland not compiled"); | ||
| 78 | std::exit(EXIT_FAILURE); | ||
| 79 | break; | ||
| 68 | #endif | 80 | #endif |
| 69 | default: | 81 | default: |
| 70 | LOG_CRITICAL(Frontend, "Window manager subsystem not implemented"); | 82 | LOG_CRITICAL(Frontend, "Window manager subsystem not implemented"); |