[hatari-devel] Suggested patch to fix the SDL GUI on KMS/DRM |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: [hatari-devel] Suggested patch to fix the SDL GUI on KMS/DRM
- From: Jens Guenther <dbotw@xxxxxxx>
- Date: Sat, 31 Oct 2020 07:55:28 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1604127329; bh=TfK5zxQo9L2XZbI6kutCBmI7O1jMmLHJ+XoOAT1mhFc=; h=X-UI-Sender-Class:Date:From:To:Subject; b=Zc6YixNLJ0HOFsDEYbhc3DGV75FRfn1A0iGcewztx8W5e8SJUpA71JoFbGIgxJGnV szdUZDcO2UtgwHmEo5t8kIleEMBFvJ1ml2liAvy54qRCl14szUu26BU2LxZCKEIjSz 1rYC1sW1NvlhoybVRyd2fbLi+w0CxVtpDTKlU03E=
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);
}