From a0052b7b9a3e0f525550458f908c53b965dd8e86 Mon Sep 17 00:00:00 2001 From: joevt Date: Mon, 19 Feb 2024 21:18:44 -0800 Subject: [PATCH] appleramdac: Use local variable during loop. --- devices/video/appleramdac.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/video/appleramdac.cpp b/devices/video/appleramdac.cpp index 4bc9d43..dda9b38 100644 --- a/devices/video/appleramdac.cpp +++ b/devices/video/appleramdac.cpp @@ -234,6 +234,7 @@ void AppleRamdac::draw_hw_cursor(uint8_t *src_buf, uint8_t *dst_buf, int dst_pit uint8_t *src_row = src_buf + this->fb_pitch * this->cursor_ypos; uint8_t *dst_row = dst_buf + this->cursor_ypos * dst_pitch + this->cursor_xpos * sizeof(uint32_t); + int src_pitch = this->fb_pitch; uint32_t *color = &this->cursor_clut[0]; @@ -255,7 +256,7 @@ void AppleRamdac::draw_hw_cursor(uint8_t *src_buf, uint8_t *dst_buf, int dst_pit } dst_16 += 16 * sizeof(uint32_t); } - src_row += this->fb_pitch; + src_row += src_pitch; dst_row += dst_pitch; } }