mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge branch 'patch-18' of https://github.com/DanyalZia/ppsspp
Conflicts: Windows/resource.h
This commit is contained in:
commit
a9cd15d165
6 changed files with 28 additions and 10 deletions
|
@ -1437,7 +1437,16 @@ void TextureCache::LoadTextureLevel(TexCacheEntry &entry, int level, bool replac
|
|||
glPixelStorei(GL_UNPACK_ALIGNMENT, texByteAlign);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, texByteAlign);
|
||||
|
||||
int scaleFactor = g_Config.iTexScalingLevel;
|
||||
int scaleFactor;
|
||||
//Auto-texture scale upto 5x rendering resolution
|
||||
if (g_Config.iTexScalingLevel == 0)
|
||||
#ifndef USING_GLES2
|
||||
scaleFactor = std::min(5, g_Config.iInternalResolution);
|
||||
#else
|
||||
scaleFactor = std::min(3, g_Config.iInternalResolution);
|
||||
#endif
|
||||
else
|
||||
scaleFactor = g_Config.iTexScalingLevel;
|
||||
|
||||
// Don't scale the PPGe texture.
|
||||
if (entry.addr > 0x05000000 && entry.addr < 0x08800000)
|
||||
|
|
|
@ -147,11 +147,11 @@ void GameSettingsScreen::CreateViews() {
|
|||
|
||||
graphicsSettings->Add(new ItemHeader(gs->T("Texture Scaling")));
|
||||
#ifndef USING_GLES2
|
||||
static const char *texScaleLevels[] = {"Off", "2x", "3x","4x", "5x"};
|
||||
static const char *texScaleLevels[] = {"Auto", "Off", "2x", "3x","4x", "5x"};
|
||||
#else
|
||||
static const char *texScaleLevels[] = {"Off", "2x", "3x"};
|
||||
static const char *texScaleLevels[] = {"Auto", "Off", "2x", "3x"};
|
||||
#endif
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gs->T("Upscale Level"), texScaleLevels, 1, ARRAY_SIZE(texScaleLevels), gs, screenManager()));
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingLevel, gs->T("Upscale Level"), texScaleLevels, 0, ARRAY_SIZE(texScaleLevels), gs, screenManager()));
|
||||
static const char *texScaleAlgos[] = { "xBRZ", "Hybrid", "Bicubic", "Hybrid + Bicubic", };
|
||||
graphicsSettings->Add(new PopupMultiChoice(&g_Config.iTexScalingType, gs->T("Upscale Type"), texScaleAlgos, 0, ARRAY_SIZE(texScaleAlgos), gs, screenManager()));
|
||||
graphicsSettings->Add(new CheckBox(&g_Config.bTexDeposterize, gs->T("Deposterize")));
|
||||
|
|
|
@ -237,6 +237,9 @@ namespace MainWindow
|
|||
if (++g_Config.iInternalResolution > RESOLUTION_MAX)
|
||||
g_Config.iInternalResolution = 0;
|
||||
}
|
||||
|
||||
if (g_Config.iTexScalingLevel == TEXSCALING_AUTO)
|
||||
setTexScalingMultiplier(0);
|
||||
|
||||
ResizeDisplay(true, true);
|
||||
}
|
||||
|
@ -1226,7 +1229,8 @@ namespace MainWindow
|
|||
if (gpu)
|
||||
gpu->Resized();
|
||||
break;
|
||||
|
||||
|
||||
case ID_TEXTURESCALING_AUTO: setTexScalingMultiplier(TEXSCALING_AUTO); break;
|
||||
case ID_TEXTURESCALING_OFF: setTexScalingMultiplier(TEXSCALING_OFF); break;
|
||||
case ID_TEXTURESCALING_2X: setTexScalingMultiplier(TEXSCALING_2X); break;
|
||||
case ID_TEXTURESCALING_3X: setTexScalingMultiplier(TEXSCALING_3X); break;
|
||||
|
@ -1660,20 +1664,21 @@ namespace MainWindow
|
|||
}
|
||||
|
||||
static const int texscalingitems[] = {
|
||||
ID_TEXTURESCALING_AUTO,
|
||||
ID_TEXTURESCALING_OFF,
|
||||
ID_TEXTURESCALING_2X,
|
||||
ID_TEXTURESCALING_3X,
|
||||
ID_TEXTURESCALING_4X,
|
||||
ID_TEXTURESCALING_5X,
|
||||
};
|
||||
if(g_Config.iTexScalingLevel < TEXSCALING_OFF)
|
||||
g_Config.iTexScalingLevel = TEXSCALING_OFF;
|
||||
if(g_Config.iTexScalingLevel < TEXSCALING_AUTO)
|
||||
g_Config.iTexScalingLevel = TEXSCALING_AUTO;
|
||||
|
||||
else if(g_Config.iTexScalingLevel > TEXSCALING_MAX)
|
||||
g_Config.iTexScalingLevel = TEXSCALING_MAX;
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(texscalingitems); i++) {
|
||||
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iTexScalingLevel - 1) ? MF_CHECKED : MF_UNCHECKED));
|
||||
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iTexScalingLevel) ? MF_CHECKED : MF_UNCHECKED));
|
||||
}
|
||||
|
||||
static const int texscalingtypeitems[] = {
|
||||
|
|
|
@ -39,7 +39,8 @@ namespace MainWindow
|
|||
RESOLUTION_8X = 8,
|
||||
RESOLUTION_9X = 9,
|
||||
RESOLUTION_MAX = 10,
|
||||
|
||||
|
||||
TEXSCALING_AUTO = 0,
|
||||
TEXSCALING_OFF = 1,
|
||||
TEXSCALING_2X = 2,
|
||||
TEXSCALING_3X = 3,
|
||||
|
@ -65,4 +66,5 @@ namespace MainWindow
|
|||
void _ViewFullScreen(HWND hWnd);
|
||||
void _ViewNormal(HWND hWnd);
|
||||
void TranslateMenus();
|
||||
void setTexScalingMultiplier(int level);
|
||||
}
|
||||
|
|
|
@ -473,6 +473,7 @@ BEGIN
|
|||
POPUP "Texture Scaling"
|
||||
BEGIN
|
||||
MENUITEM "Off", ID_TEXTURESCALING_OFF
|
||||
MENUITEM "Auto", ID_TEXTURESCALING_AUTO
|
||||
MENUITEM "&2x", ID_TEXTURESCALING_2X
|
||||
MENUITEM "&3x", ID_TEXTURESCALING_3X
|
||||
MENUITEM "&4x", ID_TEXTURESCALING_4X
|
||||
|
|
|
@ -294,6 +294,7 @@
|
|||
#define IDC_GEDBG_STEPFRAME 40134
|
||||
#define IDC_GEDBG_BREAKTEX 40135
|
||||
#define ID_OPTIONS_PAUSE_FOCUS 40136
|
||||
#define ID_TEXTURESCALING_AUTO 40137
|
||||
|
||||
// Dummy option to let the buffered rendering hotkey cycle through all the options.
|
||||
#define ID_OPTIONS_BUFFEREDRENDERINGDUMMY 40500
|
||||
|
@ -306,7 +307,7 @@
|
|||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 254
|
||||
#define _APS_NEXT_COMMAND_VALUE 40137
|
||||
#define _APS_NEXT_COMMAND_VALUE 40138
|
||||
#define _APS_NEXT_CONTROL_VALUE 1193
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue