mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 15:30:35 +00:00
UI: Fix texture scaling level selection.
It previously was not possible to select 4 on a POT-only device, since it would become 3, which would in turn become 2. Also, this allows selection on other backends, e.g. Vulkan.
This commit is contained in:
parent
fe4c0e9f5a
commit
9b15ce0934
@ -250,22 +250,18 @@ void GameSettingsScreen::CreateViews() {
|
||||
graphicsSettings->Add(new ItemHeader(gr->T("Texture Scaling")));
|
||||
#ifndef MOBILE_DEVICE
|
||||
static const char *texScaleLevelsNPOT[] = {"Auto", "Off", "2x", "3x", "4x", "5x"};
|
||||
static const char *texScaleLevelsPOT[] = {"Auto", "Off", "2x", "4x"};
|
||||
#else
|
||||
static const char *texScaleLevelsNPOT[] = {"Auto", "Off", "2x", "3x"};
|
||||
static const char *texScaleLevelsPOT[] = {"Auto", "Off", "2x"};
|
||||
#endif
|
||||
|
||||
static const char **texScaleLevels;
|
||||
static int numTexScaleLevels;
|
||||
if (gl_extensions.OES_texture_npot) {
|
||||
texScaleLevels = texScaleLevelsNPOT;
|
||||
numTexScaleLevels = ARRAY_SIZE(texScaleLevelsNPOT);
|
||||
} else {
|
||||
texScaleLevels = texScaleLevelsPOT;
|
||||
numTexScaleLevels = ARRAY_SIZE(texScaleLevelsPOT);
|
||||
}
|
||||
static const char **texScaleLevels = texScaleLevelsNPOT;
|
||||
static int numTexScaleLevels = ARRAY_SIZE(texScaleLevelsNPOT);
|
||||
PopupMultiChoice *texScalingChoice = graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gr->T("Upscale Level"), texScaleLevels, 0, numTexScaleLevels, gr->GetName(), screenManager()));
|
||||
// TODO: Better check? When it won't work, it scales down anyway.
|
||||
if (!gl_extensions.OES_texture_npot && GetGPUBackend() == GPUBackend::OPENGL) {
|
||||
texScalingChoice->HideChoice(3); // 3x
|
||||
texScalingChoice->HideChoice(5); // 5x
|
||||
}
|
||||
texScalingChoice->SetDisabledPtr(&g_Config.bSoftwareRendering);
|
||||
|
||||
static const char *texScaleAlgos[] = { "xBRZ", "Hybrid", "Bicubic", "Hybrid + Bicubic", };
|
||||
|
Loading…
Reference in New Issue
Block a user