Skip to content

Commit

Permalink
Special cases for SingleChoiceSetting options with long descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Ebola16 committed Feb 26, 2019
1 parent 15e8346 commit 92acf19
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,34 @@ public void bind(SettingsItem item)

if (item.getDescriptionId() > 0)
{
mTextSettingDescription.setText(item.getDescriptionId());
// Special cases for SingleChoiceSetting options with long descriptions
switch (item.getDescriptionId())
{
case R.string.shader_compilation_mode_description:
switch (((SingleChoiceSetting) item).getSelectedValue())
{
case 0:
mTextSettingDescription.setText(R.string.shader_compilation_sync_description);
break;

case 1:
mTextSettingDescription.setText(R.string.shader_compilation_sync_uber_description);
break;

case 2:
mTextSettingDescription.setText(R.string.shader_compilation_async_uber_description);
break;

case 3:
mTextSettingDescription.setText(R.string.shader_compilation_async_skip_description);
break;
}
break;

default:
mTextSettingDescription.setText(item.getDescriptionId());
break;
}
}
else if (item instanceof SingleChoiceSetting)
{
Expand Down
6 changes: 5 additions & 1 deletion Source/Android/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@
<string name="aspect_ratio">Aspect Ratio</string>
<string name="aspect_ratio_description">Select what aspect ratio to use when rendering</string>
<string name="shader_compilation_mode">Shader Compilation Mode</string>
<string name="shader_compilation_mode_description">Specifies when to use Ubershaders. Disabled - Never, Hybrid - Use ubershaders while compiling specialized shaders. Exclusive - Use only ubershaders, largest performance impact. Skip Drawing - Do not draw objects while shaders are compiling, will cause broken effects.</string>
<string name="shader_compilation_mode_description">Specifies when to use Ubershaders.</string>
<string name="shader_compilation_sync_description">Synchronous: Ubershaders are never used. Stuttering will occur during shader compilation, but GPU demands are low. Recommended for low-end hardware.\nIf unsure, select this mode.</string>
<string name="shader_compilation_sync_uber_description">Synchronous (Ubershaders): Ubershaders will always be used. Provides a near stutter-free experience at the cost of high GPU performance requirements. Only recommended for high-end systems.</string>
<string name="shader_compilation_async_uber_description">Asynchronous (Ubershaders): Ubershaders will be used to prevent stuttering during shader compilation, but specialized shaders will be used when they will not cause stuttering. In the best case it eliminates shader compilation stuttering while having minimal performance impact, but results depend on video driver behavior.</string>
<string name="shader_compilation_async_skip_description">Asynchronous (Skip Drawing): Prevents shader compilation stuttering by not rendering waiting objects. Can work in scenarios where Ubershaders doesn\'t, at the cost of introducing visual glitches and broken effects. Not recommended, only use if the other options give poor results on your system.</string>
<string name="wait_for_shaders">Compile Shaders Before Starting</string>
<string name="wait_for_shaders_description">This causes a delay when launching games, but will reduce stuttering early on.</string>

Expand Down

0 comments on commit 92acf19

Please sign in to comment.