From cd3a5e1d3f70e32fbe120b010ccbd28b278dd37f Mon Sep 17 00:00:00 2001 From: Daniel Collin Date: Fri, 29 Mar 2024 08:09:12 +0100 Subject: [PATCH] Display correct again --- src/dummy.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dummy.cpp b/src/dummy.cpp index 3273d9a6..7f3b6f0e 100644 --- a/src/dummy.cpp +++ b/src/dummy.cpp @@ -995,9 +995,6 @@ void unlockscr(struct vidbuffer* vb_in, int y_start, int y_end) { uint32_t* pixels = nullptr; int pitch = 0; - int amiga_width = 754; - int amiga_height = 576; - if (SDL_LockTexture(s_texture, NULL, (void**)&pixels, &pitch) == 0) { struct amigadisplay* ad = &adisplays[vb_in->monitor_id]; struct vidbuf_description* avidinfo = &adisplays[vb_in->monitor_id].gfxvidinfo; @@ -1014,7 +1011,7 @@ void unlockscr(struct vidbuffer* vb_in, int y_start, int y_end) { // Change pixels for (int y = 0; y < amiga_height; y++) { - uint8_t* dest = (uint8_t*)&pixels[y * amiga_width]; + uint8_t* dest = (uint8_t*)&pixels[y * 754]; memcpy(dest, sptr, amiga_width * 4); sptr += vb->rowbytes; } @@ -1022,6 +1019,9 @@ void unlockscr(struct vidbuffer* vb_in, int y_start, int y_end) { SDL_UnlockTexture(s_texture); } + int amiga_width = 754; + int amiga_height = 576; + int new_width = 0; int new_height = 0;