From a007ac6b9ccc23861f5a5c6967d535220ed794b0 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 09:48:26 -0400 Subject: configure_graphics_advance: Generate UI at runtime We can iterate through the AdvancedGraphics settings and generate the UI during runtime. This doesn't help runtime efficiency, but it helps a ton in reducing the amount of work a developer needs in order to add a new setting. --- src/yuzu/configuration/shared_translation.cpp | 170 ++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 src/yuzu/configuration/shared_translation.cpp (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp new file mode 100644 index 000000000..974203f75 --- /dev/null +++ b/src/yuzu/configuration/shared_translation.cpp @@ -0,0 +1,170 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include "common/settings.h" +#include "yuzu/configuration/shared_translation.h" + +namespace ConfigurationShared { + +std::unique_ptr InitializeTranslations(QWidget* parent) { + std::unique_ptr translations = std::make_unique(); + const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; + +#define INSERT(LABEL, NAME, TOOLTIP) \ + translations->insert(std::pair{(LABEL), std::pair{tr((NAME)), tr((TOOLTIP))}}) + + // Audio + INSERT("output_engine", "Output Engine:", ""); + INSERT("output_device", "Output Device:", ""); + INSERT("input_device", "Input Device:", ""); + INSERT("audio_muted", "Mute audio when in background", ""); + INSERT("volume", "Volume:", ""); + + // Core + INSERT("use_multi_core", "Multicore CPU Emulation", ""); + INSERT("use_unsafe_extended_memory_layout", "Unsafe extended memory layout (8GB DRAM)", ""); + + // Cpu + INSERT("cpu_accuracy", "Accuracy:", ""); + INSERT("cpu_debug_mode", "Enable CPU Debugging", ""); + INSERT("cpuopt_page_tables", "Enable inline page tables", ""); + INSERT("cpuopt_block_linking", "Enable block linking", ""); + INSERT("cpuopt_return_stack_buffer", "Enable return stack buffer", ""); + INSERT("cpuopt_fast_dispatcher", "Enable fast dispatcher", ""); + INSERT("cpuopt_context_elimination", "Enable context elimination", ""); + INSERT("cpuopt_const_prop", "Enable constant propagation", ""); + INSERT("cpuopt_misc_ir", "Enable miscellaneous optimizations", ""); + INSERT("cpuopt_reduce_misalign_checks", "Enable misalignment check reduction", ""); + INSERT("cpuopt_fastmem", "Enable Host MMU Emulation (general memory instructions)", ""); + INSERT("cpuopt_fastmem_exclusives", "Enable Host MMU Emulation (exclusive memory instructions)", + ""); + INSERT("cpuopt_recompile_exclusives", "Enable recompilation of exlucsive memory instructions", + ""); + INSERT("cpuopt_ignore_memory_aborts", "Enable fallbacks for invalid memory accesses", ""); + + INSERT("cpuopt_unsafe_unfuse_fma", "Unfuse FMA (improve performance on CPUs without FMA)", ""); + INSERT("cpuopt_unsafe_reduce_fp_error", "Faster FRSQRTE and FRECPE", ""); + INSERT("cpuopt_unsafe_ignore_standard_fpcr", "Faster ASIMD instructions (32 bits only)", ""); + INSERT("cpuopt_unsafe_inaccurate_nan", "Inaccurate NaN handling", ""); + INSERT("cpuopt_unsafe_fastmem_check", "Disable address space checks", ""); + INSERT("cpuopt_unsafe_ignore_global_monitor", "Ignore global monitor", ""); + + // Renderer + INSERT("backend", "API:", ""); + INSERT("vulkan_device", "Device:", ""); + INSERT("shader_backend", "Shader Backend:", ""); + INSERT("resolution_setup", "Resolution:", ""); + INSERT("scaling_filter", "Window Adapting Filter:", ""); + INSERT("fsr_sharpening_slider", "AMD FidelityFX™ Super Resolution Sharpness:", ""); + INSERT("anti_aliasing", "Anti-Aliasing Method:", ""); + INSERT("fullscreen_mode", "Fullscreen Mode:", ""); + INSERT("aspect_ratio", "Aspect Ratio:", ""); + INSERT("use_disk_shader_cache", "Use disk pipeline cache", ""); + INSERT("use_asynchronous_gpu_emulation", "Use asynchronous GPU emulation", ""); + INSERT("nvdec_emulation", "NVDEC emulation:", ""); + INSERT("acclerate_astc", "ASTC Decoding Method:", ""); + INSERT( + "use_vsync", "VSync Mode:", + "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh " + "rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. " + "Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate " + "(no synchronization) just presents whatever is available and can exhibit tearing."); + + // Renderer (Advanced Graphics) + INSERT("async_presentation", "Enable asynchronous presentation (Vulkan only)", ""); + INSERT("force_max_clock", "Force maximum clocks (Vulkan only)", + "Runs work in the background while waiting for graphics commands to keep the GPU from " + "lowering its clock speed."); + INSERT("max_anisotropy", "Anisotropic Filtering:", ""); + INSERT("gpu_accuracy", "Accuracy Level:", ""); + INSERT("use_asynchronous_shaders", "Use asynchronous shader building (Hack)", + "Enables asynchronous shader compilation, which may reduce shader stutter. This feature " + "is experimental."); + INSERT("use_fast_gpu_time", "Use Fast GPU Time (Hack)", + "Enables Fast GPU Time. This option will force most games to run at their highest " + "native resolution."); + INSERT("use_vulkan_driver_pipeline_cache", "Use Vulkan pipeline cache", + "Enables GPU vendor-specific pipeline cache. This option can improve shader loading " + "time significantly in cases where the Vulkan driver does not store pipeline cache " + "files internally."); + INSERT("enable_compute_pipelines", "Enable Compute Pipelines (Intel Vulkan Only)", + "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " + "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " + "on all other drivers."); + INSERT("bg_red", "Background Color:", ""); + INSERT("bg_green", "Background Color:", ""); + INSERT("bg_blue", "Background Color:", ""); + + // Renderer (Debug) + INSERT("debug", "Enable Graphics Debugging", + "When checked, the graphics API enters a slower debugging mode"); + INSERT("shader_feedback", "Enable Shader Feedback", + "When checked, yuzu will log statistics about the compiled pipeline cache"); + INSERT("nsight_aftermath", "Enable Nsight Aftermath", + "When checked, it enables Nsight Aftermath crash dumps"); + INSERT("disable_shader_loop_safety_checks", "Disable Loop safety checks", + "When checked, it executes shaders without loop logic changes"); + + // Renderer (General) + INSERT("use_speed_limit", "Limit Speed Percent", ""); + INSERT("speed_limit", "Limit Speed Percent", ""); + + // System + INSERT("rng_seed_enabled", "RNG Seed", ""); + INSERT("rng_seed", "RNG Seed", ""); + INSERT("device_name", "Device Name", ""); + INSERT("custom_rtc_enabled", "Custom RTC", ""); + INSERT("custom_rtc", "Custom RTC", ""); + INSERT("language_index", "Language:", ""); + INSERT("region_index", "Region:", ""); + INSERT("time_zone_index", "Time Zone:", ""); + INSERT("sound_index", "Sound Output Mode:", ""); + INSERT("use_docked_mode", "Docked", ""); + +#undef INSERT + + return translations; +} + +std::forward_list ComboboxEnumeration(std::type_index type, QWidget* parent) { + const auto& tr = [&](const char* text) { return parent->tr(text); }; + + if (type == typeid(Settings::AstcDecodeMode)) { + return { + tr("CPU"), + tr("GPU"), + tr("CPU Asynchronous"), + }; + } else if (type == typeid(Settings::RendererBackend)) { + return { + tr("OpenGL"), + tr("Vulkan"), + tr("Null"), + }; + } else if (type == typeid(Settings::ShaderBackend)) { + return { + tr("GLSL"), + tr("GLASM (Assembly Shaders, NVIDIA Only)"), + tr("SPIR-V (Experimental, Mesa Only)"), + }; + } else if (type == typeid(Settings::GPUAccuracy)) { + return { + tr("Normal"), + tr("High"), + tr("Extreme"), + }; + } else if (type == typeid(Settings::AnisotropyMode)) { + return { + tr("Automatic"), tr("Default"), tr("2x"), tr("4x"), tr("8x"), tr("16x"), + }; + } + + return {}; +} + +} // namespace ConfigurationShared -- cgit v1.2.3 From 4f545e3024920643c6c4326072829c0a39d1396e Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 09:49:47 -0400 Subject: shared_translation: Add copyright and license --- src/yuzu/configuration/shared_translation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 974203f75..f82074d7d 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later + #include #include #include -- cgit v1.2.3 From 4a825268d60a53c6bff429cd4202e3e60f5c8842 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 10:34:39 -0400 Subject: shared_translation: Add the rest of the settings --- src/yuzu/configuration/shared_translation.cpp | 81 ++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index f82074d7d..ddc7569f1 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -21,6 +21,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { #define INSERT(LABEL, NAME, TOOLTIP) \ translations->insert(std::pair{(LABEL), std::pair{tr((NAME)), tr((TOOLTIP))}}) + // A setting can be ignored by giving it a blank name + // Audio INSERT("output_engine", "Output Engine:", ""); INSERT("output_device", "Output Device:", ""); @@ -34,6 +36,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Cpu INSERT("cpu_accuracy", "Accuracy:", ""); + + // Cpu Debug INSERT("cpu_debug_mode", "Enable CPU Debugging", ""); INSERT("cpuopt_page_tables", "Enable inline page tables", ""); INSERT("cpuopt_block_linking", "Enable block linking", ""); @@ -50,6 +54,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { ""); INSERT("cpuopt_ignore_memory_aborts", "Enable fallbacks for invalid memory accesses", ""); + // Cpu Unsafe INSERT("cpuopt_unsafe_unfuse_fma", "Unfuse FMA (improve performance on CPUs without FMA)", ""); INSERT("cpuopt_unsafe_reduce_fp_error", "Faster FRSQRTE and FRECPE", ""); INSERT("cpuopt_unsafe_ignore_standard_fpcr", "Faster ASIMD instructions (32 bits only)", ""); @@ -127,7 +132,81 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT("region_index", "Region:", ""); INSERT("time_zone_index", "Time Zone:", ""); INSERT("sound_index", "Sound Output Mode:", ""); - INSERT("use_docked_mode", "Docked", ""); + INSERT("use_docked_mode", "", ""); + + // Controls + INSERT("enable_raw_input", "", ""); + INSERT("controller_navigation", "", ""); + INSERT("enable_joycon_driver", "", ""); + INSERT("enable_procon_driver", "", ""); + INSERT("vibration_enabled", "", ""); + INSERT("enable_accurate_vibrations", "", ""); + INSERT("motion_enabled", "", ""); + INSERT("udp_input_servers", "", ""); + INSERT("enable_udp_controller", "", ""); + INSERT("pause_tas_on_load", "", ""); + INSERT("tas_enable", "", ""); + INSERT("tas_loop", "", ""); + INSERT("mouse_panning", "", ""); + INSERT("mouse_panning_sensitivity", "", ""); + INSERT("mouse_enabled", "", ""); + INSERT("emulate_analog_keyboard", "", ""); + INSERT("keyboard_enabled", "", ""); + INSERT("debug_pad_enabled", "", ""); + INSERT("touch_device", "", ""); + INSERT("touch_from_button_map", "", ""); + INSERT("enable_ring_controller", "", ""); + INSERT("enable_ir_sensor", "", ""); + INSERT("ir_sensor_device", "", ""); + + // Data Storage + INSERT("use_virtual_sd", "", ""); + INSERT("gamecard_inserted", "Inserted", ""); + INSERT("gamecard_current_game", "Current Game", ""); + INSERT("gamecard_path", "Path", ""); + + // Debugging + INSERT("use_gdbstub", "Enable GDB Stub", ""); + INSERT("gdbstub_port", "Port:", ""); + INSERT("program_args", "Arguments String", ""); + INSERT("dump_exefs", "Dump ExeFS", ""); + INSERT("dump_nso", "Dump Decompressed NSOs", ""); + INSERT("enable_fs_access_log", "Enable FS Access Log", ""); + INSERT("reporting_services", "Enable Verbose Repoting Services**", ""); + INSERT("quest_flag", "Kiosk (Quest) Mode", ""); + INSERT("extended_logging", "Enable Extended Logging**", + "When checked, the max size of the log increases from 100 MB to 1 GB"); + INSERT("use_debug_asserts", "Enable Debug Asserts", ""); + INSERT("use_auto_stub", "Enable Auto-Stub**", ""); + INSERT("enable_all_controllers", "Enable All Controller Types", ""); + INSERT("create_crash_dumps", "Create Minidump After Crash", ""); + INSERT("perform_vulkan_check", "Perform Startup Vulkan Check", + "Enables yuzu to check for a working Vulkan environment when the program starts up. " + "Disable this if this is causing issues with external programs seeing yuzu."); + INSERT("log_filter", "Global Log Filter", ""); + INSERT("use_dev_keys", "", ""); + + // Debugging Graphics + INSERT("dump_shaders", "Dump Game Shaders", + "When checked, it will dump all the original assembler shaders from the disk shader " + "cache or game as found"); + INSERT("disable_macro_jit", "Disable Macro JIT", + "When checked, it disables the macro Just In Time compiler. Enabling this makes games " + "run slower"); + INSERT( + "disable_macro_hle", "Disable Macro HLE", + "When checked, it disables the macro HLE functions. Enabling this makes games run slower"); + INSERT("dump_macros", "Dump Maxwell Macros", + "When checked, it will dump all the macro programs of the GPU"); + + // Network + INSERT("network_interface", "Network Interface", ""); + + // Web Service + INSERT("enable_telemetry", "Share anonymous usage data with the yuzu team", ""); + INSERT("web_api_url", "", ""); + INSERT("yuzu_username", "", ""); + INSERT("yuzu_token", "Token:", ""); #undef INSERT -- cgit v1.2.3 From f8435d676f0073dee4d2ea87c84767a53911fbe6 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 12:03:40 -0400 Subject: configure_graphics: Partial runtime implementation --- src/yuzu/configuration/shared_translation.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index ddc7569f1..73c3086ae 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -36,6 +36,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Cpu INSERT("cpu_accuracy", "Accuracy:", ""); + INSERT("cpu_accuracy_first_time", "", ""); // Cpu Debug INSERT("cpu_debug_mode", "Enable CPU Debugging", ""); @@ -75,13 +76,16 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT("use_disk_shader_cache", "Use disk pipeline cache", ""); INSERT("use_asynchronous_gpu_emulation", "Use asynchronous GPU emulation", ""); INSERT("nvdec_emulation", "NVDEC emulation:", ""); - INSERT("acclerate_astc", "ASTC Decoding Method:", ""); + INSERT("accelerate_astc", "ASTC Decoding Method:", ""); INSERT( "use_vsync", "VSync Mode:", "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh " "rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. " "Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate " "(no synchronization) just presents whatever is available and can exhibit tearing."); + INSERT("bg_red", "", ""); + INSERT("bg_green", "", ""); + INSERT("bg_blue", "", ""); // Renderer (Advanced Graphics) INSERT("async_presentation", "Enable asynchronous presentation (Vulkan only)", ""); @@ -104,9 +108,6 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " "on all other drivers."); - INSERT("bg_red", "Background Color:", ""); - INSERT("bg_green", "Background Color:", ""); - INSERT("bg_blue", "Background Color:", ""); // Renderer (Debug) INSERT("debug", "Enable Graphics Debugging", -- cgit v1.2.3 From cfb63c68dbdc2c8add45cddb2cedf371059af6c4 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 13:28:52 -0400 Subject: shared_translation: Finish using int ids --- src/yuzu/configuration/shared_translation.cpp | 236 +++++++++++--------------- 1 file changed, 97 insertions(+), 139 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 73c3086ae..181dd7cf0 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -18,196 +18,111 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { std::unique_ptr translations = std::make_unique(); const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; -#define INSERT(LABEL, NAME, TOOLTIP) \ - translations->insert(std::pair{(LABEL), std::pair{tr((NAME)), tr((TOOLTIP))}}) +#define INSERT(ID, NAME, TOOLTIP) \ + translations->insert(std::pair{Settings::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}}) // A setting can be ignored by giving it a blank name // Audio - INSERT("output_engine", "Output Engine:", ""); - INSERT("output_device", "Output Device:", ""); - INSERT("input_device", "Input Device:", ""); - INSERT("audio_muted", "Mute audio when in background", ""); - INSERT("volume", "Volume:", ""); + INSERT(sink_id, "Output Engine:", ""); + INSERT(audio_output_device_id, "Output Device:", ""); + INSERT(audio_input_device_id, "Input Device:", ""); + INSERT(audio_muted, "Mute audio when in background", ""); + INSERT(volume, "Volume:", ""); // Core - INSERT("use_multi_core", "Multicore CPU Emulation", ""); - INSERT("use_unsafe_extended_memory_layout", "Unsafe extended memory layout (8GB DRAM)", ""); + INSERT(use_multi_core, "Multicore CPU Emulation", ""); + INSERT(use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", ""); // Cpu - INSERT("cpu_accuracy", "Accuracy:", ""); - INSERT("cpu_accuracy_first_time", "", ""); + INSERT(cpu_accuracy, "Accuracy:", ""); + INSERT(cpu_accuracy_first_time, "", ""); // Cpu Debug - INSERT("cpu_debug_mode", "Enable CPU Debugging", ""); - INSERT("cpuopt_page_tables", "Enable inline page tables", ""); - INSERT("cpuopt_block_linking", "Enable block linking", ""); - INSERT("cpuopt_return_stack_buffer", "Enable return stack buffer", ""); - INSERT("cpuopt_fast_dispatcher", "Enable fast dispatcher", ""); - INSERT("cpuopt_context_elimination", "Enable context elimination", ""); - INSERT("cpuopt_const_prop", "Enable constant propagation", ""); - INSERT("cpuopt_misc_ir", "Enable miscellaneous optimizations", ""); - INSERT("cpuopt_reduce_misalign_checks", "Enable misalignment check reduction", ""); - INSERT("cpuopt_fastmem", "Enable Host MMU Emulation (general memory instructions)", ""); - INSERT("cpuopt_fastmem_exclusives", "Enable Host MMU Emulation (exclusive memory instructions)", - ""); - INSERT("cpuopt_recompile_exclusives", "Enable recompilation of exlucsive memory instructions", - ""); - INSERT("cpuopt_ignore_memory_aborts", "Enable fallbacks for invalid memory accesses", ""); // Cpu Unsafe - INSERT("cpuopt_unsafe_unfuse_fma", "Unfuse FMA (improve performance on CPUs without FMA)", ""); - INSERT("cpuopt_unsafe_reduce_fp_error", "Faster FRSQRTE and FRECPE", ""); - INSERT("cpuopt_unsafe_ignore_standard_fpcr", "Faster ASIMD instructions (32 bits only)", ""); - INSERT("cpuopt_unsafe_inaccurate_nan", "Inaccurate NaN handling", ""); - INSERT("cpuopt_unsafe_fastmem_check", "Disable address space checks", ""); - INSERT("cpuopt_unsafe_ignore_global_monitor", "Ignore global monitor", ""); + INSERT(cpuopt_unsafe_unfuse_fma, "Unfuse FMA (improve performance on CPUs without FMA)", ""); + INSERT(cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", ""); + INSERT(cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", ""); + INSERT(cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", ""); + INSERT(cpuopt_unsafe_fastmem_check, "Disable address space checks", ""); + INSERT(cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", ""); // Renderer - INSERT("backend", "API:", ""); - INSERT("vulkan_device", "Device:", ""); - INSERT("shader_backend", "Shader Backend:", ""); - INSERT("resolution_setup", "Resolution:", ""); - INSERT("scaling_filter", "Window Adapting Filter:", ""); - INSERT("fsr_sharpening_slider", "AMD FidelityFX™ Super Resolution Sharpness:", ""); - INSERT("anti_aliasing", "Anti-Aliasing Method:", ""); - INSERT("fullscreen_mode", "Fullscreen Mode:", ""); - INSERT("aspect_ratio", "Aspect Ratio:", ""); - INSERT("use_disk_shader_cache", "Use disk pipeline cache", ""); - INSERT("use_asynchronous_gpu_emulation", "Use asynchronous GPU emulation", ""); - INSERT("nvdec_emulation", "NVDEC emulation:", ""); - INSERT("accelerate_astc", "ASTC Decoding Method:", ""); + INSERT(renderer_backend, "API:", ""); + INSERT(vulkan_device, "Device:", ""); + INSERT(shader_backend, "Shader Backend:", ""); + INSERT(resolution_setup, "Resolution:", ""); + INSERT(scaling_filter, "Window Adapting Filter:", ""); + INSERT(fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", ""); + INSERT(anti_aliasing, "Anti-Aliasing Method:", ""); + INSERT(fullscreen_mode, "Fullscreen Mode:", ""); + INSERT(aspect_ratio, "Aspect Ratio:", ""); + INSERT(use_disk_shader_cache, "Use disk pipeline cache", ""); + INSERT(use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); + INSERT(nvdec_emulation, "NVDEC emulation:", ""); + INSERT(accelerate_astc, "ASTC Decoding Method:", ""); INSERT( - "use_vsync", "VSync Mode:", + vsync_mode, "VSync Mode:", "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh " "rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. " "Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate " "(no synchronization) just presents whatever is available and can exhibit tearing."); - INSERT("bg_red", "", ""); - INSERT("bg_green", "", ""); - INSERT("bg_blue", "", ""); + INSERT(bg_red, "", ""); + INSERT(bg_green, "", ""); + INSERT(bg_blue, "", ""); // Renderer (Advanced Graphics) - INSERT("async_presentation", "Enable asynchronous presentation (Vulkan only)", ""); - INSERT("force_max_clock", "Force maximum clocks (Vulkan only)", + INSERT(async_presentation, "Enable asynchronous presentation (Vulkan only)", ""); + INSERT(renderer_force_max_clock, "Force maximum clocks (Vulkan only)", "Runs work in the background while waiting for graphics commands to keep the GPU from " "lowering its clock speed."); - INSERT("max_anisotropy", "Anisotropic Filtering:", ""); - INSERT("gpu_accuracy", "Accuracy Level:", ""); - INSERT("use_asynchronous_shaders", "Use asynchronous shader building (Hack)", + INSERT(max_anisotropy, "Anisotropic Filtering:", ""); + INSERT(gpu_accuracy, "Accuracy Level:", ""); + INSERT(use_asynchronous_shaders, "Use asynchronous shader building (Hack)", "Enables asynchronous shader compilation, which may reduce shader stutter. This feature " "is experimental."); - INSERT("use_fast_gpu_time", "Use Fast GPU Time (Hack)", + INSERT(use_fast_gpu_time, "Use Fast GPU Time (Hack)", "Enables Fast GPU Time. This option will force most games to run at their highest " "native resolution."); - INSERT("use_vulkan_driver_pipeline_cache", "Use Vulkan pipeline cache", + INSERT(use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache", "Enables GPU vendor-specific pipeline cache. This option can improve shader loading " "time significantly in cases where the Vulkan driver does not store pipeline cache " "files internally."); - INSERT("enable_compute_pipelines", "Enable Compute Pipelines (Intel Vulkan Only)", + INSERT(enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)", "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " "on all other drivers."); // Renderer (Debug) - INSERT("debug", "Enable Graphics Debugging", - "When checked, the graphics API enters a slower debugging mode"); - INSERT("shader_feedback", "Enable Shader Feedback", - "When checked, yuzu will log statistics about the compiled pipeline cache"); - INSERT("nsight_aftermath", "Enable Nsight Aftermath", - "When checked, it enables Nsight Aftermath crash dumps"); - INSERT("disable_shader_loop_safety_checks", "Disable Loop safety checks", - "When checked, it executes shaders without loop logic changes"); // Renderer (General) - INSERT("use_speed_limit", "Limit Speed Percent", ""); - INSERT("speed_limit", "Limit Speed Percent", ""); + INSERT(use_speed_limit, "Limit Speed Percent", ""); + INSERT(speed_limit, "Limit Speed Percent", ""); // System - INSERT("rng_seed_enabled", "RNG Seed", ""); - INSERT("rng_seed", "RNG Seed", ""); - INSERT("device_name", "Device Name", ""); - INSERT("custom_rtc_enabled", "Custom RTC", ""); - INSERT("custom_rtc", "Custom RTC", ""); - INSERT("language_index", "Language:", ""); - INSERT("region_index", "Region:", ""); - INSERT("time_zone_index", "Time Zone:", ""); - INSERT("sound_index", "Sound Output Mode:", ""); - INSERT("use_docked_mode", "", ""); + INSERT(rng_seed_enabled, "RNG Seed", ""); + INSERT(rng_seed, "RNG Seed", ""); + INSERT(device_name, "Device Name", ""); + INSERT(custom_rtc_enabled, "Custom RTC", ""); + INSERT(custom_rtc, "Custom RTC", ""); + INSERT(language_index, "Language:", ""); + INSERT(region_index, "Region:", ""); + INSERT(time_zone_index, "Time Zone:", ""); + INSERT(sound_index, "Sound Output Mode:", ""); + INSERT(use_docked_mode, "", ""); // Controls - INSERT("enable_raw_input", "", ""); - INSERT("controller_navigation", "", ""); - INSERT("enable_joycon_driver", "", ""); - INSERT("enable_procon_driver", "", ""); - INSERT("vibration_enabled", "", ""); - INSERT("enable_accurate_vibrations", "", ""); - INSERT("motion_enabled", "", ""); - INSERT("udp_input_servers", "", ""); - INSERT("enable_udp_controller", "", ""); - INSERT("pause_tas_on_load", "", ""); - INSERT("tas_enable", "", ""); - INSERT("tas_loop", "", ""); - INSERT("mouse_panning", "", ""); - INSERT("mouse_panning_sensitivity", "", ""); - INSERT("mouse_enabled", "", ""); - INSERT("emulate_analog_keyboard", "", ""); - INSERT("keyboard_enabled", "", ""); - INSERT("debug_pad_enabled", "", ""); - INSERT("touch_device", "", ""); - INSERT("touch_from_button_map", "", ""); - INSERT("enable_ring_controller", "", ""); - INSERT("enable_ir_sensor", "", ""); - INSERT("ir_sensor_device", "", ""); // Data Storage - INSERT("use_virtual_sd", "", ""); - INSERT("gamecard_inserted", "Inserted", ""); - INSERT("gamecard_current_game", "Current Game", ""); - INSERT("gamecard_path", "Path", ""); // Debugging - INSERT("use_gdbstub", "Enable GDB Stub", ""); - INSERT("gdbstub_port", "Port:", ""); - INSERT("program_args", "Arguments String", ""); - INSERT("dump_exefs", "Dump ExeFS", ""); - INSERT("dump_nso", "Dump Decompressed NSOs", ""); - INSERT("enable_fs_access_log", "Enable FS Access Log", ""); - INSERT("reporting_services", "Enable Verbose Repoting Services**", ""); - INSERT("quest_flag", "Kiosk (Quest) Mode", ""); - INSERT("extended_logging", "Enable Extended Logging**", - "When checked, the max size of the log increases from 100 MB to 1 GB"); - INSERT("use_debug_asserts", "Enable Debug Asserts", ""); - INSERT("use_auto_stub", "Enable Auto-Stub**", ""); - INSERT("enable_all_controllers", "Enable All Controller Types", ""); - INSERT("create_crash_dumps", "Create Minidump After Crash", ""); - INSERT("perform_vulkan_check", "Perform Startup Vulkan Check", - "Enables yuzu to check for a working Vulkan environment when the program starts up. " - "Disable this if this is causing issues with external programs seeing yuzu."); - INSERT("log_filter", "Global Log Filter", ""); - INSERT("use_dev_keys", "", ""); // Debugging Graphics - INSERT("dump_shaders", "Dump Game Shaders", - "When checked, it will dump all the original assembler shaders from the disk shader " - "cache or game as found"); - INSERT("disable_macro_jit", "Disable Macro JIT", - "When checked, it disables the macro Just In Time compiler. Enabling this makes games " - "run slower"); - INSERT( - "disable_macro_hle", "Disable Macro HLE", - "When checked, it disables the macro HLE functions. Enabling this makes games run slower"); - INSERT("dump_macros", "Dump Maxwell Macros", - "When checked, it will dump all the macro programs of the GPU"); // Network - INSERT("network_interface", "Network Interface", ""); // Web Service - INSERT("enable_telemetry", "Share anonymous usage data with the yuzu team", ""); - INSERT("web_api_url", "", ""); - INSERT("yuzu_username", "", ""); - INSERT("yuzu_token", "Token:", ""); #undef INSERT @@ -241,6 +156,49 @@ std::forward_list ComboboxEnumeration(std::type_index type, QWidget* pa tr("High"), tr("Extreme"), }; + } else if (type == typeid(Settings::CPUAccuracy)) { + return { + tr("Auto"), + tr("Accurate"), + tr("Unsafe"), + tr("Paranoid (disables most optimizations)"), + }; + } else if (type == typeid(Settings::FullscreenMode)) { + return { + tr("Borderless Windowed"), + tr("Exclusive Fullscreen"), + }; + } else if (type == typeid(Settings::NvdecEmulation)) { + return { + tr("No Video Output"), + tr("CPU Video Decoding"), + tr("GPU Video Decoding (Default)"), + }; + } else if (type == typeid(Settings::ResolutionSetup)) { + return { + tr("0.5X (360p/540p) [EXPERIMENTAL]"), + tr("0.75X (540p/810p) [EXPERIMENTAL]"), + tr("1X (720p/1080p)"), + tr("1.5X (1080p/1620p) [EXPERIMENTAL]"), + tr("2X (1440p/2160p)"), + tr("3X (2160p/3240p)"), + tr("4X (2880p/4320p)"), + tr("5X (3600p/5400p)"), + tr("6X (4320p/6480p)"), + tr("7X (5040p/7560p)"), + tr("8X (5760p/8640p)"), + }; + } else if (type == typeid(Settings::ScalingFilter)) { + return { + tr("Nearest Neighbor"), tr("Bilinear"), tr("Bicubic"), + tr("Gaussian"), tr("ScaleForce"), tr("AMD FidelityFX™️ Super Resolution"), + }; + } else if (type == typeid(Settings::AntiAliasing)) { + return { + tr("None"), + tr("FXAA"), + tr("SMAA"), + }; } else if (type == typeid(Settings::AnisotropyMode)) { return { tr("Automatic"), tr("Default"), tr("2x"), tr("4x"), tr("8x"), tr("16x"), -- cgit v1.2.3 From a4de202cbd5abdf46c48663874e34bdd028b6df5 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sun, 7 May 2023 17:41:30 -0400 Subject: settings: Add anisotropy mode enum --- src/yuzu/configuration/shared_translation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 181dd7cf0..c20a3ebd9 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -132,6 +132,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { std::forward_list ComboboxEnumeration(std::type_index type, QWidget* parent) { const auto& tr = [&](const char* text) { return parent->tr(text); }; + // Intentionally skipping VSyncMode to let the UI fill that one out + if (type == typeid(Settings::AstcDecodeMode)) { return { tr("CPU"), @@ -199,6 +201,11 @@ std::forward_list ComboboxEnumeration(std::type_index type, QWidget* pa tr("FXAA"), tr("SMAA"), }; + } else if (type == typeid(Settings::AspectRatio)) { + return { + tr("Default (16:9)"), tr("Force 4:3"), tr("Force 21:9"), + tr("Force 16:10"), tr("Stretch to Window"), + }; } else if (type == typeid(Settings::AnisotropyMode)) { return { tr("Automatic"), tr("Default"), tr("2x"), tr("4x"), tr("8x"), tr("16x"), -- cgit v1.2.3 From d72ff0172661c0e10308d7000c4fef57cdb94d90 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 8 May 2023 10:05:37 -0400 Subject: shared_translations: Re flow strings --- src/yuzu/configuration/shared_translation.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index c20a3ebd9..5a2071781 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -62,12 +62,12 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); INSERT(nvdec_emulation, "NVDEC emulation:", ""); INSERT(accelerate_astc, "ASTC Decoding Method:", ""); - INSERT( - vsync_mode, "VSync Mode:", - "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen refresh " - "rate. FIFO Relaxed is similar to FIFO but allows tearing as it recovers from a slow down. " - "Mailbox can have lower latency than FIFO and does not tear but may drop frames. Immediate " - "(no synchronization) just presents whatever is available and can exhibit tearing."); + INSERT(vsync_mode, "VSync Mode:", + "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " + "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from " + "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop " + "frames.\nImmediate (no synchronization) just presents whatever is available and can " + "exhibit tearing."); INSERT(bg_red, "", ""); INSERT(bg_green, "", ""); INSERT(bg_blue, "", ""); -- cgit v1.2.3 From 39a1ffbb91a026fd3842f55ebca222db50afea41 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 8 May 2023 14:11:45 -0400 Subject: configuration: Use buttons instead of highlights Only for updated configs at the moment --- src/yuzu/configuration/shared_translation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 5a2071781..a13636af6 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -93,6 +93,9 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " "on all other drivers."); + INSERT(use_reactive_flushing, "Enable Reactive Flushing", + "Uses reactive flushing instead of predictive flushing, allowing more accurate memory " + "syncing."); // Renderer (Debug) -- cgit v1.2.3 From c530532de7f532eb39278b25d9810ced2e61872a Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 9 May 2023 01:36:17 -0400 Subject: shared_translation: Add UI widget translations --- src/yuzu/configuration/shared_translation.cpp | 128 +++++++++++++++----------- 1 file changed, 73 insertions(+), 55 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index a13636af6..d38815e77 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -11,6 +11,7 @@ #include #include "common/settings.h" #include "yuzu/configuration/shared_translation.h" +#include "yuzu/uisettings.h" namespace ConfigurationShared { @@ -18,102 +19,105 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { std::unique_ptr translations = std::make_unique(); const auto& tr = [parent](const char* text) -> QString { return parent->tr(text); }; -#define INSERT(ID, NAME, TOOLTIP) \ - translations->insert(std::pair{Settings::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}}) +#define INSERT(SETTINGS, ID, NAME, TOOLTIP) \ + translations->insert(std::pair{SETTINGS::values.ID.Id(), std::pair{tr((NAME)), tr((TOOLTIP))}}) // A setting can be ignored by giving it a blank name // Audio - INSERT(sink_id, "Output Engine:", ""); - INSERT(audio_output_device_id, "Output Device:", ""); - INSERT(audio_input_device_id, "Input Device:", ""); - INSERT(audio_muted, "Mute audio when in background", ""); - INSERT(volume, "Volume:", ""); + INSERT(Settings, sink_id, "Output Engine:", ""); + INSERT(Settings, audio_output_device_id, "Output Device:", ""); + INSERT(Settings, audio_input_device_id, "Input Device:", ""); + INSERT(Settings, audio_muted, "Mute audio when in background", ""); + INSERT(Settings, volume, "Volume:", ""); // Core - INSERT(use_multi_core, "Multicore CPU Emulation", ""); - INSERT(use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", ""); + INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); + INSERT(Settings, use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", + ""); // Cpu - INSERT(cpu_accuracy, "Accuracy:", ""); - INSERT(cpu_accuracy_first_time, "", ""); + INSERT(Settings, cpu_accuracy, "Accuracy:", ""); + INSERT(Settings, cpu_accuracy_first_time, "", ""); // Cpu Debug // Cpu Unsafe - INSERT(cpuopt_unsafe_unfuse_fma, "Unfuse FMA (improve performance on CPUs without FMA)", ""); - INSERT(cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", ""); - INSERT(cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", ""); - INSERT(cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", ""); - INSERT(cpuopt_unsafe_fastmem_check, "Disable address space checks", ""); - INSERT(cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", ""); + INSERT(Settings, cpuopt_unsafe_unfuse_fma, + "Unfuse FMA (improve performance on CPUs without FMA)", ""); + INSERT(Settings, cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", ""); + INSERT(Settings, cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", + ""); + INSERT(Settings, cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", ""); + INSERT(Settings, cpuopt_unsafe_fastmem_check, "Disable address space checks", ""); + INSERT(Settings, cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", ""); // Renderer - INSERT(renderer_backend, "API:", ""); - INSERT(vulkan_device, "Device:", ""); - INSERT(shader_backend, "Shader Backend:", ""); - INSERT(resolution_setup, "Resolution:", ""); - INSERT(scaling_filter, "Window Adapting Filter:", ""); - INSERT(fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", ""); - INSERT(anti_aliasing, "Anti-Aliasing Method:", ""); - INSERT(fullscreen_mode, "Fullscreen Mode:", ""); - INSERT(aspect_ratio, "Aspect Ratio:", ""); - INSERT(use_disk_shader_cache, "Use disk pipeline cache", ""); - INSERT(use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); - INSERT(nvdec_emulation, "NVDEC emulation:", ""); - INSERT(accelerate_astc, "ASTC Decoding Method:", ""); - INSERT(vsync_mode, "VSync Mode:", + INSERT(Settings, renderer_backend, "API:", ""); + INSERT(Settings, vulkan_device, "Device:", ""); + INSERT(Settings, shader_backend, "Shader Backend:", ""); + INSERT(Settings, resolution_setup, "Resolution:", ""); + INSERT(Settings, scaling_filter, "Window Adapting Filter:", ""); + INSERT(Settings, fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", ""); + INSERT(Settings, anti_aliasing, "Anti-Aliasing Method:", ""); + INSERT(Settings, fullscreen_mode, "Fullscreen Mode:", ""); + INSERT(Settings, aspect_ratio, "Aspect Ratio:", ""); + INSERT(Settings, use_disk_shader_cache, "Use disk pipeline cache", ""); + INSERT(Settings, use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); + INSERT(Settings, nvdec_emulation, "NVDEC emulation:", ""); + INSERT(Settings, accelerate_astc, "ASTC Decoding Method:", ""); + INSERT(Settings, vsync_mode, "VSync Mode:", "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from " "a slow down.\nMailbox can have lower latency than FIFO and does not tear but may drop " "frames.\nImmediate (no synchronization) just presents whatever is available and can " "exhibit tearing."); - INSERT(bg_red, "", ""); - INSERT(bg_green, "", ""); - INSERT(bg_blue, "", ""); + INSERT(Settings, bg_red, "", ""); + INSERT(Settings, bg_green, "", ""); + INSERT(Settings, bg_blue, "", ""); // Renderer (Advanced Graphics) - INSERT(async_presentation, "Enable asynchronous presentation (Vulkan only)", ""); - INSERT(renderer_force_max_clock, "Force maximum clocks (Vulkan only)", + INSERT(Settings, async_presentation, "Enable asynchronous presentation (Vulkan only)", ""); + INSERT(Settings, renderer_force_max_clock, "Force maximum clocks (Vulkan only)", "Runs work in the background while waiting for graphics commands to keep the GPU from " "lowering its clock speed."); - INSERT(max_anisotropy, "Anisotropic Filtering:", ""); - INSERT(gpu_accuracy, "Accuracy Level:", ""); - INSERT(use_asynchronous_shaders, "Use asynchronous shader building (Hack)", + INSERT(Settings, max_anisotropy, "Anisotropic Filtering:", ""); + INSERT(Settings, gpu_accuracy, "Accuracy Level:", ""); + INSERT(Settings, use_asynchronous_shaders, "Use asynchronous shader building (Hack)", "Enables asynchronous shader compilation, which may reduce shader stutter. This feature " "is experimental."); - INSERT(use_fast_gpu_time, "Use Fast GPU Time (Hack)", + INSERT(Settings, use_fast_gpu_time, "Use Fast GPU Time (Hack)", "Enables Fast GPU Time. This option will force most games to run at their highest " "native resolution."); - INSERT(use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache", + INSERT(Settings, use_vulkan_driver_pipeline_cache, "Use Vulkan pipeline cache", "Enables GPU vendor-specific pipeline cache. This option can improve shader loading " "time significantly in cases where the Vulkan driver does not store pipeline cache " "files internally."); - INSERT(enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)", + INSERT(Settings, enable_compute_pipelines, "Enable Compute Pipelines (Intel Vulkan Only)", "Enable compute pipelines, required by some games.\nThis setting only exists for Intel " "proprietary drivers, and may crash if enabled.\nCompute pipelines are always enabled " "on all other drivers."); - INSERT(use_reactive_flushing, "Enable Reactive Flushing", + INSERT(Settings, use_reactive_flushing, "Enable Reactive Flushing", "Uses reactive flushing instead of predictive flushing, allowing more accurate memory " "syncing."); // Renderer (Debug) // Renderer (General) - INSERT(use_speed_limit, "Limit Speed Percent", ""); - INSERT(speed_limit, "Limit Speed Percent", ""); + INSERT(Settings, use_speed_limit, "", ""); + INSERT(Settings, speed_limit, "Limit Speed Percent", ""); // System - INSERT(rng_seed_enabled, "RNG Seed", ""); - INSERT(rng_seed, "RNG Seed", ""); - INSERT(device_name, "Device Name", ""); - INSERT(custom_rtc_enabled, "Custom RTC", ""); - INSERT(custom_rtc, "Custom RTC", ""); - INSERT(language_index, "Language:", ""); - INSERT(region_index, "Region:", ""); - INSERT(time_zone_index, "Time Zone:", ""); - INSERT(sound_index, "Sound Output Mode:", ""); - INSERT(use_docked_mode, "", ""); + INSERT(Settings, rng_seed_enabled, "RNG Seed", ""); + INSERT(Settings, rng_seed, "RNG Seed", ""); + INSERT(Settings, device_name, "Device Name", ""); + INSERT(Settings, custom_rtc_enabled, "Custom RTC", ""); + INSERT(Settings, custom_rtc, "Custom RTC", ""); + INSERT(Settings, language_index, "Language:", ""); + INSERT(Settings, region_index, "Region:", ""); + INSERT(Settings, time_zone_index, "Time Zone:", ""); + INSERT(Settings, sound_index, "Sound Output Mode:", ""); + INSERT(Settings, use_docked_mode, "", ""); // Controls @@ -127,6 +131,20 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Web Service + // Ui + + // Ui General + INSERT(UISettings, select_user_on_boot, "Prompt for user on game boot", ""); + INSERT(UISettings, pause_when_in_background, "Pause emulation when in background", ""); + INSERT(UISettings, confirm_before_closing, "Confirm exit while emulation is running", ""); + INSERT(UISettings, hide_mouse, "Hide mouse on inactivity", ""); + + // Ui Debugging + + // Ui Multiplayer + + // Ui Games list + #undef INSERT return translations; -- cgit v1.2.3 From 8e151460265f04c7bf4a981b5f97f252a0444c27 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 10 May 2023 17:57:25 -0400 Subject: configure_system: Implement with for loop --- src/yuzu/configuration/shared_translation.cpp | 43 +++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index d38815e77..dc9f15cdd 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -109,15 +109,16 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // System INSERT(Settings, rng_seed_enabled, "RNG Seed", ""); - INSERT(Settings, rng_seed, "RNG Seed", ""); + INSERT(Settings, rng_seed, "", ""); INSERT(Settings, device_name, "Device Name", ""); INSERT(Settings, custom_rtc_enabled, "Custom RTC", ""); - INSERT(Settings, custom_rtc, "Custom RTC", ""); + INSERT(Settings, custom_rtc, "", ""); INSERT(Settings, language_index, "Language:", ""); INSERT(Settings, region_index, "Region:", ""); INSERT(Settings, time_zone_index, "Time Zone:", ""); INSERT(Settings, sound_index, "Sound Output Mode:", ""); INSERT(Settings, use_docked_mode, "", ""); + INSERT(Settings, current_user, "", ""); // Controls @@ -231,6 +232,44 @@ std::forward_list ComboboxEnumeration(std::type_index type, QWidget* pa return { tr("Automatic"), tr("Default"), tr("2x"), tr("4x"), tr("8x"), tr("16x"), }; + } else if (type == typeid(Settings::Language)) { + return { + tr("Japanese (日本語)"), + tr("American English"), + tr("French (français)"), + tr("German (Deutsch)"), + tr("Italian (italiano)"), + tr("Spanish (español)"), + tr("Chinese"), + tr("Korean (한국어)"), + tr("Dutch (Nederlands)"), + tr("Portuguese (português)"), + tr("Russian (Русский)"), + tr("Taiwanese"), + tr("British English"), + tr("Canadian French"), + tr("Latin American Spanish"), + tr("Simplified Chinese"), + tr("Traditional Chinese (正體中文)"), + tr("Brazilian Portuguese (português do Brasil)"), + }; + } else if (type == typeid(Settings::Region)) { + return { + tr("Japan"), tr("USA"), tr("Europe"), tr("Australia"), + tr("China"), tr("Korea"), tr("Taiwan"), + }; + } else if (type == typeid(Settings::TimeZone)) { + return { + tr("Auto"), tr("Default"), tr("CET"), tr("CST6CDT"), tr("Cuba"), + tr("EET"), tr("Egypt"), tr("Eire"), tr("EST"), tr("EST5EDT"), + tr("GB"), tr("GB-Eire"), tr("GMT"), tr("GMT+0"), tr("GMT-0"), + tr("GMT0"), tr("Greenwich"), tr("Hongkong"), tr("HST"), tr("Iceland"), + tr("Iran"), tr("Israel"), tr("Jamaica"), tr("Kwajalein"), tr("Libya"), + tr("MET"), tr("MST"), tr("MST7MDT"), tr("Navajo"), tr("NZ"), + tr("NZ-CHAT"), tr("Poland"), tr("Portugal"), tr("PRC"), tr("PST8PDT"), + tr("ROC"), tr("ROK"), tr("Singapore"), tr("Turkey"), tr("UCT"), + tr("W-SU"), tr("WET"), tr("Zulu"), + }; } return {}; -- cgit v1.2.3 From 4ff8255e4a985e69046e453a9bd38adf80346548 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:53:26 -0400 Subject: shared_widget: Refactor helpers Makes checkbox creation an option as opposed to a label. --- src/yuzu/configuration/shared_translation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index dc9f15cdd..6038e8c25 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -108,11 +108,11 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, speed_limit, "Limit Speed Percent", ""); // System - INSERT(Settings, rng_seed_enabled, "RNG Seed", ""); - INSERT(Settings, rng_seed, "", ""); + INSERT(Settings, rng_seed, "RNG Seed", ""); + INSERT(Settings, rng_seed_enabled, "", ""); INSERT(Settings, device_name, "Device Name", ""); - INSERT(Settings, custom_rtc_enabled, "Custom RTC", ""); - INSERT(Settings, custom_rtc, "", ""); + INSERT(Settings, custom_rtc, "Custom RTC", ""); + INSERT(Settings, custom_rtc_enabled, "", ""); INSERT(Settings, language_index, "Language:", ""); INSERT(Settings, region_index, "Region:", ""); INSERT(Settings, time_zone_index, "Time Zone:", ""); -- cgit v1.2.3 From 432f68ad29df7a368ba375d75d667c954e9c80b9 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 18 May 2023 17:54:22 -0400 Subject: configure_audio: Implement ui generation Needs a considerable amount of management specific to some of the comoboboxes due to the audio engine configuration. general: Partial audio config implmentation configure_audio: Implement ui generation Needs a considerable amount of management specific to some of the comoboboxes due to the audio engine configuration. general: Partial audio config implmentation settings: Make audio settings as enums --- src/yuzu/configuration/shared_translation.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 6038e8c25..c3b38f776 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -30,6 +30,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, audio_input_device_id, "Input Device:", ""); INSERT(Settings, audio_muted, "Mute audio when in background", ""); INSERT(Settings, volume, "Volume:", ""); + INSERT(Settings, dump_audio_commands, "", ""); // Core INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); @@ -270,6 +271,12 @@ std::forward_list ComboboxEnumeration(std::type_index type, QWidget* pa tr("ROC"), tr("ROK"), tr("Singapore"), tr("Turkey"), tr("UCT"), tr("W-SU"), tr("WET"), tr("Zulu"), }; + } else if (type == typeid(Settings::AudioMode)) { + return { + tr("Mono"), + tr("Stereo"), + tr("Surround"), + }; } return {}; -- cgit v1.2.3 From c5a3642cb62b4676d0c8b98949daec20e7c02e6b Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 18 May 2023 22:17:36 -0400 Subject: configuration: Use a mapping of setting value to name Makes comboboxes always correspond to the value of the setting they're modifying. --- src/yuzu/configuration/shared_translation.cpp | 320 ++++++++++++++++---------- 1 file changed, 195 insertions(+), 125 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index c3b38f776..8fd8f3076 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -152,134 +152,204 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { return translations; } -std::forward_list ComboboxEnumeration(std::type_index type, QWidget* parent) { +std::unique_ptr ComboboxEnumeration(QWidget* parent) { + std::unique_ptr translations = + std::make_unique(); const auto& tr = [&](const char* text) { return parent->tr(text); }; // Intentionally skipping VSyncMode to let the UI fill that one out - if (type == typeid(Settings::AstcDecodeMode)) { - return { - tr("CPU"), - tr("GPU"), - tr("CPU Asynchronous"), - }; - } else if (type == typeid(Settings::RendererBackend)) { - return { - tr("OpenGL"), - tr("Vulkan"), - tr("Null"), - }; - } else if (type == typeid(Settings::ShaderBackend)) { - return { - tr("GLSL"), - tr("GLASM (Assembly Shaders, NVIDIA Only)"), - tr("SPIR-V (Experimental, Mesa Only)"), - }; - } else if (type == typeid(Settings::GPUAccuracy)) { - return { - tr("Normal"), - tr("High"), - tr("Extreme"), - }; - } else if (type == typeid(Settings::CPUAccuracy)) { - return { - tr("Auto"), - tr("Accurate"), - tr("Unsafe"), - tr("Paranoid (disables most optimizations)"), - }; - } else if (type == typeid(Settings::FullscreenMode)) { - return { - tr("Borderless Windowed"), - tr("Exclusive Fullscreen"), - }; - } else if (type == typeid(Settings::NvdecEmulation)) { - return { - tr("No Video Output"), - tr("CPU Video Decoding"), - tr("GPU Video Decoding (Default)"), - }; - } else if (type == typeid(Settings::ResolutionSetup)) { - return { - tr("0.5X (360p/540p) [EXPERIMENTAL]"), - tr("0.75X (540p/810p) [EXPERIMENTAL]"), - tr("1X (720p/1080p)"), - tr("1.5X (1080p/1620p) [EXPERIMENTAL]"), - tr("2X (1440p/2160p)"), - tr("3X (2160p/3240p)"), - tr("4X (2880p/4320p)"), - tr("5X (3600p/5400p)"), - tr("6X (4320p/6480p)"), - tr("7X (5040p/7560p)"), - tr("8X (5760p/8640p)"), - }; - } else if (type == typeid(Settings::ScalingFilter)) { - return { - tr("Nearest Neighbor"), tr("Bilinear"), tr("Bicubic"), - tr("Gaussian"), tr("ScaleForce"), tr("AMD FidelityFX™️ Super Resolution"), - }; - } else if (type == typeid(Settings::AntiAliasing)) { - return { - tr("None"), - tr("FXAA"), - tr("SMAA"), - }; - } else if (type == typeid(Settings::AspectRatio)) { - return { - tr("Default (16:9)"), tr("Force 4:3"), tr("Force 21:9"), - tr("Force 16:10"), tr("Stretch to Window"), - }; - } else if (type == typeid(Settings::AnisotropyMode)) { - return { - tr("Automatic"), tr("Default"), tr("2x"), tr("4x"), tr("8x"), tr("16x"), - }; - } else if (type == typeid(Settings::Language)) { - return { - tr("Japanese (日本語)"), - tr("American English"), - tr("French (français)"), - tr("German (Deutsch)"), - tr("Italian (italiano)"), - tr("Spanish (español)"), - tr("Chinese"), - tr("Korean (한국어)"), - tr("Dutch (Nederlands)"), - tr("Portuguese (português)"), - tr("Russian (Русский)"), - tr("Taiwanese"), - tr("British English"), - tr("Canadian French"), - tr("Latin American Spanish"), - tr("Simplified Chinese"), - tr("Traditional Chinese (正體中文)"), - tr("Brazilian Portuguese (português do Brasil)"), - }; - } else if (type == typeid(Settings::Region)) { - return { - tr("Japan"), tr("USA"), tr("Europe"), tr("Australia"), - tr("China"), tr("Korea"), tr("Taiwan"), - }; - } else if (type == typeid(Settings::TimeZone)) { - return { - tr("Auto"), tr("Default"), tr("CET"), tr("CST6CDT"), tr("Cuba"), - tr("EET"), tr("Egypt"), tr("Eire"), tr("EST"), tr("EST5EDT"), - tr("GB"), tr("GB-Eire"), tr("GMT"), tr("GMT+0"), tr("GMT-0"), - tr("GMT0"), tr("Greenwich"), tr("Hongkong"), tr("HST"), tr("Iceland"), - tr("Iran"), tr("Israel"), tr("Jamaica"), tr("Kwajalein"), tr("Libya"), - tr("MET"), tr("MST"), tr("MST7MDT"), tr("Navajo"), tr("NZ"), - tr("NZ-CHAT"), tr("Poland"), tr("Portugal"), tr("PRC"), tr("PST8PDT"), - tr("ROC"), tr("ROK"), tr("Singapore"), tr("Turkey"), tr("UCT"), - tr("W-SU"), tr("WET"), tr("Zulu"), - }; - } else if (type == typeid(Settings::AudioMode)) { - return { - tr("Mono"), - tr("Stereo"), - tr("Surround"), - }; - } - - return {}; -} + translations->insert( + {typeid(Settings::AstcDecodeMode), + { + {static_cast(Settings::AstcDecodeMode::CPU), tr("CPU")}, + {static_cast(Settings::AstcDecodeMode::GPU), tr("GPU")}, + {static_cast(Settings::AstcDecodeMode::CPUAsynchronous), tr("CPU Asynchronous")}, + }}); + translations->insert({typeid(Settings::RendererBackend), + { +#ifdef HAS_OPENGL + {static_cast(Settings::RendererBackend::OpenGL), tr("OpenGL")}, +#endif + {static_cast(Settings::RendererBackend::Vulkan), tr("Vulkan")}, + {static_cast(Settings::RendererBackend::Null), tr("Null")}, + }}); + translations->insert({typeid(Settings::ShaderBackend), + { + {static_cast(Settings::ShaderBackend::GLSL), tr("GLSL")}, + {static_cast(Settings::ShaderBackend::GLASM), + tr("GLASM (Assembly Shaders, NVIDIA Only)")}, + {static_cast(Settings::ShaderBackend::SPIRV), + tr("SPIR-V (Experimental, Mesa Only)")}, + }}); + translations->insert({typeid(Settings::GPUAccuracy), + { + {static_cast(Settings::GPUAccuracy::Normal), tr("Normal")}, + {static_cast(Settings::GPUAccuracy::High), tr("High")}, + {static_cast(Settings::GPUAccuracy::Extreme), tr("Extreme")}, + }}); + translations->insert({typeid(Settings::CPUAccuracy), + { + {static_cast(Settings::CPUAccuracy::Auto), tr("Auto")}, + {static_cast(Settings::CPUAccuracy::Accurate), tr("Accurate")}, + {static_cast(Settings::CPUAccuracy::Unsafe), tr("Unsafe")}, + {static_cast(Settings::CPUAccuracy::Paranoid), + tr("Paranoid (disables most optimizations)")}, + }}); + translations->insert( + {typeid(Settings::FullscreenMode), + { + {static_cast(Settings::FullscreenMode::Borderless), tr("Borderless Windowed")}, + {static_cast(Settings::FullscreenMode::Exclusive), tr("Exclusive Fullscreen")}, + }}); + translations->insert( + {typeid(Settings::NvdecEmulation), + { + {static_cast(Settings::NvdecEmulation::Off), tr("No Video Output")}, + {static_cast(Settings::NvdecEmulation::CPU), tr("CPU Video Decoding")}, + {static_cast(Settings::NvdecEmulation::GPU), tr("GPU Video Decoding (Default)")}, + }}); + translations->insert( + {typeid(Settings::ResolutionSetup), + { + {static_cast(Settings::ResolutionSetup::Res1_2X), + tr("0.5X (360p/540p) [EXPERIMENTAL]")}, + {static_cast(Settings::ResolutionSetup::Res3_4X), + tr("0.75X (540p/810p) [EXPERIMENTAL]")}, + {static_cast(Settings::ResolutionSetup::Res1X), tr("1X (720p/1080p)")}, + {static_cast(Settings::ResolutionSetup::Res3_2X), + tr("1.5X (1080p/1620p) [EXPERIMENTAL]")}, + {static_cast(Settings::ResolutionSetup::Res2X), tr("2X (1440p/2160p)")}, + {static_cast(Settings::ResolutionSetup::Res3X), tr("3X (2160p/3240p)")}, + {static_cast(Settings::ResolutionSetup::Res4X), tr("4X (2880p/4320p)")}, + {static_cast(Settings::ResolutionSetup::Res5X), tr("5X (3600p/5400p)")}, + {static_cast(Settings::ResolutionSetup::Res6X), tr("6X (4320p/6480p)")}, + {static_cast(Settings::ResolutionSetup::Res7X), tr("7X (5040p/7560p)")}, + {static_cast(Settings::ResolutionSetup::Res8X), tr("8X (5760p/8640p)")}, + }}); + translations->insert( + {typeid(Settings::ScalingFilter), + { + {static_cast(Settings::ScalingFilter::NearestNeighbor), tr("Nearest Neighbor")}, + {static_cast(Settings::ScalingFilter::Bilinear), tr("Bilinear")}, + {static_cast(Settings::ScalingFilter::Bicubic), tr("Bicubic")}, + {static_cast(Settings::ScalingFilter::Gaussian), tr("Gaussian")}, + {static_cast(Settings::ScalingFilter::ScaleForce), tr("ScaleForce")}, + {static_cast(Settings::ScalingFilter::Fsr), + tr("AMD FidelityFX™️ Super Resolution")}, + }}); + translations->insert({typeid(Settings::AntiAliasing), + { + {static_cast(Settings::AntiAliasing::None), tr("None")}, + {static_cast(Settings::AntiAliasing::Fxaa), tr("FXAA")}, + {static_cast(Settings::AntiAliasing::Smaa), tr("SMAA")}, + }}); + translations->insert( + {typeid(Settings::AspectRatio), + { + {static_cast(Settings::AspectRatio::R16_9), tr("Default (16:9)")}, + {static_cast(Settings::AspectRatio::R4_3), tr("Force 4:3")}, + {static_cast(Settings::AspectRatio::R21_9), tr("Force 21:9")}, + {static_cast(Settings::AspectRatio::R16_10), tr("Force 16:10")}, + {static_cast(Settings::AspectRatio::Stretch), tr("Stretch to Window")}, + }}); + translations->insert( + {typeid(Settings::AnisotropyMode), + { + {static_cast(Settings::AnisotropyMode::Automatic), tr("Automatic")}, + {static_cast(Settings::AnisotropyMode::Default), tr("Default")}, + {static_cast(Settings::AnisotropyMode::X2), tr("2x")}, + {static_cast(Settings::AnisotropyMode::X4), tr("4x")}, + {static_cast(Settings::AnisotropyMode::X8), tr("8x")}, + {static_cast(Settings::AnisotropyMode::X16), tr("16x")}, + }}); + translations->insert( + {typeid(Settings::Language), + { + {static_cast(Settings::Language::Japanese), tr("Japanese (日本語)")}, + {static_cast(Settings::Language::EnglishAmerican), tr("American English")}, + {static_cast(Settings::Language::French), tr("French (français)")}, + {static_cast(Settings::Language::German), tr("German (Deutsch)")}, + {static_cast(Settings::Language::Italian), tr("Italian (italiano)")}, + {static_cast(Settings::Language::Spanish), tr("Spanish (español)")}, + {static_cast(Settings::Language::Chinese), tr("Chinese")}, + {static_cast(Settings::Language::Korean), tr("Korean (한국어)")}, + {static_cast(Settings::Language::Dutch), tr("Dutch (Nederlands)")}, + {static_cast(Settings::Language::Portuguese), tr("Portuguese (português)")}, + {static_cast(Settings::Language::Russian), tr("Russian (Русский)")}, + {static_cast(Settings::Language::Taiwanese), tr("Taiwanese")}, + {static_cast(Settings::Language::EnglishBritish), tr("British English")}, + {static_cast(Settings::Language::FrenchCanadian), tr("Canadian French")}, + {static_cast(Settings::Language::SpanishLatin), tr("Latin American Spanish")}, + {static_cast(Settings::Language::ChineseSimplified), tr("Simplified Chinese")}, + {static_cast(Settings::Language::ChineseTraditional), + tr("Traditional Chinese (正體中文)")}, + {static_cast(Settings::Language::PortugueseBrazilian), + tr("Brazilian Portuguese (português do Brasil)")}, + }}); + translations->insert({typeid(Settings::Region), + { + {static_cast(Settings::Region::Japan), tr("Japan")}, + {static_cast(Settings::Region::USA), tr("USA")}, + {static_cast(Settings::Region::Europe), tr("Europe")}, + {static_cast(Settings::Region::Australia), tr("Australia")}, + {static_cast(Settings::Region::China), tr("China")}, + {static_cast(Settings::Region::Korea), tr("Korea")}, + {static_cast(Settings::Region::Taiwan), tr("Taiwan")}, + }}); + translations->insert({typeid(Settings::TimeZone), + { + {static_cast(Settings::TimeZone::Auto), tr("Auto")}, + {static_cast(Settings::TimeZone::Default), tr("Default")}, + {static_cast(Settings::TimeZone::CET), tr("CET")}, + {static_cast(Settings::TimeZone::CST6CDT), tr("CST6CDT")}, + {static_cast(Settings::TimeZone::Cuba), tr("Cuba")}, + {static_cast(Settings::TimeZone::EET), tr("EET")}, + {static_cast(Settings::TimeZone::Egypt), tr("Egypt")}, + {static_cast(Settings::TimeZone::Eire), tr("Eire")}, + {static_cast(Settings::TimeZone::EST), tr("EST")}, + {static_cast(Settings::TimeZone::EST5EDT), tr("EST5EDT")}, + {static_cast(Settings::TimeZone::GB), tr("GB")}, + {static_cast(Settings::TimeZone::GBEire), tr("GB-Eire")}, + {static_cast(Settings::TimeZone::GMT), tr("GMT")}, + {static_cast(Settings::TimeZone::GMTPlusZero), tr("GMT+0")}, + {static_cast(Settings::TimeZone::GMTMinusZero), tr("GMT-0")}, + {static_cast(Settings::TimeZone::GMTZero), tr("GMT0")}, + {static_cast(Settings::TimeZone::Greenwich), tr("Greenwich")}, + {static_cast(Settings::TimeZone::Hongkong), tr("Hongkong")}, + {static_cast(Settings::TimeZone::HST), tr("HST")}, + {static_cast(Settings::TimeZone::Iceland), tr("Iceland")}, + {static_cast(Settings::TimeZone::Iran), tr("Iran")}, + {static_cast(Settings::TimeZone::Israel), tr("Israel")}, + {static_cast(Settings::TimeZone::Jamaica), tr("Jamaica")}, + {static_cast(Settings::TimeZone::Kwajalein), tr("Kwajalein")}, + {static_cast(Settings::TimeZone::Libya), tr("Libya")}, + {static_cast(Settings::TimeZone::MET), tr("MET")}, + {static_cast(Settings::TimeZone::MST), tr("MST")}, + {static_cast(Settings::TimeZone::MST7MDT), tr("MST7MDT")}, + {static_cast(Settings::TimeZone::Navajo), tr("Navajo")}, + {static_cast(Settings::TimeZone::NZ), tr("NZ")}, + {static_cast(Settings::TimeZone::NZCHAT), tr("NZ-CHAT")}, + {static_cast(Settings::TimeZone::Poland), tr("Poland")}, + {static_cast(Settings::TimeZone::Portugal), tr("Portugal")}, + {static_cast(Settings::TimeZone::PRC), tr("PRC")}, + {static_cast(Settings::TimeZone::PST8PDT), tr("PST8PDT")}, + {static_cast(Settings::TimeZone::ROC), tr("ROC")}, + {static_cast(Settings::TimeZone::ROK), tr("ROK")}, + {static_cast(Settings::TimeZone::Singapore), tr("Singapore")}, + {static_cast(Settings::TimeZone::Turkey), tr("Turkey")}, + {static_cast(Settings::TimeZone::UCT), tr("UCT")}, + {static_cast(Settings::TimeZone::W_SU), tr("W-SU")}, + {static_cast(Settings::TimeZone::WET), tr("WET")}, + {static_cast(Settings::TimeZone::Zulu), tr("Zulu")}, + }}); + translations->insert({typeid(Settings::AudioMode), + { + {static_cast(Settings::AudioMode::Mono), tr("Mono")}, + {static_cast(Settings::AudioMode::Stereo), tr("Stereo")}, + {static_cast(Settings::AudioMode::Surround), tr("Surround")}, + }}); + return translations; +} } // namespace ConfigurationShared -- cgit v1.2.3 From 7734127f9e9d950c50045942bb24f76652e86788 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 19 May 2023 00:51:57 -0400 Subject: shared_translation: Add missing tooltips --- src/yuzu/configuration/shared_translation.cpp | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 8fd8f3076..49cb94d2e 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -45,13 +45,26 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Cpu Unsafe INSERT(Settings, cpuopt_unsafe_unfuse_fma, - "Unfuse FMA (improve performance on CPUs without FMA)", ""); - INSERT(Settings, cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", ""); + "Unfuse FMA (improve performance on CPUs without FMA)", + "This option improves speed by reducing accuracy of fused-multiply-add instructions on " + "CPUs without native FMA support."); + INSERT(Settings, cpuopt_unsafe_reduce_fp_error, "Faster FRSQRTE and FRECPE", + "This option improves the speed of some approximate floating-point functions by using " + "less accurate native approximations."); INSERT(Settings, cpuopt_unsafe_ignore_standard_fpcr, "Faster ASIMD instructions (32 bits only)", - ""); - INSERT(Settings, cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", ""); - INSERT(Settings, cpuopt_unsafe_fastmem_check, "Disable address space checks", ""); - INSERT(Settings, cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", ""); + "This option improves the speed of 32 bits ASIMD floating-point functions by running " + "with incorrect rounding modes."); + INSERT(Settings, cpuopt_unsafe_inaccurate_nan, "Inaccurate NaN handling", + "This option improves speed by removing NaN checking. Please note this also reduces " + "accuracy of certain floating-point instructions."); + INSERT( + Settings, cpuopt_unsafe_fastmem_check, "Disable address space checks", + "This option improves speed by eliminating a safety check before every memory read/write " + "in guest. Disabling it may allow a game to read/write the emulator's memory."); + INSERT(Settings, cpuopt_unsafe_ignore_global_monitor, "Ignore global monitor", + "This option improves speed by relying only on the semantics of cmpxchg to ensure " + "safety of exclusive access instructions. Please note this may result in deadlocks and " + "other race conditions."); // Renderer INSERT(Settings, renderer_backend, "API:", ""); @@ -114,7 +127,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, device_name, "Device Name", ""); INSERT(Settings, custom_rtc, "Custom RTC", ""); INSERT(Settings, custom_rtc_enabled, "", ""); - INSERT(Settings, language_index, "Language:", ""); + INSERT(Settings, language_index, + "Language:", "Note: this can be overridden when region setting is auto-select"); INSERT(Settings, region_index, "Region:", ""); INSERT(Settings, time_zone_index, "Time Zone:", ""); INSERT(Settings, sound_index, "Sound Output Mode:", ""); -- cgit v1.2.3 From 09f61656e36b1a1e2efa0d34a51ccf8b1aa9c130 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:04:05 -0400 Subject: shared_translation: Add translation for AstcRecompression --- src/yuzu/configuration/shared_translation.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 49cb94d2e..50e19ede1 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -80,6 +80,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, use_asynchronous_gpu_emulation, "Use asynchronous GPU emulation", ""); INSERT(Settings, nvdec_emulation, "NVDEC emulation:", ""); INSERT(Settings, accelerate_astc, "ASTC Decoding Method:", ""); + INSERT(Settings, astc_recompression, "ASTC Recompression Method:", ""); INSERT(Settings, vsync_mode, "VSync Mode:", "FIFO (VSync) does not drop frames or exhibit tearing but is limited by the screen " "refresh rate.\nFIFO Relaxed is similar to FIFO but allows tearing as it recovers from " @@ -180,6 +181,14 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { {static_cast(Settings::AstcDecodeMode::GPU), tr("GPU")}, {static_cast(Settings::AstcDecodeMode::CPUAsynchronous), tr("CPU Asynchronous")}, }}); + translations->insert( + {typeid(Settings::AstcRecompression), + { + {static_cast(Settings::AstcRecompression::Uncompressed), + tr("Uncompressed (Best quality)")}, + {static_cast(Settings::AstcRecompression::Bc1), tr("BC1 (Low quality)")}, + {static_cast(Settings::AstcRecompression::Bc3), tr("BC3 (Medium quality)")}, + }}); translations->insert({typeid(Settings::RendererBackend), { #ifdef HAS_OPENGL -- cgit v1.2.3 From f7948b7b64900451b34a639ca0564c6950b5e58e Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 6 Jun 2023 21:55:46 -0400 Subject: settings,general: Rename/reorder setting ids --- src/yuzu/configuration/shared_translation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 50e19ede1..5d4e29a08 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -72,7 +72,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, shader_backend, "Shader Backend:", ""); INSERT(Settings, resolution_setup, "Resolution:", ""); INSERT(Settings, scaling_filter, "Window Adapting Filter:", ""); - INSERT(Settings, fsr_sharpening_slider, "AMD FidelityFX™ Super Resolution Sharpness:", ""); + INSERT(Settings, fsr_sharpening_slider, "FSR Sharpness:", ""); INSERT(Settings, anti_aliasing, "Anti-Aliasing Method:", ""); INSERT(Settings, fullscreen_mode, "Fullscreen Mode:", ""); INSERT(Settings, aspect_ratio, "Aspect Ratio:", ""); -- cgit v1.2.3 From d146dd9d123a999e40307a93403239b81b04bffc Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 7 Jun 2023 01:52:23 -0400 Subject: settings,general: Rename non-confirming enums --- src/yuzu/configuration/shared_translation.cpp | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 5d4e29a08..4caa44e1b 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -177,9 +177,9 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { translations->insert( {typeid(Settings::AstcDecodeMode), { - {static_cast(Settings::AstcDecodeMode::CPU), tr("CPU")}, - {static_cast(Settings::AstcDecodeMode::GPU), tr("GPU")}, - {static_cast(Settings::AstcDecodeMode::CPUAsynchronous), tr("CPU Asynchronous")}, + {static_cast(Settings::AstcDecodeMode::Cpu), tr("CPU")}, + {static_cast(Settings::AstcDecodeMode::Gpu), tr("GPU")}, + {static_cast(Settings::AstcDecodeMode::CpuAsynchronous), tr("CPU Asynchronous")}, }}); translations->insert( {typeid(Settings::AstcRecompression), @@ -199,24 +199,24 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { }}); translations->insert({typeid(Settings::ShaderBackend), { - {static_cast(Settings::ShaderBackend::GLSL), tr("GLSL")}, - {static_cast(Settings::ShaderBackend::GLASM), + {static_cast(Settings::ShaderBackend::Glsl), tr("GLSL")}, + {static_cast(Settings::ShaderBackend::Glasm), tr("GLASM (Assembly Shaders, NVIDIA Only)")}, - {static_cast(Settings::ShaderBackend::SPIRV), + {static_cast(Settings::ShaderBackend::SpirV), tr("SPIR-V (Experimental, Mesa Only)")}, }}); - translations->insert({typeid(Settings::GPUAccuracy), + translations->insert({typeid(Settings::GpuAccuracy), { - {static_cast(Settings::GPUAccuracy::Normal), tr("Normal")}, - {static_cast(Settings::GPUAccuracy::High), tr("High")}, - {static_cast(Settings::GPUAccuracy::Extreme), tr("Extreme")}, + {static_cast(Settings::GpuAccuracy::Normal), tr("Normal")}, + {static_cast(Settings::GpuAccuracy::High), tr("High")}, + {static_cast(Settings::GpuAccuracy::Extreme), tr("Extreme")}, }}); - translations->insert({typeid(Settings::CPUAccuracy), + translations->insert({typeid(Settings::CpuAccuracy), { - {static_cast(Settings::CPUAccuracy::Auto), tr("Auto")}, - {static_cast(Settings::CPUAccuracy::Accurate), tr("Accurate")}, - {static_cast(Settings::CPUAccuracy::Unsafe), tr("Unsafe")}, - {static_cast(Settings::CPUAccuracy::Paranoid), + {static_cast(Settings::CpuAccuracy::Auto), tr("Auto")}, + {static_cast(Settings::CpuAccuracy::Accurate), tr("Accurate")}, + {static_cast(Settings::CpuAccuracy::Unsafe), tr("Unsafe")}, + {static_cast(Settings::CpuAccuracy::Paranoid), tr("Paranoid (disables most optimizations)")}, }}); translations->insert( @@ -229,8 +229,8 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { {typeid(Settings::NvdecEmulation), { {static_cast(Settings::NvdecEmulation::Off), tr("No Video Output")}, - {static_cast(Settings::NvdecEmulation::CPU), tr("CPU Video Decoding")}, - {static_cast(Settings::NvdecEmulation::GPU), tr("GPU Video Decoding (Default)")}, + {static_cast(Settings::NvdecEmulation::Cpu), tr("CPU Video Decoding")}, + {static_cast(Settings::NvdecEmulation::Gpu), tr("GPU Video Decoding (Default)")}, }}); translations->insert( {typeid(Settings::ResolutionSetup), @@ -313,7 +313,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { translations->insert({typeid(Settings::Region), { {static_cast(Settings::Region::Japan), tr("Japan")}, - {static_cast(Settings::Region::USA), tr("USA")}, + {static_cast(Settings::Region::Usa), tr("USA")}, {static_cast(Settings::Region::Europe), tr("Europe")}, {static_cast(Settings::Region::Australia), tr("Australia")}, {static_cast(Settings::Region::China), tr("China")}, -- cgit v1.2.3 From 681ebcf4a5accd0315fd939ce66f672ab318affe Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:09:41 -0400 Subject: shared_translation: Add translation for use video framrate --- src/yuzu/configuration/shared_translation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 4caa44e1b..cf5d74c83 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -115,6 +115,9 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, use_reactive_flushing, "Enable Reactive Flushing", "Uses reactive flushing instead of predictive flushing, allowing more accurate memory " "syncing."); + INSERT(Settings, use_video_framerate, "Sync to framerate of video playback", + "Run the game at normal speed during video playback, even when the framerate is " + "unlocked."); // Renderer (Debug) -- cgit v1.2.3 From 47d870b11f86e8af43c32f762aa2eedfd51ed7b0 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 9 Jun 2023 19:52:59 -0400 Subject: shared_translation: Populate combobox enums with macro --- src/yuzu/configuration/shared_translation.cpp | 326 +++++++++++++------------- 1 file changed, 158 insertions(+), 168 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index cf5d74c83..1787a35ff 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -175,207 +175,197 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { std::make_unique(); const auto& tr = [&](const char* text) { return parent->tr(text); }; +#define PAIR(ENUM, VALUE, TRANSLATION) \ + { static_cast(Settings::ENUM::VALUE), tr(TRANSLATION) } +#define CTX_PAIR(ENUM, VALUE, TRANSLATION, CONTEXT) \ + { static_cast(Settings::ENUM::VALUE), tr(TRANSLATION, CONTEXT) } + // Intentionally skipping VSyncMode to let the UI fill that one out - translations->insert( - {typeid(Settings::AstcDecodeMode), - { - {static_cast(Settings::AstcDecodeMode::Cpu), tr("CPU")}, - {static_cast(Settings::AstcDecodeMode::Gpu), tr("GPU")}, - {static_cast(Settings::AstcDecodeMode::CpuAsynchronous), tr("CPU Asynchronous")}, - }}); - translations->insert( - {typeid(Settings::AstcRecompression), - { - {static_cast(Settings::AstcRecompression::Uncompressed), - tr("Uncompressed (Best quality)")}, - {static_cast(Settings::AstcRecompression::Bc1), tr("BC1 (Low quality)")}, - {static_cast(Settings::AstcRecompression::Bc3), tr("BC3 (Medium quality)")}, - }}); + translations->insert({typeid(Settings::AstcDecodeMode), + { + PAIR(AstcDecodeMode, Cpu, "CPU"), + PAIR(AstcDecodeMode, Gpu, "GPU"), + PAIR(AstcDecodeMode, CpuAsynchronous, "CPU Asynchronous"), + }}); + translations->insert({typeid(Settings::AstcRecompression), + { + PAIR(AstcRecompression, Uncompressed, "Uncompressed (Best quality)"), + PAIR(AstcRecompression, Bc1, "BC1 (Low quality)"), + PAIR(AstcRecompression, Bc3, "BC3 (Medium quality)"), + }}); translations->insert({typeid(Settings::RendererBackend), { #ifdef HAS_OPENGL - {static_cast(Settings::RendererBackend::OpenGL), tr("OpenGL")}, + PAIR(RendererBackend, OpenGL, "OpenGL"), #endif - {static_cast(Settings::RendererBackend::Vulkan), tr("Vulkan")}, - {static_cast(Settings::RendererBackend::Null), tr("Null")}, + PAIR(RendererBackend, Vulkan, "Vulkan"), + PAIR(RendererBackend, Null, "Null"), }}); translations->insert({typeid(Settings::ShaderBackend), { - {static_cast(Settings::ShaderBackend::Glsl), tr("GLSL")}, - {static_cast(Settings::ShaderBackend::Glasm), - tr("GLASM (Assembly Shaders, NVIDIA Only)")}, - {static_cast(Settings::ShaderBackend::SpirV), - tr("SPIR-V (Experimental, Mesa Only)")}, + PAIR(ShaderBackend, Glsl, "GLSL"), + PAIR(ShaderBackend, Glasm, "GLASM (Assembly Shaders, NVIDIA Only)"), + PAIR(ShaderBackend, SpirV, "SPIR-V (Experimental, Mesa Only)"), }}); translations->insert({typeid(Settings::GpuAccuracy), { - {static_cast(Settings::GpuAccuracy::Normal), tr("Normal")}, - {static_cast(Settings::GpuAccuracy::High), tr("High")}, - {static_cast(Settings::GpuAccuracy::Extreme), tr("Extreme")}, + PAIR(GpuAccuracy, Normal, "Normal"), + PAIR(GpuAccuracy, High, "High"), + PAIR(GpuAccuracy, Extreme, "Extreme"), }}); translations->insert({typeid(Settings::CpuAccuracy), { - {static_cast(Settings::CpuAccuracy::Auto), tr("Auto")}, - {static_cast(Settings::CpuAccuracy::Accurate), tr("Accurate")}, - {static_cast(Settings::CpuAccuracy::Unsafe), tr("Unsafe")}, - {static_cast(Settings::CpuAccuracy::Paranoid), - tr("Paranoid (disables most optimizations)")}, + PAIR(CpuAccuracy, Auto, "Auto"), + PAIR(CpuAccuracy, Accurate, "Accurate"), + PAIR(CpuAccuracy, Unsafe, "Unsafe"), + PAIR(CpuAccuracy, Paranoid, "Paranoid (disables most optimizations)"), + }}); + translations->insert({typeid(Settings::FullscreenMode), + { + PAIR(FullscreenMode, Borderless, "Borderless Windowed"), + PAIR(FullscreenMode, Exclusive, "Exclusive Fullscreen"), + }}); + translations->insert({typeid(Settings::NvdecEmulation), + { + PAIR(NvdecEmulation, Off, "No Video Output"), + PAIR(NvdecEmulation, Cpu, "CPU Video Decoding"), + PAIR(NvdecEmulation, Gpu, "GPU Video Decoding (Default)"), + }}); + translations->insert({typeid(Settings::ResolutionSetup), + { + PAIR(ResolutionSetup, Res1_2X, "0.5X (360p/540p) [EXPERIMENTAL]"), + PAIR(ResolutionSetup, Res3_4X, "0.75X (540p/810p) [EXPERIMENTAL]"), + PAIR(ResolutionSetup, Res1X, "1X (720p/1080p)"), + PAIR(ResolutionSetup, Res3_2X, "1.5X (1080p/1620p) [EXPERIMENTAL]"), + PAIR(ResolutionSetup, Res2X, "2X (1440p/2160p)"), + PAIR(ResolutionSetup, Res3X, "3X (2160p/3240p)"), + PAIR(ResolutionSetup, Res4X, "4X (2880p/4320p)"), + PAIR(ResolutionSetup, Res5X, "5X (3600p/5400p)"), + PAIR(ResolutionSetup, Res6X, "6X (4320p/6480p)"), + PAIR(ResolutionSetup, Res7X, "7X (5040p/7560p)"), + PAIR(ResolutionSetup, Res8X, "8X (5760p/8640p)"), + }}); + translations->insert({typeid(Settings::ScalingFilter), + { + PAIR(ScalingFilter, NearestNeighbor, "Nearest Neighbor"), + PAIR(ScalingFilter, Bilinear, "Bilinear"), + PAIR(ScalingFilter, Bicubic, "Bicubic"), + PAIR(ScalingFilter, Gaussian, "Gaussian"), + PAIR(ScalingFilter, ScaleForce, "ScaleForce"), + PAIR(ScalingFilter, Fsr, "AMD FidelityFX™️ Super Resolution"), }}); - translations->insert( - {typeid(Settings::FullscreenMode), - { - {static_cast(Settings::FullscreenMode::Borderless), tr("Borderless Windowed")}, - {static_cast(Settings::FullscreenMode::Exclusive), tr("Exclusive Fullscreen")}, - }}); - translations->insert( - {typeid(Settings::NvdecEmulation), - { - {static_cast(Settings::NvdecEmulation::Off), tr("No Video Output")}, - {static_cast(Settings::NvdecEmulation::Cpu), tr("CPU Video Decoding")}, - {static_cast(Settings::NvdecEmulation::Gpu), tr("GPU Video Decoding (Default)")}, - }}); - translations->insert( - {typeid(Settings::ResolutionSetup), - { - {static_cast(Settings::ResolutionSetup::Res1_2X), - tr("0.5X (360p/540p) [EXPERIMENTAL]")}, - {static_cast(Settings::ResolutionSetup::Res3_4X), - tr("0.75X (540p/810p) [EXPERIMENTAL]")}, - {static_cast(Settings::ResolutionSetup::Res1X), tr("1X (720p/1080p)")}, - {static_cast(Settings::ResolutionSetup::Res3_2X), - tr("1.5X (1080p/1620p) [EXPERIMENTAL]")}, - {static_cast(Settings::ResolutionSetup::Res2X), tr("2X (1440p/2160p)")}, - {static_cast(Settings::ResolutionSetup::Res3X), tr("3X (2160p/3240p)")}, - {static_cast(Settings::ResolutionSetup::Res4X), tr("4X (2880p/4320p)")}, - {static_cast(Settings::ResolutionSetup::Res5X), tr("5X (3600p/5400p)")}, - {static_cast(Settings::ResolutionSetup::Res6X), tr("6X (4320p/6480p)")}, - {static_cast(Settings::ResolutionSetup::Res7X), tr("7X (5040p/7560p)")}, - {static_cast(Settings::ResolutionSetup::Res8X), tr("8X (5760p/8640p)")}, - }}); - translations->insert( - {typeid(Settings::ScalingFilter), - { - {static_cast(Settings::ScalingFilter::NearestNeighbor), tr("Nearest Neighbor")}, - {static_cast(Settings::ScalingFilter::Bilinear), tr("Bilinear")}, - {static_cast(Settings::ScalingFilter::Bicubic), tr("Bicubic")}, - {static_cast(Settings::ScalingFilter::Gaussian), tr("Gaussian")}, - {static_cast(Settings::ScalingFilter::ScaleForce), tr("ScaleForce")}, - {static_cast(Settings::ScalingFilter::Fsr), - tr("AMD FidelityFX™️ Super Resolution")}, - }}); translations->insert({typeid(Settings::AntiAliasing), { - {static_cast(Settings::AntiAliasing::None), tr("None")}, - {static_cast(Settings::AntiAliasing::Fxaa), tr("FXAA")}, - {static_cast(Settings::AntiAliasing::Smaa), tr("SMAA")}, + PAIR(AntiAliasing, None, "None"), + PAIR(AntiAliasing, Fxaa, "FXAA"), + PAIR(AntiAliasing, Smaa, "SMAA"), + }}); + translations->insert({typeid(Settings::AspectRatio), + { + PAIR(AspectRatio, R16_9, "Default (16:9)"), + PAIR(AspectRatio, R4_3, "Force 4:3"), + PAIR(AspectRatio, R21_9, "Force 21:9"), + PAIR(AspectRatio, R16_10, "Force 16:10"), + PAIR(AspectRatio, Stretch, "Stretch to Window"), + }}); + translations->insert({typeid(Settings::AnisotropyMode), + { + PAIR(AnisotropyMode, Automatic, "Automatic"), + PAIR(AnisotropyMode, Default, "Default"), + PAIR(AnisotropyMode, X2, "2x"), + PAIR(AnisotropyMode, X4, "4x"), + PAIR(AnisotropyMode, X8, "8x"), + PAIR(AnisotropyMode, X16, "16x"), }}); - translations->insert( - {typeid(Settings::AspectRatio), - { - {static_cast(Settings::AspectRatio::R16_9), tr("Default (16:9)")}, - {static_cast(Settings::AspectRatio::R4_3), tr("Force 4:3")}, - {static_cast(Settings::AspectRatio::R21_9), tr("Force 21:9")}, - {static_cast(Settings::AspectRatio::R16_10), tr("Force 16:10")}, - {static_cast(Settings::AspectRatio::Stretch), tr("Stretch to Window")}, - }}); - translations->insert( - {typeid(Settings::AnisotropyMode), - { - {static_cast(Settings::AnisotropyMode::Automatic), tr("Automatic")}, - {static_cast(Settings::AnisotropyMode::Default), tr("Default")}, - {static_cast(Settings::AnisotropyMode::X2), tr("2x")}, - {static_cast(Settings::AnisotropyMode::X4), tr("4x")}, - {static_cast(Settings::AnisotropyMode::X8), tr("8x")}, - {static_cast(Settings::AnisotropyMode::X16), tr("16x")}, - }}); translations->insert( {typeid(Settings::Language), { - {static_cast(Settings::Language::Japanese), tr("Japanese (日本語)")}, - {static_cast(Settings::Language::EnglishAmerican), tr("American English")}, - {static_cast(Settings::Language::French), tr("French (français)")}, - {static_cast(Settings::Language::German), tr("German (Deutsch)")}, - {static_cast(Settings::Language::Italian), tr("Italian (italiano)")}, - {static_cast(Settings::Language::Spanish), tr("Spanish (español)")}, - {static_cast(Settings::Language::Chinese), tr("Chinese")}, - {static_cast(Settings::Language::Korean), tr("Korean (한국어)")}, - {static_cast(Settings::Language::Dutch), tr("Dutch (Nederlands)")}, - {static_cast(Settings::Language::Portuguese), tr("Portuguese (português)")}, - {static_cast(Settings::Language::Russian), tr("Russian (Русский)")}, - {static_cast(Settings::Language::Taiwanese), tr("Taiwanese")}, - {static_cast(Settings::Language::EnglishBritish), tr("British English")}, - {static_cast(Settings::Language::FrenchCanadian), tr("Canadian French")}, - {static_cast(Settings::Language::SpanishLatin), tr("Latin American Spanish")}, - {static_cast(Settings::Language::ChineseSimplified), tr("Simplified Chinese")}, - {static_cast(Settings::Language::ChineseTraditional), - tr("Traditional Chinese (正體中文)")}, - {static_cast(Settings::Language::PortugueseBrazilian), - tr("Brazilian Portuguese (português do Brasil)")}, + PAIR(Language, Japanese, "Japanese (日本語)"), + PAIR(Language, EnglishAmerican, "American English"), + PAIR(Language, French, "French (français)"), + PAIR(Language, German, "German (Deutsch)"), + PAIR(Language, Italian, "Italian (italiano)"), + PAIR(Language, Spanish, "Spanish (español)"), + PAIR(Language, Chinese, "Chinese"), + PAIR(Language, Korean, "Korean (한국어)"), + PAIR(Language, Dutch, "Dutch (Nederlands)"), + PAIR(Language, Portuguese, "Portuguese (português)"), + PAIR(Language, Russian, "Russian (Русский)"), + PAIR(Language, Taiwanese, "Taiwanese"), + PAIR(Language, EnglishBritish, "British English"), + PAIR(Language, FrenchCanadian, "Canadian French"), + PAIR(Language, SpanishLatin, "Latin American Spanish"), + PAIR(Language, ChineseSimplified, "Simplified Chinese"), + PAIR(Language, ChineseTraditional, "Traditional Chinese (正體中文)"), + PAIR(Language, PortugueseBrazilian, "Brazilian Portuguese (português do Brasil)"), }}); translations->insert({typeid(Settings::Region), { - {static_cast(Settings::Region::Japan), tr("Japan")}, - {static_cast(Settings::Region::Usa), tr("USA")}, - {static_cast(Settings::Region::Europe), tr("Europe")}, - {static_cast(Settings::Region::Australia), tr("Australia")}, - {static_cast(Settings::Region::China), tr("China")}, - {static_cast(Settings::Region::Korea), tr("Korea")}, - {static_cast(Settings::Region::Taiwan), tr("Taiwan")}, + PAIR(Region, Japan, "Japan"), + PAIR(Region, Usa, "USA"), + PAIR(Region, Europe, "Europe"), + PAIR(Region, Australia, "Australia"), + PAIR(Region, China, "China"), + PAIR(Region, Korea, "Korea"), + PAIR(Region, Taiwan, "Taiwan"), }}); translations->insert({typeid(Settings::TimeZone), { - {static_cast(Settings::TimeZone::Auto), tr("Auto")}, - {static_cast(Settings::TimeZone::Default), tr("Default")}, - {static_cast(Settings::TimeZone::CET), tr("CET")}, - {static_cast(Settings::TimeZone::CST6CDT), tr("CST6CDT")}, - {static_cast(Settings::TimeZone::Cuba), tr("Cuba")}, - {static_cast(Settings::TimeZone::EET), tr("EET")}, - {static_cast(Settings::TimeZone::Egypt), tr("Egypt")}, - {static_cast(Settings::TimeZone::Eire), tr("Eire")}, - {static_cast(Settings::TimeZone::EST), tr("EST")}, - {static_cast(Settings::TimeZone::EST5EDT), tr("EST5EDT")}, - {static_cast(Settings::TimeZone::GB), tr("GB")}, - {static_cast(Settings::TimeZone::GBEire), tr("GB-Eire")}, - {static_cast(Settings::TimeZone::GMT), tr("GMT")}, - {static_cast(Settings::TimeZone::GMTPlusZero), tr("GMT+0")}, - {static_cast(Settings::TimeZone::GMTMinusZero), tr("GMT-0")}, - {static_cast(Settings::TimeZone::GMTZero), tr("GMT0")}, - {static_cast(Settings::TimeZone::Greenwich), tr("Greenwich")}, - {static_cast(Settings::TimeZone::Hongkong), tr("Hongkong")}, - {static_cast(Settings::TimeZone::HST), tr("HST")}, - {static_cast(Settings::TimeZone::Iceland), tr("Iceland")}, - {static_cast(Settings::TimeZone::Iran), tr("Iran")}, - {static_cast(Settings::TimeZone::Israel), tr("Israel")}, - {static_cast(Settings::TimeZone::Jamaica), tr("Jamaica")}, - {static_cast(Settings::TimeZone::Kwajalein), tr("Kwajalein")}, - {static_cast(Settings::TimeZone::Libya), tr("Libya")}, - {static_cast(Settings::TimeZone::MET), tr("MET")}, - {static_cast(Settings::TimeZone::MST), tr("MST")}, - {static_cast(Settings::TimeZone::MST7MDT), tr("MST7MDT")}, - {static_cast(Settings::TimeZone::Navajo), tr("Navajo")}, - {static_cast(Settings::TimeZone::NZ), tr("NZ")}, - {static_cast(Settings::TimeZone::NZCHAT), tr("NZ-CHAT")}, - {static_cast(Settings::TimeZone::Poland), tr("Poland")}, - {static_cast(Settings::TimeZone::Portugal), tr("Portugal")}, - {static_cast(Settings::TimeZone::PRC), tr("PRC")}, - {static_cast(Settings::TimeZone::PST8PDT), tr("PST8PDT")}, - {static_cast(Settings::TimeZone::ROC), tr("ROC")}, - {static_cast(Settings::TimeZone::ROK), tr("ROK")}, - {static_cast(Settings::TimeZone::Singapore), tr("Singapore")}, - {static_cast(Settings::TimeZone::Turkey), tr("Turkey")}, - {static_cast(Settings::TimeZone::UCT), tr("UCT")}, - {static_cast(Settings::TimeZone::W_SU), tr("W-SU")}, - {static_cast(Settings::TimeZone::WET), tr("WET")}, - {static_cast(Settings::TimeZone::Zulu), tr("Zulu")}, + PAIR(TimeZone, Auto, "Auto"), + PAIR(TimeZone, Default, "Default"), + PAIR(TimeZone, CET, "CET"), + PAIR(TimeZone, CST6CDT, "CST6CDT"), + PAIR(TimeZone, Cuba, "Cuba"), + PAIR(TimeZone, EET, "EET"), + PAIR(TimeZone, Egypt, "Egypt"), + PAIR(TimeZone, Eire, "Eire"), + PAIR(TimeZone, EST, "EST"), + PAIR(TimeZone, EST5EDT, "EST5EDT"), + PAIR(TimeZone, GB, "GB"), + PAIR(TimeZone, GBEire, "GB-Eire"), + PAIR(TimeZone, GMT, "GMT"), + PAIR(TimeZone, GMTPlusZero, "GMT+0"), + PAIR(TimeZone, GMTMinusZero, "GMT-0"), + PAIR(TimeZone, GMTZero, "GMT0"), + PAIR(TimeZone, Greenwich, "Greenwich"), + PAIR(TimeZone, Hongkong, "Hongkong"), + PAIR(TimeZone, HST, "HST"), + PAIR(TimeZone, Iceland, "Iceland"), + PAIR(TimeZone, Iran, "Iran"), + PAIR(TimeZone, Israel, "Israel"), + PAIR(TimeZone, Jamaica, "Jamaica"), + PAIR(TimeZone, Kwajalein, "Kwajalein"), + PAIR(TimeZone, Libya, "Libya"), + PAIR(TimeZone, MET, "MET"), + PAIR(TimeZone, MST, "MST"), + PAIR(TimeZone, MST7MDT, "MST7MDT"), + PAIR(TimeZone, Navajo, "Navajo"), + PAIR(TimeZone, NZ, "NZ"), + PAIR(TimeZone, NZCHAT, "NZ-CHAT"), + PAIR(TimeZone, Poland, "Poland"), + PAIR(TimeZone, Portugal, "Portugal"), + PAIR(TimeZone, PRC, "PRC"), + PAIR(TimeZone, PST8PDT, "PST8PDT"), + PAIR(TimeZone, ROC, "ROC"), + PAIR(TimeZone, ROK, "ROK"), + PAIR(TimeZone, Singapore, "Singapore"), + PAIR(TimeZone, Turkey, "Turkey"), + PAIR(TimeZone, UCT, "UCT"), + PAIR(TimeZone, W_SU, "W-SU"), + PAIR(TimeZone, WET, "WET"), + PAIR(TimeZone, Zulu, "Zulu"), }}); translations->insert({typeid(Settings::AudioMode), { - {static_cast(Settings::AudioMode::Mono), tr("Mono")}, - {static_cast(Settings::AudioMode::Stereo), tr("Stereo")}, - {static_cast(Settings::AudioMode::Surround), tr("Surround")}, + PAIR(AudioMode, Mono, "Mono"), + PAIR(AudioMode, Stereo, "Stereo"), + PAIR(AudioMode, Surround, "Surround"), }}); +#undef PAIR +#undef CTX_PAIR + return translations; } } // namespace ConfigurationShared -- cgit v1.2.3 From 0193add060ecc591ca27d029916823911df5d503 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Sat, 10 Jun 2023 00:44:03 -0400 Subject: general: Add typeinfo where needed Using typeid without including typeinfo first produces an ill-formed program. --- src/yuzu/configuration/shared_translation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 1787a35ff..0f9dc77ff 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 3b0650b70d8196b30102e73305066e0dba9da8fe Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:42:21 -0400 Subject: configuration/shared: Clean up includes [IWYU] --- src/yuzu/configuration/shared_translation.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 0f9dc77ff..b5a3fba4d 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -1,17 +1,16 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include +#include "yuzu/configuration/shared_translation.h" + #include #include -#include -#include -#include +#include #include -#include #include #include "common/settings.h" -#include "yuzu/configuration/shared_translation.h" +#include "common/settings_enums.h" +#include "common/settings_setting.h" #include "yuzu/uisettings.h" namespace ConfigurationShared { -- cgit v1.2.3 From a0883526d6a104404404ead384788adb767c88d5 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:45:51 -0400 Subject: settings: Delete cpu_accuracy_first_time Almost a 2 year old migration setting now --- src/yuzu/configuration/shared_translation.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index b5a3fba4d..fa9683b21 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -39,7 +39,6 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Cpu INSERT(Settings, cpu_accuracy, "Accuracy:", ""); - INSERT(Settings, cpu_accuracy_first_time, "", ""); // Cpu Debug -- cgit v1.2.3 From 81a96bafe210c218efed4e3f1138510bb8a0748c Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 19 Jun 2023 16:41:25 -0400 Subject: configuration: Move speed_limit to core --- src/yuzu/configuration/shared_translation.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index fa9683b21..ec4bddb26 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -36,6 +36,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); INSERT(Settings, use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", ""); + INSERT(Settings, use_speed_limit, "", ""); + INSERT(Settings, speed_limit, "Limit Speed Percent", ""); // Cpu INSERT(Settings, cpu_accuracy, "Accuracy:", ""); @@ -120,10 +122,6 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Renderer (Debug) - // Renderer (General) - INSERT(Settings, use_speed_limit, "", ""); - INSERT(Settings, speed_limit, "Limit Speed Percent", ""); - // System INSERT(Settings, rng_seed, "RNG Seed", ""); INSERT(Settings, rng_seed_enabled, "", ""); -- cgit v1.2.3 From 8b28aa45b99cc6f6c9399bbe421460de67088cff Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 20 Jun 2023 23:34:03 -0400 Subject: settings,translation: Fix time zone enum Renames enum values to conform to naming convention. --- src/yuzu/configuration/shared_translation.cpp | 48 +++++++++++++-------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index ec4bddb26..a75574530 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -311,46 +311,46 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { { PAIR(TimeZone, Auto, "Auto"), PAIR(TimeZone, Default, "Default"), - PAIR(TimeZone, CET, "CET"), - PAIR(TimeZone, CST6CDT, "CST6CDT"), + PAIR(TimeZone, Cet, "CET"), + PAIR(TimeZone, Cst6Cdt, "CST6CDT"), PAIR(TimeZone, Cuba, "Cuba"), - PAIR(TimeZone, EET, "EET"), + PAIR(TimeZone, Eet, "EET"), PAIR(TimeZone, Egypt, "Egypt"), PAIR(TimeZone, Eire, "Eire"), - PAIR(TimeZone, EST, "EST"), - PAIR(TimeZone, EST5EDT, "EST5EDT"), - PAIR(TimeZone, GB, "GB"), - PAIR(TimeZone, GBEire, "GB-Eire"), - PAIR(TimeZone, GMT, "GMT"), - PAIR(TimeZone, GMTPlusZero, "GMT+0"), - PAIR(TimeZone, GMTMinusZero, "GMT-0"), - PAIR(TimeZone, GMTZero, "GMT0"), + PAIR(TimeZone, Est, "EST"), + PAIR(TimeZone, Est5Edt, "EST5EDT"), + PAIR(TimeZone, Gb, "GB"), + PAIR(TimeZone, GbEire, "GB-Eire"), + PAIR(TimeZone, Gmt, "GMT"), + PAIR(TimeZone, GmtPlusZero, "GMT+0"), + PAIR(TimeZone, GmtMinusZero, "GMT-0"), + PAIR(TimeZone, GmtZero, "GMT0"), PAIR(TimeZone, Greenwich, "Greenwich"), PAIR(TimeZone, Hongkong, "Hongkong"), - PAIR(TimeZone, HST, "HST"), + PAIR(TimeZone, Hst, "HST"), PAIR(TimeZone, Iceland, "Iceland"), PAIR(TimeZone, Iran, "Iran"), PAIR(TimeZone, Israel, "Israel"), PAIR(TimeZone, Jamaica, "Jamaica"), PAIR(TimeZone, Kwajalein, "Kwajalein"), PAIR(TimeZone, Libya, "Libya"), - PAIR(TimeZone, MET, "MET"), - PAIR(TimeZone, MST, "MST"), - PAIR(TimeZone, MST7MDT, "MST7MDT"), + PAIR(TimeZone, Met, "MET"), + PAIR(TimeZone, Mst, "MST"), + PAIR(TimeZone, Mst7Mdt, "MST7MDT"), PAIR(TimeZone, Navajo, "Navajo"), - PAIR(TimeZone, NZ, "NZ"), - PAIR(TimeZone, NZCHAT, "NZ-CHAT"), + PAIR(TimeZone, Nz, "NZ"), + PAIR(TimeZone, NzChat, "NZ-CHAT"), PAIR(TimeZone, Poland, "Poland"), PAIR(TimeZone, Portugal, "Portugal"), - PAIR(TimeZone, PRC, "PRC"), - PAIR(TimeZone, PST8PDT, "PST8PDT"), - PAIR(TimeZone, ROC, "ROC"), - PAIR(TimeZone, ROK, "ROK"), + PAIR(TimeZone, Prc, "PRC"), + PAIR(TimeZone, Pst8Pdt, "PST8PDT"), + PAIR(TimeZone, Roc, "ROC"), + PAIR(TimeZone, Rok, "ROK"), PAIR(TimeZone, Singapore, "Singapore"), PAIR(TimeZone, Turkey, "Turkey"), - PAIR(TimeZone, UCT, "UCT"), - PAIR(TimeZone, W_SU, "W-SU"), - PAIR(TimeZone, WET, "WET"), + PAIR(TimeZone, Uct, "UCT"), + PAIR(TimeZone, WSu, "W-SU"), + PAIR(TimeZone, Wet, "WET"), PAIR(TimeZone, Zulu, "Zulu"), }}); translations->insert({typeid(Settings::AudioMode), -- cgit v1.2.3 From 62ffaa730fabd2101947dd28e50fae6d03162aa4 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 21 Jun 2023 00:13:06 -0400 Subject: shared_translation: Fix context usage Currently unused, but I don't want to start headaches when someone decides to use it the first time. --- src/yuzu/configuration/shared_translation.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index a75574530..a1030efb0 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -170,7 +170,9 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { std::unique_ptr ComboboxEnumeration(QWidget* parent) { std::unique_ptr translations = std::make_unique(); - const auto& tr = [&](const char* text) { return parent->tr(text); }; + const auto& tr = [&](const char* text, const char* context = "") { + return parent->tr(text, context); + }; #define PAIR(ENUM, VALUE, TRANSLATION) \ { static_cast(Settings::ENUM::VALUE), tr(TRANSLATION) } -- cgit v1.2.3 From 9186f08c3c6cad014c671ca152c78d9d2ee307e6 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 21 Jun 2023 17:02:42 -0400 Subject: shared_translation: Deobfuscate auto time zone --- src/yuzu/configuration/shared_translation.cpp | 98 ++++++++++++++------------- 1 file changed, 52 insertions(+), 46 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index a1030efb0..f120a632c 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -1,6 +1,7 @@ // SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#include "common/time_zone.h" #include "yuzu/configuration/shared_translation.h" #include @@ -309,52 +310,57 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(Region, Korea, "Korea"), PAIR(Region, Taiwan, "Taiwan"), }}); - translations->insert({typeid(Settings::TimeZone), - { - PAIR(TimeZone, Auto, "Auto"), - PAIR(TimeZone, Default, "Default"), - PAIR(TimeZone, Cet, "CET"), - PAIR(TimeZone, Cst6Cdt, "CST6CDT"), - PAIR(TimeZone, Cuba, "Cuba"), - PAIR(TimeZone, Eet, "EET"), - PAIR(TimeZone, Egypt, "Egypt"), - PAIR(TimeZone, Eire, "Eire"), - PAIR(TimeZone, Est, "EST"), - PAIR(TimeZone, Est5Edt, "EST5EDT"), - PAIR(TimeZone, Gb, "GB"), - PAIR(TimeZone, GbEire, "GB-Eire"), - PAIR(TimeZone, Gmt, "GMT"), - PAIR(TimeZone, GmtPlusZero, "GMT+0"), - PAIR(TimeZone, GmtMinusZero, "GMT-0"), - PAIR(TimeZone, GmtZero, "GMT0"), - PAIR(TimeZone, Greenwich, "Greenwich"), - PAIR(TimeZone, Hongkong, "Hongkong"), - PAIR(TimeZone, Hst, "HST"), - PAIR(TimeZone, Iceland, "Iceland"), - PAIR(TimeZone, Iran, "Iran"), - PAIR(TimeZone, Israel, "Israel"), - PAIR(TimeZone, Jamaica, "Jamaica"), - PAIR(TimeZone, Kwajalein, "Kwajalein"), - PAIR(TimeZone, Libya, "Libya"), - PAIR(TimeZone, Met, "MET"), - PAIR(TimeZone, Mst, "MST"), - PAIR(TimeZone, Mst7Mdt, "MST7MDT"), - PAIR(TimeZone, Navajo, "Navajo"), - PAIR(TimeZone, Nz, "NZ"), - PAIR(TimeZone, NzChat, "NZ-CHAT"), - PAIR(TimeZone, Poland, "Poland"), - PAIR(TimeZone, Portugal, "Portugal"), - PAIR(TimeZone, Prc, "PRC"), - PAIR(TimeZone, Pst8Pdt, "PST8PDT"), - PAIR(TimeZone, Roc, "ROC"), - PAIR(TimeZone, Rok, "ROK"), - PAIR(TimeZone, Singapore, "Singapore"), - PAIR(TimeZone, Turkey, "Turkey"), - PAIR(TimeZone, Uct, "UCT"), - PAIR(TimeZone, WSu, "W-SU"), - PAIR(TimeZone, Wet, "WET"), - PAIR(TimeZone, Zulu, "Zulu"), - }}); + translations->insert( + {typeid(Settings::TimeZone), + { + {static_cast(Settings::TimeZone::Auto), + tr("Auto (%1)", "Auto select time zone") + .arg(QString::fromStdString(Settings::GetTimeZoneString()))}, + {static_cast(Settings::TimeZone::Default), + tr("Default (%1)", "Default time zone") + .arg(QString::fromStdString(Common::TimeZone::GetDefaultTimeZone()))}, + PAIR(TimeZone, Cet, "CET"), + PAIR(TimeZone, Cst6Cdt, "CST6CDT"), + PAIR(TimeZone, Cuba, "Cuba"), + PAIR(TimeZone, Eet, "EET"), + PAIR(TimeZone, Egypt, "Egypt"), + PAIR(TimeZone, Eire, "Eire"), + PAIR(TimeZone, Est, "EST"), + PAIR(TimeZone, Est5Edt, "EST5EDT"), + PAIR(TimeZone, Gb, "GB"), + PAIR(TimeZone, GbEire, "GB-Eire"), + PAIR(TimeZone, Gmt, "GMT"), + PAIR(TimeZone, GmtPlusZero, "GMT+0"), + PAIR(TimeZone, GmtMinusZero, "GMT-0"), + PAIR(TimeZone, GmtZero, "GMT0"), + PAIR(TimeZone, Greenwich, "Greenwich"), + PAIR(TimeZone, Hongkong, "Hongkong"), + PAIR(TimeZone, Hst, "HST"), + PAIR(TimeZone, Iceland, "Iceland"), + PAIR(TimeZone, Iran, "Iran"), + PAIR(TimeZone, Israel, "Israel"), + PAIR(TimeZone, Jamaica, "Jamaica"), + PAIR(TimeZone, Kwajalein, "Kwajalein"), + PAIR(TimeZone, Libya, "Libya"), + PAIR(TimeZone, Met, "MET"), + PAIR(TimeZone, Mst, "MST"), + PAIR(TimeZone, Mst7Mdt, "MST7MDT"), + PAIR(TimeZone, Navajo, "Navajo"), + PAIR(TimeZone, Nz, "NZ"), + PAIR(TimeZone, NzChat, "NZ-CHAT"), + PAIR(TimeZone, Poland, "Poland"), + PAIR(TimeZone, Portugal, "Portugal"), + PAIR(TimeZone, Prc, "PRC"), + PAIR(TimeZone, Pst8Pdt, "PST8PDT"), + PAIR(TimeZone, Roc, "ROC"), + PAIR(TimeZone, Rok, "ROK"), + PAIR(TimeZone, Singapore, "Singapore"), + PAIR(TimeZone, Turkey, "Turkey"), + PAIR(TimeZone, Uct, "UCT"), + PAIR(TimeZone, WSu, "W-SU"), + PAIR(TimeZone, Wet, "WET"), + PAIR(TimeZone, Zulu, "Zulu"), + }}); translations->insert({typeid(Settings::AudioMode), { PAIR(AudioMode, Mono, "Mono"), -- cgit v1.2.3 From ca8509d205d20d034c548489d729f65656da611d Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:41:15 -0400 Subject: configuration: Use enum index --- src/yuzu/configuration/shared_translation.cpp | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index f120a632c..d51286b0e 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -182,19 +182,19 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { // Intentionally skipping VSyncMode to let the UI fill that one out - translations->insert({typeid(Settings::AstcDecodeMode), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AstcDecodeMode, Cpu, "CPU"), PAIR(AstcDecodeMode, Gpu, "GPU"), PAIR(AstcDecodeMode, CpuAsynchronous, "CPU Asynchronous"), }}); - translations->insert({typeid(Settings::AstcRecompression), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AstcRecompression, Uncompressed, "Uncompressed (Best quality)"), PAIR(AstcRecompression, Bc1, "BC1 (Low quality)"), PAIR(AstcRecompression, Bc3, "BC3 (Medium quality)"), }}); - translations->insert({typeid(Settings::RendererBackend), + translations->insert({Settings::EnumMetadata::Index(), { #ifdef HAS_OPENGL PAIR(RendererBackend, OpenGL, "OpenGL"), @@ -202,37 +202,37 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(RendererBackend, Vulkan, "Vulkan"), PAIR(RendererBackend, Null, "Null"), }}); - translations->insert({typeid(Settings::ShaderBackend), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(ShaderBackend, Glsl, "GLSL"), PAIR(ShaderBackend, Glasm, "GLASM (Assembly Shaders, NVIDIA Only)"), PAIR(ShaderBackend, SpirV, "SPIR-V (Experimental, Mesa Only)"), }}); - translations->insert({typeid(Settings::GpuAccuracy), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(GpuAccuracy, Normal, "Normal"), PAIR(GpuAccuracy, High, "High"), PAIR(GpuAccuracy, Extreme, "Extreme"), }}); - translations->insert({typeid(Settings::CpuAccuracy), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(CpuAccuracy, Auto, "Auto"), PAIR(CpuAccuracy, Accurate, "Accurate"), PAIR(CpuAccuracy, Unsafe, "Unsafe"), PAIR(CpuAccuracy, Paranoid, "Paranoid (disables most optimizations)"), }}); - translations->insert({typeid(Settings::FullscreenMode), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(FullscreenMode, Borderless, "Borderless Windowed"), PAIR(FullscreenMode, Exclusive, "Exclusive Fullscreen"), }}); - translations->insert({typeid(Settings::NvdecEmulation), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(NvdecEmulation, Off, "No Video Output"), PAIR(NvdecEmulation, Cpu, "CPU Video Decoding"), PAIR(NvdecEmulation, Gpu, "GPU Video Decoding (Default)"), }}); - translations->insert({typeid(Settings::ResolutionSetup), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(ResolutionSetup, Res1_2X, "0.5X (360p/540p) [EXPERIMENTAL]"), PAIR(ResolutionSetup, Res3_4X, "0.75X (540p/810p) [EXPERIMENTAL]"), @@ -246,7 +246,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(ResolutionSetup, Res7X, "7X (5040p/7560p)"), PAIR(ResolutionSetup, Res8X, "8X (5760p/8640p)"), }}); - translations->insert({typeid(Settings::ScalingFilter), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(ScalingFilter, NearestNeighbor, "Nearest Neighbor"), PAIR(ScalingFilter, Bilinear, "Bilinear"), @@ -255,13 +255,13 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(ScalingFilter, ScaleForce, "ScaleForce"), PAIR(ScalingFilter, Fsr, "AMD FidelityFX™️ Super Resolution"), }}); - translations->insert({typeid(Settings::AntiAliasing), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AntiAliasing, None, "None"), PAIR(AntiAliasing, Fxaa, "FXAA"), PAIR(AntiAliasing, Smaa, "SMAA"), }}); - translations->insert({typeid(Settings::AspectRatio), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AspectRatio, R16_9, "Default (16:9)"), PAIR(AspectRatio, R4_3, "Force 4:3"), @@ -269,7 +269,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(AspectRatio, R16_10, "Force 16:10"), PAIR(AspectRatio, Stretch, "Stretch to Window"), }}); - translations->insert({typeid(Settings::AnisotropyMode), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AnisotropyMode, Automatic, "Automatic"), PAIR(AnisotropyMode, Default, "Default"), @@ -279,7 +279,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(AnisotropyMode, X16, "16x"), }}); translations->insert( - {typeid(Settings::Language), + {Settings::EnumMetadata::Index(), { PAIR(Language, Japanese, "Japanese (日本語)"), PAIR(Language, EnglishAmerican, "American English"), @@ -300,7 +300,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(Language, ChineseTraditional, "Traditional Chinese (正體中文)"), PAIR(Language, PortugueseBrazilian, "Brazilian Portuguese (português do Brasil)"), }}); - translations->insert({typeid(Settings::Region), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(Region, Japan, "Japan"), PAIR(Region, Usa, "USA"), @@ -311,7 +311,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(Region, Taiwan, "Taiwan"), }}); translations->insert( - {typeid(Settings::TimeZone), + {Settings::EnumMetadata::Index(), { {static_cast(Settings::TimeZone::Auto), tr("Auto (%1)", "Auto select time zone") @@ -361,7 +361,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(TimeZone, Wet, "WET"), PAIR(TimeZone, Zulu, "Zulu"), }}); - translations->insert({typeid(Settings::AudioMode), + translations->insert({Settings::EnumMetadata::Index(), { PAIR(AudioMode, Mono, "Mono"), PAIR(AudioMode, Stereo, "Stereo"), -- cgit v1.2.3 From a14d2a6f83591fe2ae27fcaa2ad96da4567df99f Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 22 Jun 2023 00:31:19 -0400 Subject: shared_translation: Add barrier_feedback_loops --- src/yuzu/configuration/shared_translation.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index d51286b0e..6e8cea625 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -120,6 +120,8 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(Settings, use_video_framerate, "Sync to framerate of video playback", "Run the game at normal speed during video playback, even when the framerate is " "unlocked."); + INSERT(Settings, barrier_feedback_loops, "Barrier feedback loops", + "Improves rendering of transparency effects in specific games."); // Renderer (Debug) -- cgit v1.2.3 From ef6406a66652e2879abe44c66b517dd7d9b9338c Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 27 Jun 2023 19:50:22 -0400 Subject: shared_translation: Add controller_applet_disabled --- src/yuzu/configuration/shared_translation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 6e8cea625..473e29479 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -158,6 +158,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { INSERT(UISettings, pause_when_in_background, "Pause emulation when in background", ""); INSERT(UISettings, confirm_before_closing, "Confirm exit while emulation is running", ""); INSERT(UISettings, hide_mouse, "Hide mouse on inactivity", ""); + INSERT(UISettings, controller_applet_disabled, "Disable controller applet", ""); // Ui Debugging -- cgit v1.2.3 From 07e8477f5a897730dd547d8b6af6d05db0cede81 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:40:11 -0400 Subject: shared_translation: Add missing time zones --- src/yuzu/configuration/shared_translation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 473e29479..05cc942de 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -343,6 +343,7 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(TimeZone, Iran, "Iran"), PAIR(TimeZone, Israel, "Israel"), PAIR(TimeZone, Jamaica, "Jamaica"), + PAIR(TimeZone, Japan, "Japan"), PAIR(TimeZone, Kwajalein, "Kwajalein"), PAIR(TimeZone, Libya, "Libya"), PAIR(TimeZone, Met, "MET"), @@ -360,6 +361,8 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(TimeZone, Singapore, "Singapore"), PAIR(TimeZone, Turkey, "Turkey"), PAIR(TimeZone, Uct, "UCT"), + PAIR(TimeZone, Universal, "Universal"), + PAIR(TimeZone, Utc, "UTC"), PAIR(TimeZone, WSu, "W-SU"), PAIR(TimeZone, Wet, "WET"), PAIR(TimeZone, Zulu, "Zulu"), -- cgit v1.2.3 From ff6a5031d5ea509375a5dc1ee7b9eeddda6d9ebc Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:48:48 -0400 Subject: settings: Require time zone setting value for stirng --- src/yuzu/configuration/shared_translation.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index 05cc942de..fadc8034e 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -318,7 +318,8 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { { {static_cast(Settings::TimeZone::Auto), tr("Auto (%1)", "Auto select time zone") - .arg(QString::fromStdString(Settings::GetTimeZoneString()))}, + .arg(QString::fromStdString( + Settings::GetTimeZoneString(Settings::TimeZone::Auto)))}, {static_cast(Settings::TimeZone::Default), tr("Default (%1)", "Default time zone") .arg(QString::fromStdString(Common::TimeZone::GetDefaultTimeZone()))}, -- cgit v1.2.3 From 35872ad95b998e77b7bf1dce8ef41b87156952c3 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:59:47 -0400 Subject: shared_translation: Update memory layout mode strings --- src/yuzu/configuration/shared_translation.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/yuzu/configuration/shared_translation.cpp') diff --git a/src/yuzu/configuration/shared_translation.cpp b/src/yuzu/configuration/shared_translation.cpp index fadc8034e..335810788 100644 --- a/src/yuzu/configuration/shared_translation.cpp +++ b/src/yuzu/configuration/shared_translation.cpp @@ -35,8 +35,7 @@ std::unique_ptr InitializeTranslations(QWidget* parent) { // Core INSERT(Settings, use_multi_core, "Multicore CPU Emulation", ""); - INSERT(Settings, use_unsafe_extended_memory_layout, "Unsafe extended memory layout (8GB DRAM)", - ""); + INSERT(Settings, memory_layout_mode, "Memory Layout", ""); INSERT(Settings, use_speed_limit, "", ""); INSERT(Settings, speed_limit, "Limit Speed Percent", ""); @@ -374,6 +373,12 @@ std::unique_ptr ComboboxEnumeration(QWidget* parent) { PAIR(AudioMode, Stereo, "Stereo"), PAIR(AudioMode, Surround, "Surround"), }}); + translations->insert({Settings::EnumMetadata::Index(), + { + PAIR(MemoryLayout, Memory_4Gb, "4GB DRAM (Default)"), + PAIR(MemoryLayout, Memory_6Gb, "6GB DRAM (Unsafe)"), + PAIR(MemoryLayout, Memory_8Gb, "8GB DRAM (Unsafe)"), + }}); #undef PAIR #undef CTX_PAIR -- cgit v1.2.3