Debian Codegraph @

Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #include "DolphinQt/Config/Graphics/AdvancedWidget.h"
5
6 #include <QGridLayout>
7 #include <QGroupBox>
8 #include <QLabel>
9 #include <QVBoxLayout>
10
11 #include "Core/Config/GraphicsSettings.h"
12 #include "Core/Config/SYSCONFSettings.h"
13 #include "Core/ConfigManager.h"
14 #include "Core/Core.h"
15 #include "Core/System.h"
16
17 #include "DolphinQt/Config/ConfigControls/ConfigBool.h"
18 #include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
19 #include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
20 #include "DolphinQt/Config/GameConfigWidget.h"
21 #include "DolphinQt/Config/Graphics/GraphicsPane.h"
22 #include "DolphinQt/Settings.h"
23
24 #include "VideoCommon/VideoConfig.h"
25
26 AdvancedWidget::AdvancedWidget(GraphicsPane* gfx_pane) : m_game_layer{gfx_pane->GetConfigLayer()}
27 {
28 CreateWidgets();
29 ConnectWidgets();
30 AddDescriptions();
31
32 connect(gfx_pane, &GraphicsPane::BackendChanged, this, &AdvancedWidget::OnBackendChanged);
33 connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this](Core::State state) {
34 OnEmulationStateChanged(state != Core::State::Uninitialized);
35 });
36 connect(m_manual_texture_sampling, &QCheckBox::toggled, gfx_pane,
37 [gfx_pane] { emit gfx_pane->UseFastTextureSamplingChanged(); });
38
39 OnBackendChanged();
40 OnEmulationStateChanged(!Core::IsUninitialized(Core::System::GetInstance()));
41 }
42
43 void AdvancedWidget::CreateWidgets()
44 {
45 const bool local_edit = m_game_layer != nullptr;
46
47 auto* main_layout = new QVBoxLayout;
48
49 // Debugging
50 auto* debugging_box = new QGroupBox(tr("Debugging"));
51 auto* debugging_layout = new QGridLayout();
52 debugging_box->setLayout(debugging_layout);
53
54 m_log_render_time = new ConfigBool(tr("Log Render Time to File"),
55 Config::GFX_LOG_RENDER_TIME_TO_FILE, m_game_layer);
56
57 m_enable_wireframe =
58 new ConfigBool(tr("Enable Wireframe"), Config::GFX_ENABLE_WIREFRAME, m_game_layer);
59 m_enable_format_overlay =
60 new ConfigBool(tr("Texture Format Overlay"), Config::GFX_TEXFMT_OVERLAY_ENABLE, m_game_layer);
61 m_enable_api_validation = new ConfigBool(tr("Enable API Validation Layers"),
62 Config::GFX_ENABLE_VALIDATION_LAYER, m_game_layer);
63
64 debugging_layout->addWidget(m_enable_wireframe, 0, 0);
65 debugging_layout->addWidget(m_enable_format_overlay, 0, 1);
66 debugging_layout->addWidget(m_enable_api_validation, 1, 0);
67 debugging_layout->addWidget(m_log_render_time, 1, 1);
68
69 // Utility
70 auto* utility_box = new QGroupBox(tr("Utility"));
71 auto* utility_layout = new QGridLayout();
72 utility_box->setLayout(utility_layout);
73
74 m_load_custom_textures =
75 new ConfigBool(tr("Load Custom Textures"), Config::GFX_HIRES_TEXTURES, m_game_layer);
76 m_prefetch_custom_textures = new ConfigBool(tr("Prefetch Custom Textures"),
77 Config::GFX_CACHE_HIRES_TEXTURES, m_game_layer);
78 m_prefetch_custom_textures->setEnabled(m_load_custom_textures->isChecked());
79 m_dump_efb_target = new ConfigBool(tr("Dump EFB Target"), Config::GFX_DUMP_EFB_TARGET);
80 m_dump_xfb_target = new ConfigBool(tr("Dump XFB Target"), Config::GFX_DUMP_XFB_TARGET);
81
82 if (local_edit)
83 {
84 // It's hazardous to accidentally set these in a game ini.
85 m_dump_efb_target->setEnabled(false);
86 m_dump_xfb_target->setEnabled(false);
87 }
88
89 m_disable_vram_copies = new ConfigBool(tr("Disable EFB VRAM Copies"),
90 Config::GFX_HACK_DISABLE_COPY_TO_VRAM, m_game_layer);
91 m_enable_graphics_mods =
92 new ConfigBool(tr("Enable Graphics Mods"), Config::GFX_MODS_ENABLE, m_game_layer);
93
94 utility_layout->addWidget(m_load_custom_textures, 0, 0);
95 utility_layout->addWidget(m_prefetch_custom_textures, 0, 1);
96
97 utility_layout->addWidget(m_disable_vram_copies, 1, 0);
98 utility_layout->addWidget(m_enable_graphics_mods, 1, 1);
99
100 utility_layout->addWidget(m_dump_efb_target, 2, 0);
101 utility_layout->addWidget(m_dump_xfb_target, 2, 1);
102
103 // Texture dumping
104 auto* texture_dump_box = new QGroupBox(tr("Texture Dumping"));
105 auto* texture_dump_layout = new QGridLayout();
106 texture_dump_box->setLayout(texture_dump_layout);
107 m_dump_textures = new ConfigBool(tr("Enable"), Config::GFX_DUMP_TEXTURES);
108 m_dump_base_textures = new ConfigBool(tr("Dump Base Textures"), Config::GFX_DUMP_BASE_TEXTURES);
109 m_dump_mip_textures = new ConfigBool(tr("Dump Mip Maps"), Config::GFX_DUMP_MIP_TEXTURES);
110 m_dump_mip_textures->setEnabled(m_dump_textures->isChecked());
111 m_dump_base_textures->setEnabled(m_dump_textures->isChecked());
112
113 if (local_edit)
114 {
115 // It's hazardous to accidentally set dumping in a game ini.
116 m_dump_textures->setEnabled(false);
117 m_dump_base_textures->setEnabled(false);
118 m_dump_mip_textures->setEnabled(false);
119 }
120
121 texture_dump_layout->addWidget(m_dump_textures, 0, 0);
122
123 texture_dump_layout->addWidget(m_dump_base_textures, 1, 0);
124 texture_dump_layout->addWidget(m_dump_mip_textures, 1, 1);
125
126 // Frame dumping
127 auto* dump_box = new QGroupBox(tr("Frame Dumping"));
128 auto* dump_layout = new QGridLayout();
129 dump_box->setLayout(dump_layout);
130
131 m_frame_dumps_resolution_type =
132 new ConfigChoice({tr("Window Resolution"), tr("Aspect Ratio Corrected Internal Resolution"),
133 tr("Raw Internal Resolution")},
134 Config::GFX_FRAME_DUMPS_RESOLUTION_TYPE, m_game_layer);
135 m_png_compression_level =
136 new ConfigInteger(0, 9, Config::GFX_PNG_COMPRESSION_LEVEL, m_game_layer);
137 dump_layout->addWidget(new QLabel(tr("Resolution Type:")), 0, 0);
138 dump_layout->addWidget(m_frame_dumps_resolution_type, 0, 1);
139
140 #if defined(HAVE_FFMPEG)
141 m_dump_use_lossless =
142 new ConfigBool(tr("Use Lossless Codec (Ut Video)"), Config::GFX_USE_LOSSLESS, m_game_layer);
143
144 m_dump_bitrate = new ConfigInteger(0, 1000000, Config::GFX_BITRATE_KBPS, m_game_layer, 1000);
145 m_dump_bitrate->setEnabled(!m_dump_use_lossless->isChecked());
146
147 dump_layout->addWidget(m_dump_use_lossless, 1, 0);
148 dump_layout->addWidget(new QLabel(tr("Bitrate (kbps):")), 2, 0);
149 dump_layout->addWidget(m_dump_bitrate, 2, 1);
150 #endif
151
152 dump_layout->addWidget(new QLabel(tr("PNG Compression Level:")), 3, 0);
153 m_png_compression_level->SetTitle(tr("PNG Compression Level"));
154 dump_layout->addWidget(m_png_compression_level, 3, 1);
155
156 // Crop.
157 auto* crop_box = new QGroupBox(tr("Crop"));
158 auto* crop_box_layout = new QVBoxLayout();
159 crop_box->setLayout(crop_box_layout);
160
161 m_crop_to_aspect_ratio =
162 new ConfigBool(tr("To Aspect Ratio"), Config::GFX_CROP_TO_ASPECT_RATIO, m_game_layer);
163 m_crop_custom = new ConfigBool(tr("Custom"), Config::GFX_CROP_CUSTOM, m_game_layer);
164
165 m_crop_custom_box = new QGroupBox(tr("Custom"));
166 auto* misc_crop_custom_layout = new QGridLayout();
167 m_crop_custom_box->setLayout(misc_crop_custom_layout);
168 m_crop_custom_box->setDisabled(!m_crop_custom->isChecked());
169
170 m_crop_custom_left = new ConfigInteger(0, 640, Config::GFX_CROP_CUSTOM_LEFT, m_game_layer, 1);
171 auto crop_custom_left_label = new ConfigIntegerLabel(tr("Left"), m_crop_custom_left);
172 m_crop_custom_top = new ConfigInteger(0, 528, Config::GFX_CROP_CUSTOM_TOP, m_game_layer, 1);
173 auto crop_custom_top_label = new ConfigIntegerLabel(tr("Top"), m_crop_custom_top);
174 m_crop_custom_right = new ConfigInteger(0, 640, Config::GFX_CROP_CUSTOM_RIGHT, m_game_layer, 1);
175 auto crop_custom_right_label = new ConfigIntegerLabel(tr("Right"), m_crop_custom_right);
176 m_crop_custom_bottom = new ConfigInteger(0, 528, Config::GFX_CROP_CUSTOM_BOTTOM, m_game_layer, 1);
177 auto crop_custom_bottom_label = new ConfigIntegerLabel(tr("Bottom"), m_crop_custom_bottom);
178
179 misc_crop_custom_layout->addWidget(crop_custom_left_label, 0, 0);
180 misc_crop_custom_layout->addWidget(m_crop_custom_left, 0, 1);
181 misc_crop_custom_layout->addWidget(crop_custom_top_label, 0, 2);
182 misc_crop_custom_layout->addWidget(m_crop_custom_top, 0, 3);
183 misc_crop_custom_layout->addWidget(crop_custom_right_label, 1, 0);
184 misc_crop_custom_layout->addWidget(m_crop_custom_right, 1, 1);
185 misc_crop_custom_layout->addWidget(crop_custom_bottom_label, 1, 2);
186 misc_crop_custom_layout->addWidget(m_crop_custom_bottom, 1, 3);
187
188 crop_box_layout->addWidget(m_crop_to_aspect_ratio);
189 crop_box_layout->addWidget(m_crop_custom);
190 crop_box_layout->addWidget(m_crop_custom_box);
191
192 // Misc.
193 auto* misc_box = new QGroupBox(tr("Misc"));
194 auto* misc_layout = new QGridLayout();
195 misc_box->setLayout(misc_layout);
196
197 m_enable_prog_scan =
198 new ConfigBool(tr("Enable Progressive Scan"), Config::SYSCONF_PROGRESSIVE_SCAN, m_game_layer);
199 m_backend_multithreading = new ConfigBool(tr("Backend Multithreading"),
200 Config::GFX_BACKEND_MULTITHREADING, m_game_layer);
201 m_prefer_vs_for_point_line_expansion = new ConfigBool(
202 // i18n: VS is short for vertex shaders.
203 tr("Prefer VS for Point/Line Expansion"), Config::GFX_PREFER_VS_FOR_LINE_POINT_EXPANSION,
204 m_game_layer);
205 m_cpu_cull = new ConfigBool(tr("Cull Vertices on the CPU"), Config::GFX_CPU_CULL, m_game_layer);
206
207 misc_layout->addWidget(m_backend_multithreading, 0, 0);
208 misc_layout->addWidget(m_enable_prog_scan, 0, 1);
209 misc_layout->addWidget(m_cpu_cull, 1, 0);
210 misc_layout->addWidget(m_prefer_vs_for_point_line_expansion, 1, 1);
211
212 #ifdef _WIN32
213 m_borderless_fullscreen =
214 new ConfigBool(tr("Borderless Fullscreen"), Config::GFX_BORDERLESS_FULLSCREEN, m_game_layer);
215
216 misc_layout->addWidget(m_borderless_fullscreen, 2, 1);
217 #endif
218
219 // Experimental.
220 auto* experimental_box = new QGroupBox(tr("Experimental"));
221 auto* experimental_layout = new QGridLayout();
222 experimental_box->setLayout(experimental_layout);
223
224 m_defer_efb_access_invalidation = new ConfigBool(
225 tr("Defer EFB Cache Invalidation"), Config::GFX_HACK_EFB_DEFER_INVALIDATION, m_game_layer);
226 m_manual_texture_sampling = new ConfigBool(
227 tr("Manual Texture Sampling"), Config::GFX_HACK_FAST_TEXTURE_SAMPLING, m_game_layer, true);
228
229 experimental_layout->addWidget(m_defer_efb_access_invalidation, 0, 0);
230 experimental_layout->addWidget(m_manual_texture_sampling, 0, 1);
231
232 main_layout->addWidget(debugging_box);
233 main_layout->addWidget(utility_box);
234 main_layout->addWidget(texture_dump_box);
235 main_layout->addWidget(dump_box);
236 main_layout->addWidget(crop_box);
237 main_layout->addWidget(misc_box);
238 main_layout->addWidget(experimental_box);
239 main_layout->addStretch();
240
241 setLayout(main_layout);
242 }
243
244 void AdvancedWidget::ConnectWidgets()
245 {
246 connect(m_load_custom_textures, &QCheckBox::toggled, this,
247 [this](bool checked) { m_prefetch_custom_textures->setEnabled(checked); });
248 connect(m_dump_textures, &QCheckBox::toggled, this, [this](bool checked) {
249 m_dump_mip_textures->setEnabled(checked);
250 m_dump_base_textures->setEnabled(checked);
251 });
252 connect(m_enable_graphics_mods, &QCheckBox::toggled, this,
253 [](bool checked) { emit Settings::Instance().EnableGfxModsChanged(checked); });
254 connect(m_crop_custom, &QCheckBox::toggled, this,
255 [this](bool checked) { m_crop_custom_box->setDisabled(!checked); });
256 #if defined(HAVE_FFMPEG)
257 connect(m_dump_use_lossless, &QCheckBox::toggled, this,
258 [this](bool checked) { m_dump_bitrate->setEnabled(!checked); });
259 #endif
260 }
261
262 void AdvancedWidget::OnBackendChanged()
263 {
264 m_backend_multithreading->setEnabled(g_backend_info.bSupportsMultithreading);
265 m_prefer_vs_for_point_line_expansion->setEnabled(g_backend_info.bSupportsGeometryShaders &&
266 g_backend_info.bSupportsVSLinePointExpand);
267 AddDescriptions();
268 }
269
270 void AdvancedWidget::OnEmulationStateChanged(bool running)
271 {
272 m_enable_prog_scan->setEnabled(!running);
273 }
274
275 void AdvancedWidget::AddDescriptions()
276 {
277 static const char TR_WIREFRAME_DESCRIPTION[] =
278 QT_TR_NOOP("Renders the scene as a wireframe.<br><br><dolphin_emphasis>If unsure, leave "
279 "this unchecked.</dolphin_emphasis>");
280 static const char TR_TEXTURE_FORMAT_DESCRIPTION[] =
281 QT_TR_NOOP("Modifies textures to show the format they're encoded in.<br><br>May require "
282 "an emulation reset to apply.<br><br><dolphin_emphasis>If unsure, leave this "
283 "unchecked.</dolphin_emphasis>");
284 static const char TR_VALIDATION_LAYER_DESCRIPTION[] =
285 QT_TR_NOOP("Enables validation of API calls made by the video backend, which may assist in "
286 "debugging graphical issues. On the Vulkan and D3D backends, this also enables "
287 "debug symbols for the compiled shaders.<br><br><dolphin_emphasis>If unsure, "
288 "leave this unchecked.</dolphin_emphasis>");
289 static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP(
290 "Logs the render time of every frame to User/Logs/render_time.txt.<br><br>Use this "
291 "feature to measure Dolphin's performance.<br><br><dolphin_emphasis>If "
292 "unsure, leave this unchecked.</dolphin_emphasis>");
293 static const char TR_DUMP_TEXTURE_DESCRIPTION[] =
294 QT_TR_NOOP("Dumps decoded game textures based on the other flags to "
295 "User/Dump/Textures/&lt;game_id&gt;/.<br><br><dolphin_emphasis>If unsure, leave "
296 "this unchecked.</dolphin_emphasis>");
297 static const char TR_DUMP_MIP_TEXTURE_DESCRIPTION[] = QT_TR_NOOP(
298 "Whether to dump mipmapped game textures to "
299 "User/Dump/Textures/&lt;game_id&gt;/. This includes arbitrary mipmapped textures if "
300 "'Arbitrary Mipmap Detection' is enabled in Enhancements.<br><br>"
301 "<dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
302 static const char TR_DUMP_BASE_TEXTURE_DESCRIPTION[] = QT_TR_NOOP(
303 "Whether to dump base game textures to "
304 "User/Dump/Textures/&lt;game_id&gt;/. This includes arbitrary base textures if 'Arbitrary "
305 "Mipmap Detection' is enabled in Enhancements.<br><br><dolphin_emphasis>If unsure, leave "
306 "this checked.</dolphin_emphasis>");
307 static const char TR_LOAD_CUSTOM_TEXTURE_DESCRIPTION[] =
308 QT_TR_NOOP("Loads custom textures from User/Load/Textures/&lt;game_id&gt;/ and "
309 "User/Load/DynamicInputTextures/&lt;game_id&gt;/.<br><br><dolphin_emphasis>If "
310 "unsure, leave this unchecked.</dolphin_emphasis>");
311 static const char TR_CACHE_CUSTOM_TEXTURE_DESCRIPTION[] = QT_TR_NOOP(
312 "Caches custom textures to system RAM on startup.<br><br>This can require exponentially "
313 "more RAM but fixes possible stuttering.<br><br><dolphin_emphasis>If unsure, leave this "
314 "unchecked.</dolphin_emphasis>");
315 static const char TR_DUMP_EFB_DESCRIPTION[] =
316 QT_TR_NOOP("Dumps the contents of EFB copies to User/Dump/Textures/.<br><br>"
317 "<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
318 static const char TR_DUMP_XFB_DESCRIPTION[] =
319 QT_TR_NOOP("Dumps the contents of XFB copies to User/Dump/Textures/.<br><br>"
320 "<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
321 static const char TR_DISABLE_VRAM_COPIES_DESCRIPTION[] =
322 QT_TR_NOOP("Disables the VRAM copy of the EFB, forcing a round-trip to RAM. Inhibits all "
323 "upscaling.<br><br><dolphin_emphasis>If unsure, leave this "
324 "unchecked.</dolphin_emphasis>");
325 static const char TR_LOAD_GRAPHICS_MODS_DESCRIPTION[] =
326 QT_TR_NOOP("Loads graphics mods from User/Load/GraphicsMods/.<br><br><dolphin_emphasis>If "
327 "unsure, leave this unchecked.</dolphin_emphasis>");
328 static const char TR_FRAME_DUMPS_RESOLUTION_TYPE_DESCRIPTION[] = QT_TR_NOOP(
329 "Selects how frame dumps (videos) and screenshots are going to be captured.<br>If the game "
330 "or window resolution change during a recording, multiple video files might be created.<br>"
331 "Note that color correction and cropping are always ignored by the captures."
332 "<br><br><b>Window Resolution</b>: Uses the output window resolution (without black bars)."
333 "<br>This is a simple dumping option that will capture the image more or less as you see it."
334 "<br><b>Aspect Ratio Corrected Internal Resolution</b>: "
335 "Uses the Internal Resolution (XFB size), and corrects it by the target aspect ratio.<br>"
336 "This option will consistently dump at the specified Internal Resolution "
337 "regardless of how the image is displayed during recording."
338 "<br><b>Raw Internal Resolution</b>: Uses the Internal Resolution (XFB size) "
339 "without correcting it with the target aspect ratio.<br>"
340 "This will provide a clean dump without any aspect ratio correction so users have as raw as "
341 "possible input for external editing software.<br><br><dolphin_emphasis>If unsure, leave "
342 "this at \"Aspect Ratio Corrected Internal Resolution\".</dolphin_emphasis>");
343 #if defined(HAVE_FFMPEG)
344 static const char TR_USE_LOSSLESS_DESCRIPTION[] =
345 QT_TR_NOOP("Encodes frame dumps using the Ut Video codec. If this option is unchecked, a "
346 "lossy Xvid codec will be used.<br><br><dolphin_emphasis>If "
347 "unsure, leave this unchecked.</dolphin_emphasis>");
348 #endif
349 static const char TR_PNG_COMPRESSION_LEVEL_DESCRIPTION[] =
350 QT_TR_NOOP("Specifies the zlib compression level to use when saving PNG images (both for "
351 "screenshots and framedumping).<br><br>"
352 "Since PNG uses lossless compression, this does not affect the image quality; "
353 "instead, it is a trade-off between file size and compression time.<br><br>"
354 "A value of 0 uses no compression at all. A value of 1 uses very little "
355 "compression, while the maximum value of 9 applies a lot of compression. "
356 "However, for PNG files, levels between 3 and 6 are generally about as good as "
357 "level 9 but finish in significantly less time.<br><br>"
358 "<dolphin_emphasis>If unsure, leave this at 6.</dolphin_emphasis>");
359 static const char TR_PROGRESSIVE_SCAN_DESCRIPTION[] = QT_TR_NOOP(
360 "Enables progressive scan if supported by the emulated software. Most games don't have "
361 "any issue with this.<br><br><dolphin_emphasis>If unsure, leave this "
362 "unchecked.</dolphin_emphasis>");
363 static const char TR_BACKEND_MULTITHREADING_DESCRIPTION[] =
364 QT_TR_NOOP("Enables multithreaded command submission in backends where supported. Enabling "
365 "this option may result in a performance improvement on systems with more than "
366 "two CPU cores. Currently, this is limited to the Vulkan backend.<br><br>"
367 "<dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
368 static const char TR_PREFER_VS_FOR_POINT_LINE_EXPANSION_DESCRIPTION[] =
369 QT_TR_NOOP("On backends that support both using the geometry shader and the vertex shader "
370 "for expanding points and lines, selects the vertex shader for the job. May "
371 "affect performance."
372 "<br><br>%1");
373 static const char TR_CPU_CULL_DESCRIPTION[] =
374 QT_TR_NOOP("Cull vertices on the CPU to reduce the number of draw calls required. "
375 "May affect performance and draw statistics.<br><br>"
376 "<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
377 static const char TR_DEFER_EFB_ACCESS_INVALIDATION_DESCRIPTION[] = QT_TR_NOOP(
378 "Defers invalidation of the EFB access cache until a GPU synchronization command "
379 "is executed. If disabled, the cache will be invalidated with every draw call. "
380 "<br><br>May improve performance in some games which rely on CPU EFB Access at the cost "
381 "of stability.<br><br><dolphin_emphasis>If unsure, leave this "
382 "unchecked.</dolphin_emphasis>");
383 static const char TR_MANUAL_TEXTURE_SAMPLING_DESCRIPTION[] = QT_TR_NOOP(
384 "Use a manual implementation of texture sampling instead of the graphics backend's built-in "
385 "functionality.<br><br>"
386 "This setting can fix graphical issues in some games on certain GPUs, most commonly vertical "
387 "lines on FMVs. In addition to this, enabling Manual Texture Sampling will allow for correct "
388 "emulation of texture wrapping special cases (at 1x IR or when scaled EFB is disabled, and "
389 "with custom textures disabled) and better emulates Level of Detail calculation.<br><br>"
390 "This comes at the cost of potentially worse performance, especially at higher internal "
391 "resolutions.<br><br>If this setting is enabled, the Texture Filtering setting will be "
392 "disabled."
393 "<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
394
395 #ifdef _WIN32
396 static const char TR_BORDERLESS_FULLSCREEN_DESCRIPTION[] = QT_TR_NOOP(
397 "Implements fullscreen mode with a borderless window spanning the whole screen instead of "
398 "using exclusive mode. Allows for faster transitions between fullscreen and windowed mode, "
399 "but slightly increases input latency, makes movement less smooth and slightly decreases "
400 "performance.<br><br><dolphin_emphasis>If unsure, leave this "
401 "unchecked.</dolphin_emphasis>");
402 #endif
403
404 // Crop.
405 static const char TR_CROP_TO_ASPECT_RATIO_DESCRIPTION[] = QT_TR_NOOP(
406 "Crops the picture from its native aspect ratio (which rarely exactly matches 4:3 or 16:9, "
407 "because it often includes overscan) to the specific user target aspect ratio (e.g. 4:3 or "
408 "16:9)."
409 "<br><br>This option was previously known as Graphics/Advanced/Misc/Crop."
410 "<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
411 static const char TR_CROP_CUSTOM_DESCRIPTION[] = QT_TR_NOOP(
412 "Enables options to crop the picture by discrete native pixels (independent of the internal "
413 "resolution setting) in order to attain a specific "
414 "user target aspect ratio. Useful to resolve letterboxing issues."
415 " <br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
416 static const char TR_CROP_CUSTOM_LEFT[] = QT_TR_NOOP(
417 "Crops the picture left side by discrete native pixels (independent of the internal "
418 "resolution setting) in order to attain a specific user target aspect ratio. "
419 " <br><br><dolphin_emphasis>If unsure, leave this value to 0.</dolphin_emphasis>");
420 static const char TR_CROP_CUSTOM_TOP[] = QT_TR_NOOP(
421 "Crops the picture top side by discrete native pixels (independent of the internal "
422 "resolution setting) in order to attain a specific user target aspect ratio. "
423 " <br><br><dolphin_emphasis>If unsure, leave this value to 0.</dolphin_emphasis>");
424 static const char TR_CROP_CUSTOM_RIGHT[] = QT_TR_NOOP(
425 "Crops the picture right side by discrete native pixels (independent of the internal "
426 "resolution setting) in order to attain a specific user target aspect ratio. "
427 " <br><br><dolphin_emphasis>If unsure, leave this value to 0.</dolphin_emphasis>");
428 static const char TR_CROP_CUSTOM_BOTTOM[] = QT_TR_NOOP(
429 "Crops the picture bottom side by discrete native pixels (independent of the internal "
430 "resolution setting) in order to attain a specific user target aspect ratio. "
431 " <br><br><dolphin_emphasis>If unsure, leave this value to 0.</dolphin_emphasis>");
432
433 static const char IF_UNSURE_UNCHECKED[] =
434 QT_TR_NOOP("<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
435
436 m_enable_wireframe->SetDescription(tr(TR_WIREFRAME_DESCRIPTION));
437 m_enable_format_overlay->SetDescription(tr(TR_TEXTURE_FORMAT_DESCRIPTION));
438 m_enable_api_validation->SetDescription(tr(TR_VALIDATION_LAYER_DESCRIPTION));
439 m_log_render_time->SetDescription(tr(TR_LOG_RENDERTIME_DESCRIPTION));
440 m_dump_textures->SetDescription(tr(TR_DUMP_TEXTURE_DESCRIPTION));
441 m_dump_mip_textures->SetDescription(tr(TR_DUMP_MIP_TEXTURE_DESCRIPTION));
442 m_dump_base_textures->SetDescription(tr(TR_DUMP_BASE_TEXTURE_DESCRIPTION));
443 m_load_custom_textures->SetDescription(tr(TR_LOAD_CUSTOM_TEXTURE_DESCRIPTION));
444 m_prefetch_custom_textures->SetDescription(tr(TR_CACHE_CUSTOM_TEXTURE_DESCRIPTION));
445 m_dump_efb_target->SetDescription(tr(TR_DUMP_EFB_DESCRIPTION));
446 m_dump_xfb_target->SetDescription(tr(TR_DUMP_XFB_DESCRIPTION));
447 m_disable_vram_copies->SetDescription(tr(TR_DISABLE_VRAM_COPIES_DESCRIPTION));
448 m_enable_graphics_mods->SetDescription(tr(TR_LOAD_GRAPHICS_MODS_DESCRIPTION));
449 m_frame_dumps_resolution_type->SetDescription(tr(TR_FRAME_DUMPS_RESOLUTION_TYPE_DESCRIPTION));
450 #ifdef HAVE_FFMPEG
451 m_dump_use_lossless->SetDescription(tr(TR_USE_LOSSLESS_DESCRIPTION));
452 #endif
453 m_png_compression_level->SetDescription(tr(TR_PNG_COMPRESSION_LEVEL_DESCRIPTION));
454 m_enable_prog_scan->SetDescription(tr(TR_PROGRESSIVE_SCAN_DESCRIPTION));
455 m_backend_multithreading->SetDescription(tr(TR_BACKEND_MULTITHREADING_DESCRIPTION));
456 QString vsexpand_extra;
457 if (!g_backend_info.bSupportsGeometryShaders)
458 vsexpand_extra = tr("Forced on because %1 doesn't support geometry shaders.")
459 .arg(tr(g_backend_info.DisplayName.c_str()));
460 else if (!g_backend_info.bSupportsVSLinePointExpand)
461 vsexpand_extra = tr("Forced off because %1 doesn't support VS expansion.")
462 .arg(tr(g_backend_info.DisplayName.c_str()));
463 else
464 vsexpand_extra = tr(IF_UNSURE_UNCHECKED);
465 m_prefer_vs_for_point_line_expansion->SetDescription(
466 tr(TR_PREFER_VS_FOR_POINT_LINE_EXPANSION_DESCRIPTION).arg(vsexpand_extra));
467 m_cpu_cull->SetDescription(tr(TR_CPU_CULL_DESCRIPTION));
468 #ifdef _WIN32
469 m_borderless_fullscreen->SetDescription(tr(TR_BORDERLESS_FULLSCREEN_DESCRIPTION));
470 #endif
471 m_crop_to_aspect_ratio->SetDescription(tr(TR_CROP_TO_ASPECT_RATIO_DESCRIPTION));
472 m_crop_custom->SetDescription(tr(TR_CROP_CUSTOM_DESCRIPTION));
473 m_crop_custom_left->SetDescription(tr(TR_CROP_CUSTOM_LEFT));
474 m_crop_custom_top->SetDescription(tr(TR_CROP_CUSTOM_TOP));
475 m_crop_custom_right->SetDescription(tr(TR_CROP_CUSTOM_RIGHT));
476 m_crop_custom_bottom->SetDescription(tr(TR_CROP_CUSTOM_BOTTOM));
477 m_defer_efb_access_invalidation->SetDescription(tr(TR_DEFER_EFB_ACCESS_INVALIDATION_DESCRIPTION));
478 m_manual_texture_sampling->SetDescription(tr(TR_MANUAL_TEXTURE_SAMPLING_DESCRIPTION));
479 }