diff --git a/source/graphics.cpp b/source/graphics.cpp index 56fee127..f03f563a 100644 --- a/source/graphics.cpp +++ b/source/graphics.cpp @@ -696,6 +696,7 @@ void Graphics::line (int x1, int y1, int x2, int y2){ void Graphics::_private_h_line(int x1, int x2, int y){ auto &drawState = _memory->drawState; auto &hwState = _memory->hwState; + uint8_t * screenBuffer = GetP8FrameBuffer(); if (!(y >= drawState.clip_yb && y < drawState.clip_ye)) { return; @@ -723,7 +724,7 @@ void Graphics::_private_h_line(int x1, int x2, int y){ if (canmemset) { //zepto 8 adapted otimized line draw with memset - uint8_t *p = _memory->screenBuffer + (y*64); + uint8_t *p = screenBuffer + (y*64); uint8_t color = getDrawPalMappedColor(drawState.color); if (minx & 1)