From aac97a89832fb71872b42f4bf37936d0a5e16c33 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 4 Oct 2018 19:18:15 -0400 Subject: [PATCH] Re-revokes fine scroll on the top two lines when requested. --- Components/9918/9918.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index 5e257adf3..74656d473 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -650,15 +650,17 @@ void Base::draw_sms(int start, int end) { // Shift the output window by the fine scroll amount, and fill in // any border pixels that leaves on the left-hand side. - start -= master_system_.horizontal_scroll & 7; - end -= master_system_.horizontal_scroll & 7; - if(start < 0) { - while(start < end && start < 0) { - *pixel_target_ = master_system_.colour_ram[16 + background_colour_]; - ++pixel_target_; - ++start; + if(row_ >= 16 || !master_system_.horizontal_scroll_lock) { + start -= master_system_.horizontal_scroll & 7; + end -= master_system_.horizontal_scroll & 7; + if(start < 0) { + while(start < end && start < 0) { + *pixel_target_ = master_system_.colour_ram[16 + background_colour_]; + ++pixel_target_; + ++start; + } + if(start == end) return; } - if(start == end) return; } const int shift = start & 7;