gsdx: custom resolution - use 0 instead of 9

This commit is contained in:
Avi Halachmi (:avih) 2015-09-21 23:26:00 +03:00
parent 4208267966
commit 3f81fc98dd
4 changed files with 13 additions and 13 deletions

View File

@ -35,7 +35,7 @@ GSRendererHW::GSRendererHW(GSTextureCache* tc)
m_userhacks_align_sprite_X = !!theApp.GetConfig("UserHacks_align_sprite_X", 0) && !!theApp.GetConfig("UserHacks", 0);
m_userhacks_round_sprite_offset = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_round_sprite_offset", 0) : 0;
if (m_upscale_multiplier == 9) { //Custom Resolution
if (!m_upscale_multiplier) { //Custom Resolution
m_width = theApp.GetConfig("resx", m_width);
m_height = theApp.GetConfig("resy", m_height);
}
@ -53,8 +53,8 @@ void GSRendererHW::SetScaling()
//Only increase the buffer size, don't make it smaller, it breaks games (GH3)
// Also don't change the size for custom resolution (m_upscale_multiplier = 9).
if (m_upscale_multiplier != 9 && m_width < (m_buffer_size * m_upscale_multiplier)) {
// Also don't change the size for custom resolution (m_upscale_multiplier = 0).
if (m_upscale_multiplier && m_width < (m_buffer_size * m_upscale_multiplier)) {
m_tc->RemovePartial();
} else {
return;
@ -96,8 +96,8 @@ bool GSRendererHW::CanUpscale()
int GSRendererHW::GetUpscaleMultiplier()
{
// Custom resolution (currently 9) needs an upscale multiplier of 1.
return m_upscale_multiplier != 9? m_upscale_multiplier: 1;
// Custom resolution (currently 0) needs an upscale multiplier of 1.
return m_upscale_multiplier ? m_upscale_multiplier : 1;
}
void GSRendererHW::Reset()

View File

@ -362,11 +362,11 @@ void GSSettingsDlg::UpdateControls()
{
INT_PTR i;
int scaling = 1; // in case reading the combo doesn't work, enable the custom res control anyway
int integer_scaling = 0; // in case reading the combo doesn't work, enable the custom res control anyway
if(ComboBoxGetSelData(IDC_UPSCALE_MULTIPLIER, i))
{
scaling = (int)i;
integer_scaling = (int)i;
}
if(ComboBoxGetSelData(IDC_RENDERER, i))
@ -394,10 +394,10 @@ void GSSettingsDlg::UpdateControls()
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_CRC_LEVEL_TEXT), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_OPENCL_DEVICE), ocl);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && scaling == 9);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && scaling == 9);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && scaling == 9);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY_EDIT), hw && scaling == 9);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESX_EDIT), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_RESY_EDIT), hw && !integer_scaling);
EnableWindow(GetDlgItem(m_hWnd, IDC_UPSCALE_MULTIPLIER), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_FILTER), hw);
EnableWindow(GetDlgItem(m_hWnd, IDC_PALTEX), hw);

View File

@ -46,7 +46,7 @@ GSState::GSState()
, m_frameskip(0)
, m_crcinited(false)
{
m_nativeres = theApp.GetConfig("upscale_multiplier",1)==1;
m_nativeres = theApp.GetConfig("upscale_multiplier",1) == 1;
m_mipmap = !!theApp.GetConfig("mipmap", 1);
s_n = 0;

View File

@ -162,7 +162,7 @@ GSdxApp::GSdxApp()
m_gs_upscale_multiplier.push_back(GSSetting(5, "5x Native", ""));
m_gs_upscale_multiplier.push_back(GSSetting(6, "6x Native", ""));
m_gs_upscale_multiplier.push_back(GSSetting(8, "8x Native", ""));
m_gs_upscale_multiplier.push_back(GSSetting(9, "Custom", ""));
m_gs_upscale_multiplier.push_back(GSSetting(0, "Custom", ""));
m_gs_max_anisotropy.push_back(GSSetting(0, "Off", ""));
m_gs_max_anisotropy.push_back(GSSetting(2, "2x", ""));