@ -20,7 +20,9 @@
# include <utility>
namespace ConfigurationShared {
std : : unique_ptr < TranslationMap > InitializeTranslations ( QObject * parent ) {
std : : unique_ptr < TranslationMap > InitializeTranslations ( QObject * parent )
{
std : : unique_ptr < TranslationMap > translations = std : : make_unique < TranslationMap > ( ) ;
const auto & tr = [ parent ] ( const char * text ) - > QString { return parent - > tr ( text ) ; } ;
@ -116,9 +118,7 @@ namespace ConfigurationShared {
// Cpu Unsafe
INSERT ( Settings , cpuopt_unsafe_host_mmu , tr ( " Enable Host MMU Emulation (fastmem) " ) ,
tr (
" This optimization speeds up memory accesses by the guest program. \n Enabling it causes guest memory reads/writes to be done directly into memory and make use of Host's MMU. \n Disabling this forces all memory accesses to use Software MMU Emulation. "
) ) ;
tr ( " This optimization speeds up memory accesses by the guest program. \n Enabling it causes guest memory reads/writes to be done directly into memory and make use of Host's MMU. \n Disabling this forces all memory accesses to use Software MMU Emulation. " ) ) ;
INSERT (
Settings ,
cpuopt_unsafe_unfuse_fma ,
@ -238,9 +238,7 @@ namespace ConfigurationShared {
INSERT ( Settings ,
vram_usage_mode ,
tr ( " VRAM Usage Mode: " ) ,
tr (
" Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. \n Aggressive mode may impact performance of other applications such as recording software. "
) ) ;
tr ( " Selects whether the emulator should prefer to conserve memory or make maximum usage of available video memory for performance. \n Aggressive mode may impact performance of other applications such as recording software. " ) ) ;
INSERT ( Settings ,
skip_cpu_inner_invalidation ,
tr ( " Skip CPU Inner Invalidation " ) ,
@ -261,9 +259,7 @@ namespace ConfigurationShared {
// Renderer (Advanced Graphics)
INSERT ( Settings , sync_memory_operations , tr ( " Sync Memory Operations " ) ,
tr (
" Ensures data consistency between compute and memory operations. \n This option fixes issues in games, but may degrade performance. \n Unreal Engine 4 games often see the most significant changes thereof. "
) ) ;
tr ( " Ensures data consistency between compute and memory operations. \n This option fixes issues in games, but may degrade performance. \n Unreal Engine 4 games often see the most significant changes thereof. " ) ) ;
INSERT ( Settings ,
async_presentation ,
tr ( " Enable asynchronous presentation (Vulkan only) " ) ,
@ -287,9 +283,7 @@ namespace ConfigurationShared {
INSERT ( Settings ,
dma_accuracy ,
tr ( " DMA Accuracy: " ) ,
tr (
" Controls the DMA precision accuracy. Safe precision fixes issues in some games but may degrade performance. "
) ) ;
tr ( " Controls the DMA precision accuracy. Safe precision fixes issues in some games but may degrade performance. " ) ) ;
INSERT ( Settings ,
use_asynchronous_shaders ,
tr ( " Enable asynchronous shader compilation (Hack) " ) ,
@ -334,9 +328,12 @@ namespace ConfigurationShared {
INSERT ( Settings ,
dyna_state ,
tr ( " Extended Dynamic State " ) ,
tr (
" Controls the number of features that can be used in Extended Dynamic State. \n Higher numbers allow for more features and can increase performance, but may cause issues. \n The default value is per-system. "
) ) ;
tr ( " Controls the number of features that can be used in Extended Dynamic State. \n Higher numbers allow for more features and can increase performance, but may cause issues. \n The default value is per-system. " ) ) ;
INSERT ( Settings ,
vertex_input_dynamic_state ,
tr ( " Vertex Input Dynamic State " ) ,
tr ( " Enables vertex input dynamic state feature for better quality and performance. " ) ) ;
INSERT ( Settings ,
provoking_vertex ,
@ -453,7 +450,8 @@ namespace ConfigurationShared {
return translations ;
}
std : : unique_ptr < ComboboxTranslationMap > ComboboxEnumeration ( QObject * parent ) {
std : : unique_ptr < ComboboxTranslationMap > ComboboxEnumeration ( QObject * parent )
{
std : : unique_ptr < ComboboxTranslationMap > translations = std : : make_unique < ComboboxTranslationMap > ( ) ;
const auto & tr = [ & ] ( const char * text , const char * context = " " ) {
return parent - > tr ( text , context ) ;
@ -462,117 +460,90 @@ namespace ConfigurationShared {
# define PAIR(ENUM, VALUE, TRANSLATION) {static_cast<u32>(Settings::ENUM::VALUE), (TRANSLATION)}
// Intentionally skipping VSyncMode to let the UI fill that one out
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AppletMode > : : Index ( ) ,
translations - > insert ( { Settings : : EnumMetadata < Settings : : AppletMode > : : Index ( ) ,
{
PAIR ( AppletMode , HLE , tr ( " Custom frontend " ) ) ,
PAIR ( AppletMode , LLE , tr ( " Real applet " ) ) ,
}
} ) ;
} } ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : SpirvOptimizeMode > : : Index ( ) ,
translations - > insert ( { Settings : : EnumMetadata < Settings : : SpirvOptimizeMode > : : Index ( ) ,
{
PAIR ( SpirvOptimizeMode , Never , tr ( " Never " ) ) ,
PAIR ( SpirvOptimizeMode , OnLoad , tr ( " On Load " ) ) ,
PAIR ( SpirvOptimizeMode , Always , tr ( " Always " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AstcDecodeMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : AstcDecodeMode > : : Index ( ) ,
{
PAIR ( AstcDecodeMode , Cpu , tr ( " CPU " ) ) ,
PAIR ( AstcDecodeMode , Gpu , tr ( " GPU " ) ) ,
PAIR ( AstcDecodeMode , CpuAsynchronous , tr ( " CPU Asynchronous " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : AstcRecompression > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : AstcRecompression > : : Index ( ) ,
{
PAIR ( AstcRecompression , Uncompressed , tr ( " Uncompressed (Best quality) " ) ) ,
PAIR ( AstcRecompression , Bc1 , tr ( " BC1 (Low quality) " ) ) ,
PAIR ( AstcRecompression , Bc3 , tr ( " BC3 (Medium quality) " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : VramUsageMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : VramUsageMode > : : Index ( ) ,
{
PAIR ( VramUsageMode , Conservative , tr ( " Conservative " ) ) ,
PAIR ( VramUsageMode , Aggressive , tr ( " Aggressive " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : RendererBackend > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : RendererBackend > : : Index ( ) ,
{
# ifdef HAS_OPENGL
PAIR ( RendererBackend , OpenGL , tr ( " OpenGL " ) ) ,
# endif
PAIR ( RendererBackend , Vulkan , tr ( " Vulkan " ) ) ,
PAIR ( RendererBackend , Null , tr ( " Null " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : ShaderBackend > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : ShaderBackend > : : Index ( ) ,
{
PAIR ( ShaderBackend , Glsl , tr ( " GLSL " ) ) ,
PAIR ( ShaderBackend , Glasm , tr ( " GLASM (Assembly Shaders, NVIDIA Only) " ) ) ,
PAIR ( ShaderBackend , SpirV , tr ( " SPIR-V (Experimental, AMD/Mesa Only) " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : GpuAccuracy > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : GpuAccuracy > : : Index ( ) ,
{
PAIR ( GpuAccuracy , Normal , tr ( " Normal " ) ) ,
PAIR ( GpuAccuracy , High , tr ( " High " ) ) ,
PAIR ( GpuAccuracy , Extreme , tr ( " Extreme " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : DmaAccuracy > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : DmaAccuracy > : : Index ( ) ,
{
PAIR ( DmaAccuracy , Default , tr ( " Default " ) ) ,
PAIR ( DmaAccuracy , Unsafe , tr ( " Unsafe (fast) " ) ) ,
PAIR ( DmaAccuracy , Safe , tr ( " Safe (stable) " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : CpuAccuracy > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : CpuAccuracy > : : Index ( ) ,
{
PAIR ( CpuAccuracy , Auto , tr ( " Auto " ) ) ,
PAIR ( CpuAccuracy , Accurate , tr ( " Accurate " ) ) ,
PAIR ( CpuAccuracy , Unsafe , tr ( " Unsafe " ) ) ,
PAIR ( CpuAccuracy , Paranoid , tr ( " Paranoid (disables most optimizations) " ) ) ,
PAIR ( CpuAccuracy , Debugging , tr ( " Debugging " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : CpuBackend > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : CpuBackend > : : Index ( ) ,
{
PAIR ( CpuBackend , Dynarmic , tr ( " Dynarmic " ) ) ,
PAIR ( CpuBackend , Nce , tr ( " NCE " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : FullscreenMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : FullscreenMode > : : Index ( ) ,
{
PAIR ( FullscreenMode , Borderless , tr ( " Borderless Windowed " ) ) ,
PAIR ( FullscreenMode , Exclusive , tr ( " Exclusive Fullscreen " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : NvdecEmulation > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : NvdecEmulation > : : Index ( ) ,
{
PAIR ( NvdecEmulation , Off , tr ( " No Video Output " ) ) ,
PAIR ( NvdecEmulation , Cpu , tr ( " CPU Video Decoding " ) ) ,
PAIR ( NvdecEmulation , Gpu , tr ( " GPU Video Decoding (Default) " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : ResolutionSetup > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : ResolutionSetup > : : Index ( ) ,
{
PAIR ( ResolutionSetup , Res1_4X , tr ( " 0.25X (180p/270p) [EXPERIMENTAL] " ) ) ,
PAIR ( ResolutionSetup , Res1_2X , tr ( " 0.5X (360p/540p) [EXPERIMENTAL] " ) ) ,
@ -587,10 +558,8 @@ namespace ConfigurationShared {
PAIR ( ResolutionSetup , Res6X , tr ( " 6X (4320p/6480p) " ) ) ,
PAIR ( ResolutionSetup , Res7X , tr ( " 7X (5040p/7560p) " ) ) ,
PAIR ( ResolutionSetup , Res8X , tr ( " 8X (5760p/8640p) " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : ScalingFilter > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : ScalingFilter > : : Index ( ) ,
{
PAIR ( ScalingFilter , NearestNeighbor , tr ( " Nearest Neighbor " ) ) ,
PAIR ( ScalingFilter , Bilinear , tr ( " Bilinear " ) ) ,
@ -605,28 +574,22 @@ namespace ConfigurationShared {
PAIR ( ScalingFilter , BSpline , tr ( " B-Spline " ) ) ,
PAIR ( ScalingFilter , Mitchell , tr ( " Mitchell " ) ) ,
PAIR ( ScalingFilter , Spline1 , tr ( " Spline-1 " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AntiAliasing > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : AntiAliasing > : : Index ( ) ,
{
PAIR ( AntiAliasing , None , tr ( " None " ) ) ,
PAIR ( AntiAliasing , Fxaa , tr ( " FXAA " ) ) ,
PAIR ( AntiAliasing , Smaa , tr ( " SMAA " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AspectRatio > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : AspectRatio > : : Index ( ) ,
{
PAIR ( AspectRatio , R16_9 , tr ( " Default (16:9) " ) ) ,
PAIR ( AspectRatio , R4_3 , tr ( " Force 4:3 " ) ) ,
PAIR ( AspectRatio , R21_9 , tr ( " Force 21:9 " ) ) ,
PAIR ( AspectRatio , R16_10 , tr ( " Force 16:10 " ) ) ,
PAIR ( AspectRatio , Stretch , tr ( " Stretch to Window " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AnisotropyMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : AnisotropyMode > : : Index ( ) ,
{
PAIR ( AnisotropyMode , Automatic , tr ( " Automatic " ) ) ,
PAIR ( AnisotropyMode , Default , tr ( " Default " ) ) ,
@ -634,11 +597,9 @@ namespace ConfigurationShared {
PAIR ( AnisotropyMode , X4 , tr ( " 4x " ) ) ,
PAIR ( AnisotropyMode , X8 , tr ( " 8x " ) ) ,
PAIR ( AnisotropyMode , X16 , tr ( " 16x " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : Language > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : Language > : : Index ( ) ,
{
PAIR ( Language , Japanese , tr ( " Japanese (日本語) " ) ) ,
PAIR ( Language , EnglishAmerican , tr ( " American English " ) ) ,
@ -659,10 +620,8 @@ namespace ConfigurationShared {
PAIR ( Language , ChineseTraditional , tr ( " Traditional Chinese (正體中文) " ) ) ,
PAIR ( Language , PortugueseBrazilian , tr ( " Brazilian Portuguese (português do Brasil) " ) ) ,
PAIR ( Language , Serbian , tr ( " Serbian (српски) " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : Region > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : Region > : : Index ( ) ,
{
PAIR ( Region , Japan , tr ( " Japan " ) ) ,
PAIR ( Region , Usa , tr ( " USA " ) ) ,
@ -671,23 +630,17 @@ namespace ConfigurationShared {
PAIR ( Region , China , tr ( " China " ) ) ,
PAIR ( Region , Korea , tr ( " Korea " ) ) ,
PAIR ( Region , Taiwan , tr ( " Taiwan " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{ Settings : : EnumMetadata < Settings : : TimeZone > : : Index ( ) ,
{
Settings : : EnumMetadata < Settings : : TimeZone > : : Index ( ) ,
{
{
static_cast < u32 > ( Settings : : TimeZone : : Auto ) ,
{ static_cast < u32 > ( Settings : : TimeZone : : Auto ) ,
tr ( " Auto (%1) " , " Auto select time zone " )
. arg ( QString : : fromStdString (
Settings : : GetTimeZoneString ( Settings : : TimeZone : : Auto ) ) )
} ,
{
static_cast < u32 > ( Settings : : TimeZone : : Default ) ,
Settings : : GetTimeZoneString ( Settings : : TimeZone : : Auto ) ) ) } ,
{ static_cast < u32 > ( Settings : : TimeZone : : Default ) ,
tr ( " Default (%1) " , " Default time zone " )
. arg ( QString : : fromStdString ( Common : : TimeZone : : GetDefaultTimeZone ( ) ) )
} ,
. arg ( QString : : fromStdString ( Common : : TimeZone : : GetDefaultTimeZone ( ) ) ) } ,
PAIR ( TimeZone , Cet , tr ( " CET " ) ) ,
PAIR ( TimeZone , Cst6Cdt , tr ( " CST6CDT " ) ) ,
PAIR ( TimeZone , Cuba , tr ( " Cuba " ) ) ,
@ -732,57 +685,44 @@ namespace ConfigurationShared {
PAIR ( TimeZone , WSu , tr ( " W-SU " ) ) ,
PAIR ( TimeZone , Wet , tr ( " WET " ) ) ,
PAIR ( TimeZone , Zulu , tr ( " Zulu " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : AudioMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : AudioMode > : : Index ( ) ,
{
PAIR ( AudioMode , Mono , tr ( " Mono " ) ) ,
PAIR ( AudioMode , Stereo , tr ( " Stereo " ) ) ,
PAIR ( AudioMode , Surround , tr ( " Surround " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : MemoryLayout > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : MemoryLayout > : : Index ( ) ,
{
PAIR ( MemoryLayout , Memory_4Gb , tr ( " 4GB DRAM (Default) " ) ) ,
PAIR ( MemoryLayout , Memory_6Gb , tr ( " 6GB DRAM (Unsafe) " ) ) ,
PAIR ( MemoryLayout , Memory_8Gb , tr ( " 8GB DRAM " ) ) ,
PAIR ( MemoryLayout , Memory_10Gb , tr ( " 10GB DRAM (Unsafe) " ) ) ,
PAIR ( MemoryLayout , Memory_12Gb , tr ( " 12GB DRAM (Unsafe) " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : ConsoleMode > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : ConsoleMode > : : Index ( ) ,
{
PAIR ( ConsoleMode , Docked , tr ( " Docked " ) ) ,
PAIR ( ConsoleMode , Handheld , tr ( " Handheld " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : CpuClock > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : CpuClock > : : Index ( ) ,
{
PAIR ( CpuClock , Boost , tr ( " Boost (1700MHz) " ) ) ,
PAIR ( CpuClock , Fast , tr ( " Fast (2000MHz) " ) ) ,
}
} ) ;
} } ) ;
translations - > insert (
{
Settings : : EnumMetadata < Settings : : ConfirmStop > : : Index ( ) ,
{ Settings : : EnumMetadata < Settings : : ConfirmStop > : : Index ( ) ,
{
PAIR ( ConfirmStop , Ask_Always , tr ( " Always ask (Default) " ) ) ,
PAIR ( ConfirmStop , Ask_Based_On_Game , tr ( " Only if game specifies not to stop " ) ) ,
PAIR ( ConfirmStop , Ask_Never , tr ( " Never ask " ) ) ,
}
} ) ;
translations - > insert ( {
Settings : : EnumMetadata < Settings : : GpuOverclock > : : Index ( ) ,
} } ) ;
translations - > insert ( { Settings : : EnumMetadata < Settings : : GpuOverclock > : : Index ( ) ,
{
PAIR ( GpuOverclock , Low , tr ( " Low (128) " ) ) ,
PAIR ( GpuOverclock , Medium , tr ( " Medium (256) " ) ) ,
PAIR ( GpuOverclock , High , tr ( " High (512) " ) ) ,
}
} ) ;
} } ) ;
# undef PAIR
# undef CTX_PAIR