From b8abf2df955fcba030e3c35e7924007a55ba2a25 Mon Sep 17 00:00:00 2001 From: Albert Liu <45282415+ggrtk@users.noreply.github.com> Date: Fri, 11 Dec 2020 23:49:52 -0800 Subject: [PATCH] GPU: Don't apply display offsets when not cropping --- src/core/gpu.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/gpu.cpp b/src/core/gpu.cpp index 69af1826c..578d709ae 100644 --- a/src/core/gpu.cpp +++ b/src/core/gpu.cpp @@ -545,10 +545,10 @@ void GPU::UpdateCRTCDisplayParameters() switch (crop_mode) { case DisplayCropMode::None: - cs.horizontal_active_start = static_cast(std::max(0, 487 + g_settings.display_active_start_offset)); - cs.horizontal_active_end = static_cast(std::max(0, 3282 + g_settings.display_active_end_offset)); - cs.vertical_active_start = static_cast(std::max(0, 20 + g_settings.display_line_start_offset)); - cs.vertical_active_end = static_cast(std::max(0, 308 + g_settings.display_line_end_offset)); + cs.horizontal_active_start = 487; + cs.horizontal_active_end = 3282; + cs.vertical_active_start = 20; + cs.vertical_active_end = 308; break; case DisplayCropMode::Overscan: @@ -572,10 +572,10 @@ void GPU::UpdateCRTCDisplayParameters() switch (crop_mode) { case DisplayCropMode::None: - cs.horizontal_active_start = static_cast(std::max(0, 488 + g_settings.display_active_start_offset)); - cs.horizontal_active_end = static_cast(std::max(0, 3288 + g_settings.display_active_end_offset)); - cs.vertical_active_start = static_cast(std::max(0, 16 + g_settings.display_line_start_offset)); - cs.vertical_active_end = static_cast(std::max(0, 256 + g_settings.display_line_end_offset)); + cs.horizontal_active_start = 488; + cs.horizontal_active_end = 3288; + cs.vertical_active_start = 16; + cs.vertical_active_end = 256; break; case DisplayCropMode::Overscan: