From 976b77f14452299c0328daa7e1cbb38f68b272e9 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Sat, 1 Jun 2019 16:46:17 +0200 Subject: [PATCH] gsdx-hw: Use std max for scaling factor, bonus add jak3 crc id for eu preview/us international release. --- plugins/GSdx/GSCrc.cpp | 1 + plugins/GSdx/Renderers/DX11/GSDevice11.cpp | 2 +- plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index d47c5490ee..4005487382 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -454,6 +454,7 @@ CRC::Game CRC::m_games[] = {0x9184AAF1, Jak2, US, 0}, {0x12804727, Jak3, EU, 0}, {0x644CFD03, Jak3, US, 0}, + {0x23F8D35B, Jak3, NoRegion, 0}, // EU Preview, US International {0xDF659E77, JakX, EU, 0}, // Jak X: Combat Racing {0x3091E6FB, JakX, US, 0}, {0x4653CA3E, HarleyDavidson, US, 0}, diff --git a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp index c30d9ba7dc..88ef16130d 100644 --- a/plugins/GSdx/Renderers/DX11/GSDevice11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSDevice11.cpp @@ -289,7 +289,7 @@ bool GSDevice11::Create(const std::shared_ptr &wnd) std::string convert_mstr[1]; - convert_mstr[0] = format("%d", m_upscale_multiplier ? m_upscale_multiplier : 1); + convert_mstr[0] = format("%d", std::max(1, m_upscale_multiplier)); D3D_SHADER_MACRO convert_macro[] = { diff --git a/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp index fa60593938..f89fca0ed5 100644 --- a/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp @@ -388,7 +388,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr &wnd) // Upload once and forget about it. // Use value of 1 when upscale multiplier is 0 for ScalingFactor, // this is to avoid doing math with 0 in shader. It helps custom res be less broken. - m_misc_cb_cache.ScalingFactor = GSVector4i(theApp.GetConfigI("upscale_multiplier") ? theApp.GetConfigI("upscale_multiplier") : 1); + m_misc_cb_cache.ScalingFactor = GSVector4i(std::max(1, theApp.GetConfigI("upscale_multiplier"))); m_convert.cb->cache_upload(&m_misc_cb_cache); theApp.LoadResource(IDR_CONVERT_GLSL, shader);