mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
Add support for integer scale factor for display
This is mainly useful if you want an authentic pixellated look with 1x rendering (or software) and nearest display filter. It'll simply round down the auto-scaled sized to the nearest integer scale factor, configuring exactly which one isn't that interesting since they all are gonna look good. Fixes #17093
This commit is contained in:
@@ -241,14 +241,19 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
|
||||
if (!IsVREnabled()) {
|
||||
auto stretch = new CheckBox(&g_Config.bDisplayStretch, gr->T("Stretch"));
|
||||
stretch->SetDisabledPtr(&g_Config.bDisplayIntegerScale);
|
||||
rightColumn->Add(stretch);
|
||||
|
||||
PopupSliderChoiceFloat *aspectRatio = new PopupSliderChoiceFloat(&g_Config.fDisplayAspectRatio, 0.5f, 2.0f, gr->T("Aspect Ratio"), screenManager());
|
||||
rightColumn->Add(aspectRatio);
|
||||
aspectRatio->SetDisabledPtr(&g_Config.bDisplayStretch);
|
||||
aspectRatio->SetEnabledFunc([]() {
|
||||
return !g_Config.bDisplayStretch && !g_Config.bDisplayIntegerScale;
|
||||
});
|
||||
aspectRatio->SetHasDropShadow(false);
|
||||
aspectRatio->SetLiveUpdate(true);
|
||||
|
||||
rightColumn->Add(new CheckBox(&g_Config.bDisplayIntegerScale, gr->T("Integer scale factor")));
|
||||
|
||||
#if PPSSPP_PLATFORM(ANDROID)
|
||||
// Hide insets option if no insets, or OS too old.
|
||||
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 28 &&
|
||||
@@ -295,8 +300,10 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
leftColumn->Add(new Spacer(24.0f));
|
||||
}
|
||||
|
||||
static const char *bufFilters[] = { "Linear", "Nearest", };
|
||||
leftColumn->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager()));
|
||||
if (!IsVREnabled()) {
|
||||
static const char *bufFilters[] = { "Linear", "Nearest", };
|
||||
leftColumn->Add(new PopupMultiChoice(&g_Config.iBufFilter, gr->T("Screen Scaling Filter"), bufFilters, 1, ARRAY_SIZE(bufFilters), gr->GetName(), screenManager()));
|
||||
}
|
||||
|
||||
Draw::DrawContext *draw = screenManager()->getDrawContext();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user