[hatari-devel] Suggested patch to fix the SDL GUI on KMS/DRM

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

while discussing an issue with the Tandy TRS-80 emulator SDL2TRS in the
RetroPie-Forum (1) regarding KMS/DRM with SDL2 on the Raspberry Pi 4
and Wayland, it turns out that the patch also fixes it for Hatari ...

(1) https://retropie.org.uk/forum/topic/28238/sdltrs-display-of-typed-characters-lags-keyboard-sometimes-permanently-by-one-character/31
diff --git a/src/screen.c b/src/screen.c
index a741d1a3..daec1b28 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -115,6 +115,7 @@ void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects)
        if (bUseSdlRenderer)
        {
                SDL_UpdateTexture(sdlTexture, NULL, screen->pixels, screen->pitch);
+               SDL_RenderClear(sdlRenderer);
                SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
                SDL_RenderPresent(sdlRenderer);
        }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/