Changed xBRZ UI to have separate off option

This commit is contained in:
Peter Thoman 2013-04-30 12:14:34 +02:00
parent c7c4ec7c3b
commit 6950cfef35
5 changed files with 15 additions and 11 deletions

View File

@ -113,7 +113,7 @@ void Config::Load(const char *iniFileName)
#else
graphics->Get("MipMap", &bMipMap, false);
#endif
graphics->Get("XBRZTexScalingLevel", &iXBRZTexScalingLevel, 0);
graphics->Get("XBRZTexScalingLevel", &iXBRZTexScalingLevel, 1);
IniFile::Section *sound = iniFile.GetOrCreateSection("Sound");
sound->Get("Enable", &bEnableSound, true);

View File

@ -71,7 +71,7 @@ public:
bool bTrueColor;
bool bMipMap;
bool bAnisotropicFiltering;
int iXBRZTexScalingLevel; // 0 = 1 = off, 2 = 2xBRZ, 3 = 3xBRZ, ..., 5 = 5xBRZ
int iXBRZTexScalingLevel; // 1 = off, 2 = 2xBRZ, ..., 5 = 5xBRZ
// Sound
bool bEnableSound;

View File

@ -175,8 +175,8 @@ namespace MainWindow
ResizeDisplay();
}
void toggleXbrzTexScaling(int num) {
g_Config.iXBRZTexScalingLevel = (g_Config.iXBRZTexScalingLevel == num) ? 0 : num;
void setXbrzTexScaling(int num) {
g_Config.iXBRZTexScalingLevel = num;
if(gpu) gpu->InvalidateCache(0,0);
}
@ -500,17 +500,20 @@ namespace MainWindow
g_Config.bMipMap = !g_Config.bMipMap;
break;
case ID_TEXTURESCALING_OFF:
setXbrzTexScaling(1);
break;
case ID_TEXTURESCALING_2XBRZ:
toggleXbrzTexScaling(2);
setXbrzTexScaling(2);
break;
case ID_TEXTURESCALING_3XBRZ:
toggleXbrzTexScaling(3);
setXbrzTexScaling(3);
break;
case ID_TEXTURESCALING_4XBRZ:
toggleXbrzTexScaling(4);
setXbrzTexScaling(4);
break;
case ID_TEXTURESCALING_5XBRZ:
toggleXbrzTexScaling(5);
setXbrzTexScaling(5);
break;
case ID_OPTIONS_BUFFEREDRENDERING:
@ -804,14 +807,15 @@ namespace MainWindow
CheckMenuItem(menu, zoomitems[i], MF_BYCOMMAND | ((i == g_Config.iWindowZoom - 1) ? MF_CHECKED : MF_UNCHECKED));
}
static const int texscalingitems[4] = {
static const int texscalingitems[] = {
ID_TEXTURESCALING_OFF,
ID_TEXTURESCALING_2XBRZ,
ID_TEXTURESCALING_3XBRZ,
ID_TEXTURESCALING_4XBRZ,
ID_TEXTURESCALING_5XBRZ,
};
for (int i = 0; i < 4; i++) {
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iXBRZTexScalingLevel-2) ? MF_CHECKED : MF_UNCHECKED));
for (int i = 0; i < 5; i++) {
CheckMenuItem(menu, texscalingitems[i], MF_BYCOMMAND | ((i == g_Config.iXBRZTexScalingLevel-1) ? MF_CHECKED : MF_UNCHECKED));
}
}

Binary file not shown.

Binary file not shown.