foxygit / fake-08-xbox360 Log in
commit 4144a75b65778cc0c64cf7a9b051a328e76ba997
Author:     Dimitri Sophinos <dpsophinos@gmail.com>
AuthorDate: Thu Nov 30 09:55:06 2023 -0500
Commit:     Dimitri Sophinos <dpsophinos@gmail.com>
CommitDate: Thu Nov 30 09:55:06 2023 -0500

    add GetP8FrameBuffer to _private_h_line
---
 source/graphics.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/graphics.cpp b/source/graphics.cpp
index 56fee12..f03f563 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)