From 3f81fc98ddcbda863c6ffe58028ae9f98cfa44e1 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Mon, 21 Sep 2015 23:26:00 +0300 Subject: [PATCH] gsdx: custom resolution - use 0 instead of 9 --- plugins/GSdx/GSRendererHW.cpp | 10 +++++----- plugins/GSdx/GSSettingsDlg.cpp | 12 ++++++------ plugins/GSdx/GSState.cpp | 2 +- plugins/GSdx/GSdx.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index e70bfa1098..4fcbfab781 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -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() diff --git a/plugins/GSdx/GSSettingsDlg.cpp b/plugins/GSdx/GSSettingsDlg.cpp index 9d501c26b5..7c8fcc775e 100644 --- a/plugins/GSdx/GSSettingsDlg.cpp +++ b/plugins/GSdx/GSSettingsDlg.cpp @@ -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); diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index fa8cbed3ea..99af3c3568 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -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; diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index aa8aed8ad0..c744aeff51 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -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", ""));