1use crate::app::HelpText;
2
3pub const FULLSCREEN: HelpText = HelpText {
4    heading: "Fullscreen",
5    text: &["If enabled, launch fullscreen instead of windowed."],
6};
7
8pub const INITIAL_WINDOW_SIZE: HelpText = HelpText {
9    heading: "Initial Window Size",
10    text: &[
11        "Initial window size when not running in fullscreen, as a multiple of the console's native resolution.",
12        "Changing this setting will only take effect after opening a new game.",
13    ],
14};
15
16pub const BORDERLESS_WINDOW: HelpText = HelpText {
17    heading: "Borderless Window",
18    text: &[
19        "If enabled, make the emulator window borderless (no window decorations). This has no effect when in fullscreen mode.",
20        "When this is enabled, you can click inside the window to drag it.",
21        "This setting is incompatible with mouse input mappings due to the click-to-drag behavior.",
22    ],
23};
24
25pub const WGPU_BACKEND: HelpText = HelpText {
26    heading: "wgpu Backend",
27    text: &[
28        "Specify which graphics API wgpu will use.",
29        "Auto is generally DirectX 12 on Windows and Vulkan on other platforms.",
30    ],
31};
32
33pub const WGPU_POWER_PREFERENCE: HelpText = HelpText {
34    heading: "wgpu Power Preference",
35    text: &[
36        "Configure the power preference used for choosing a graphics device, if multiple devices are available.",
37        "High performance generally picks a dedicated GPU. Low power generally picks an integrated GPU. No preference lets the OS decide.",
38    ],
39};
40
41pub const VSYNC_MODE: HelpText = HelpText {
42    heading: "VSync Mode",
43    text: &[
44        "Enable video synchronization. Prevents screen tearing and may improve frame pacing, but may also increase input latency.",
45        "Fast VSync prevents screen tearing but otherwise behaves similarly to disabled VSync.",
46    ],
47};
48
49pub const FILTER_MODE: HelpText = HelpText {
50    heading: "Image Filtering",
51    text: &[
52        "Configure texture filtering mode used when rendering frames to the display.",
53        "Nearest neighbor is very sharp but may cause aliasing when using a non-integer resolution scale or non-square pixels.",
54        "Linear interpolation is smooth but can be blurry if not combined with prescaling.",
55    ],
56};
57
58pub const SUPERSAMPLE_MINIFICATION: HelpText = HelpText {
59    heading: "Supersampled Minification",
60    text: &[
61        "Render using supersampling when minifying the image by a factor of 2 or larger, i.e. when the display window is less than half the width or height of the emulator frame.",
62        "When the frame is a very high resolution either natively or because of shaders, this can reduce aliasing at a moderately low GPU performance cost (depending on resolution).",
63    ],
64};
65
66pub const PREPROCESS_SHADER: HelpText = HelpText {
67    heading: "Video Shader",
68    text: &[
69        "Configure an optional shader to apply to the emulated console's video output.",
70        "The NTSC shader only works with consoles that natively support TV output (i.e. not handhelds).",
71        "The SNES Adaptive blur shader blurs horizontally at 2x native resolution, except in SNES high-res mode where it blurs at 1x native.",
72    ],
73};
74
75pub const ANTI_DITHER_SHADER: HelpText = HelpText {
76    heading: "Anti-Dither Shader",
77    text: &[
78        "Configure an optional anti-dither filter, applied before the video shader if enabled.",
79        "This attempts to remove dithering by blending horizontally adjacent colors that appear to be part of a dithered pixel pattern. This is based on heuristics and is not 100% reliable.",
80        "This setting does nothing if the video shader is set to NTSC or horizontal blur.",
81    ],
82};
83
84pub const FRAME_ROTATION: HelpText = HelpText {
85    heading: "Frame Rotation",
86    text: &[
87        "Optionally rotate the entire image.",
88        "Useful for handheld games or demos that are designed around rotating the console.",
89    ],
90};
91
92pub const SCANLINES: HelpText =
93    HelpText { heading: "Scanlines", text: &["Configure an optional scanlines filter."] };
94
95pub const PRESCALING: HelpText = HelpText {
96    heading: "Prescaling",
97    text: &[
98        "Apply integer upscaling before rendering frames to display. When combined with linear filtering, this creates an image that is sharp but with minimal aliasing.",
99        "Auto-prescale dynamically adjusts the upscale factor based on the ratio between the viewport size and the console's native resolution.",
100    ],
101};
102
103pub const INTEGER_HEIGHT_SCALING: HelpText = HelpText {
104    heading: "Force Integer Height Scaling",
105    text: &[
106        "If enabled, frames will always be displayed at the largest possible integer multiple of the console's native vertical resolution that will fit in the current viewport.",
107    ],
108};
109
110pub const MUTE_AUDIO: HelpText =
111    HelpText { heading: "Mute Audio", text: &["Mute all audio output."] };
112
113pub const AUDIO_SAMPLE_RATE: HelpText = HelpText {
114    heading: "Audio Sample Rate",
115    text: &[
116        "Configure the output sample rate.",
117        "Most audio devices should support both of these settings, but some may only support one.",
118    ],
119};
120
121pub const FRAME_TIME_SYNC: HelpText = HelpText {
122    heading: "Frame Time Sync",
123    text: &[
124        "If enabled, make a best effort to present video frames with consistent frame timing while maintaining the emulated system's native framerate.",
125        "This is different from VSync in that it's based purely on system time and does not perform any kind of synchronization with the graphics driver.",
126    ],
127};
128
129pub const AUDIO_SYNC: HelpText = HelpText {
130    heading: "Audio Sync",
131    text: &[
132        "If enabled, synchronize emulation speed to the audio output stream by blocking when the audio buffer is full.",
133        "This prevents audio popping caused by audio buffer overflows.",
134    ],
135};
136
137pub const AUDIO_DYNAMIC_RESAMPLING: HelpText = HelpText {
138    heading: "Audio Dynamic Resampling Ratio",
139    text: &[
140        "If enabled, periodically adjust the audio resampling ratio to try and keep the audio buffer as close as possible to the target buffer size. The audio buffer is allowed to grow to double size when this is enabled.",
141        "This should reduce audio pops caused by audio buffer underflow and overflow when using frame time sync or VSync.",
142        "Changing the resampling ratio this way does slightly change the audio pitch, but the difference should be inaudible - the adjusted ratio is restricted to being within 0.5% of the original ratio.",
143    ],
144};
145
146pub const AUDIO_BUFFER_SIZE: HelpText = HelpText {
147    heading: "Audio Buffer Size",
148    text: &[
149        "Configure the size of the audio buffer in samples. This is where audio is buffered before sending to the audio device.",
150        "This value is the max buffer capacity when audio sync is disabled, and the size at which the emulator will block when audio sync is enabled.",
151        "Dynamic resampling ratio uses this value as the target buffer size and allows the buffer to grow to double this value before dropping samples or blocking.",
152        "This setting affects audio latency.",
153    ],
154};
155
156pub const AUDIO_HARDWARE_QUEUE_SIZE: HelpText = HelpText {
157    heading: "Audio Hardware Queue Size",
158    text: &[
159        "Configure the number of samples to push whenever the audio device asks for more audio data.",
160        "Decreasing this value can increase CPU usage, and decreasing it too much can also cause various audio playback issues.",
161        "Increasing this value makes audio sync and dynamic resampling ratio less accurate, and it will also increase audio latency.",
162    ],
163};
164
165pub const AUDIO_GAIN: HelpText = HelpText {
166    heading: "Audio Gain",
167    text: &[
168        "Optionally configure a gain value to apply to final mixed audio output.",
169        "Positive values increase volume and negative values decrease volume. Can be an integer or decimal value.",
170        "Setting this too high can cause audio distortion.",
171    ],
172};