Merge pull request #1647 from raven02/patch-3

Add Hybrid option for Texture Scaling
This commit is contained in:
Henrik Rydgård committed 2013-05-03 05:26:55 -07:00
commit 831681110d
1 file changed
+14 -10
+14 -10
View File
@@ -1,4 +1,4 @@
// Copyright (c) 2012- PPSSPP Project.
// Copyright (c) 2012- PPSSPP Project.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -410,9 +410,8 @@ void PauseScreen::render() {
I18NCategory *gs = GetI18NCategory("Graphics");
I18NCategory *a = GetI18NCategory("Audio");
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Sound"), ALIGN_TOPLEFT, &g_Config.bEnableSound);
UICheckBox(GEN_ID, x, y += stride, ss->T("Show FPS"), ALIGN_TOPLEFT, &g_Config.bShowFPSCounter);
UICheckBox(GEN_ID, x, y += stride, a->T("Enable Sound"), ALIGN_TOPLEFT, &g_Config.bEnableSound);
// TODO: Maybe shouldn't show this if the screen ratios are very close...
UICheckBox(GEN_ID, x, y += stride, gs->T("Stretch to Display"), ALIGN_TOPLEFT, &g_Config.bStretchToDisplay);
@@ -421,15 +420,15 @@ void PauseScreen::render() {
if (gpu)
gpu->Resized();
}
UICheckBox(GEN_ID, x, y += stride, gs->T("Media Engine"), ALIGN_TOPLEFT, &g_Config.bUseMediaEngine);
bool enableFrameSkip = g_Config.iFrameSkip != 0;
UICheckBox(GEN_ID, x, y += stride, gs->T("Frame Skipping"), ALIGN_TOPLEFT, &enableFrameSkip);
if (enableFrameSkip) {
if (g_Config.iFrameSkip == 0)
g_Config.iFrameSkip = 3;
ui_draw2d.DrawText(UBUNTU24, gs->T("Frames :"), x + 60, y += stride + 10, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 250 , y + 5, 20);
ui_draw2d.DrawText(UBUNTU24, gs->T("Frames :"), x + 60, y += stride, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 200 , y + 5, 20);
if (UIButton(GEN_ID, hlinear1, 80, 0, "Auto", ALIGN_LEFT))
g_Config.iFrameSkip = 3;
if (UIButton(GEN_ID, hlinear1, 30, 0, "1", ALIGN_LEFT))
@@ -440,7 +439,6 @@ void PauseScreen::render() {
else {
g_Config.iFrameSkip = 0;
}
UICheckBox(GEN_ID, x, y += stride, gs->T("Media Engine"), ALIGN_TOPLEFT, &g_Config.bUseMediaEngine);
I18NCategory *i = GetI18NCategory("Pause");
@@ -742,7 +740,7 @@ void GraphicsScreenP2::render() {
if (g_Config.iAnisotropyLevel == 0)
g_Config.iAnisotropyLevel = 2;
ui_draw2d.DrawText(UBUNTU24, gs->T("Level :"), x + 60, y += stride + 10, 0xFFFFFFFF, ALIGN_LEFT);
ui_draw2d.DrawText(UBUNTU24, gs->T("Level :"), x + 60, y += stride, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 160 , y + 5, 20);
if (UIButton(GEN_ID, hlinear1, 45, 0, "2x", ALIGN_LEFT))
g_Config.iAnisotropyLevel = 2;
@@ -757,17 +755,23 @@ void GraphicsScreenP2::render() {
}
bool TexScaling = g_Config.iTexScalingLevel > 1;
UICheckBox(GEN_ID, x, y += stride, gs->T("xBRZ Texture Scaling"), ALIGN_TOPLEFT, &TexScaling);
UICheckBox(GEN_ID, x, y += stride + 20, gs->T("xBRZ Texture Scaling"), ALIGN_TOPLEFT, &TexScaling);
if (TexScaling) {
if (g_Config.iTexScalingLevel <= 1)
g_Config.iTexScalingLevel = 2;
ui_draw2d.DrawText(UBUNTU24, gs->T("Level :"), x + 60, y += stride + 10, 0xFFFFFFFF, ALIGN_LEFT);
ui_draw2d.DrawText(UBUNTU24, gs->T("Level :"), x + 60, y += stride, 0xFFFFFFFF, ALIGN_LEFT);
HLinear hlinear1(x + 160 , y + 5, 20);
if (UIButton(GEN_ID, hlinear1, 45, 0, "2x", ALIGN_LEFT))
g_Config.iTexScalingLevel = 2;
if (UIButton(GEN_ID, hlinear1, 45, 0, "3x", ALIGN_LEFT))
g_Config.iTexScalingLevel = 3;
HLinear hlinear2(x + 160 , y + 75, 20);
ui_draw2d.DrawText(UBUNTU24, gs->T("Type :"), x + 60, y += stride + 25, 0xFFFFFFFF, ALIGN_LEFT);
if (UIButton(GEN_ID, hlinear2, 90, 0, "xBRZ", ALIGN_LEFT))
g_Config.iTexScalingType = 0;
if (UIButton(GEN_ID, hlinear2, 100, 0, "Hybrid", ALIGN_LEFT))
g_Config.iTexScalingType = 1;
} else {
g_Config.iTexScalingLevel = 1;
}