Re: [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: Re: [hatari-devel] Suggested patch to fix the SDL GUI on KMS/DRM
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Sun, 1 Nov 2020 10:08:11 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1604221692; bh=Jn+5DmqSI5CivA8OQA/3DONsaCPwhjnjo7m/WwxKEkU=; h=Date:From:To:Subject:From; b=X4zCl6Tpzsmcsefjbu5YHh7E4M+9+a3tnTbaNLyaJsQUXvDiFzSmlJdA9EBV7ceCl jiurG9U82ETKgY590UwbTp2dnUIJjOBmoX8KKg2PJR+Oel0WuyNh+aegnj8xJiX5jw LDnIKLp+B3rVxfAovaoinlTIhhXAXvjLHFlKtU+EuEnUs3aBJkwhjslC4xj2oIXNV4 3TDCpz/WrcLXKUD9CQ0N4H5gyFNY+OpCP5WCWEXDSHVCcqIJm3abPGYA7T/nZaQfLJ /2i8ZNOz+hnAe33SCHoUjDo4j0dXWc4f3RVmhw4LAj7kzVPpmU6UGqLlSX9/vJth26 6HjKoG9474jDA==
Am Sun, 1 Nov 2020 09:50:11 +0100
schrieb Christer Solskogen <christer.solskogen@xxxxxxxxx>:
> On Sun, Nov 1, 2020 at 9:37 AM Thomas Huth <th.huth@xxxxxxxxx> wrote:
>
> > Am Sun, 1 Nov 2020 09:22:29 +0100
> > schrieb Christer Solskogen <christer.solskogen@xxxxxxxxx>:
> >
> > > On Sun, Nov 1, 2020 at 7:17 AM Thomas Huth <th.huth@xxxxxxxxx>
> > > wrote:
> > > > Am Sat, 31 Oct 2020 09:11:08 +0100
> > > > schrieb Nicolas Pomarède <npomarede@xxxxxxxxxxxx>:
> > > >
> > > > I've now added a slightly more complex patch which only calls
> > > > this function if hardware accelerated rendering is used. So
> > > > with software rendering, we can still spare these cycles, and
> > > > with hardware rendering it should not matter too much from a
> > > > performance point of view anyway, so we should be on the safe
> > > > side here now.
> > > >
> > > >
> > > It's still a bit buggy. Pressing the buttons in the menu doesn't
> > > work properly. It seems to me it's missing a redraw or something
> > > like that.
> >
> > Where is it buggy? On the Rasberri Pi? Wayland? Both? Does it work
> > if you change SDL_UpdateRects() to call SDL_RenderClear()
> > unconditionally?
> >
> >
> On the Pi, using SDL2 with KMS/DRM. Not with Wayland.
> I don't quite understand what you mean (I'm not a developer), but if
> you can provide me either a patch or a description on how, I can
> easily test.
Could you please remove the "if (!bIsSoftwareRenderer)" line in
SDL_UpdateRects() in src/screen.c, so that SDL_RenderClear(sdlRenderer)
is always called there:
diff --git a/src/screen.c b/src/screen.c
--- a/src/screen.c
+++ b/src/screen.c
@@ -117,8 +117,7 @@ void SDL_UpdateRects(SDL_Surface *screen, int numrects, SDL_Rect *rects)
{
SDL_UpdateTexture(sdlTexture, NULL, screen->pixels, screen->pitch);
/* Need to clear the renderer context for certain accelerated cards */
- if (!bIsSoftwareRenderer)
- SDL_RenderClear(sdlRenderer);
+ SDL_RenderClear(sdlRenderer);
SDL_RenderCopy(sdlRenderer, sdlTexture, NULL, NULL);
SDL_RenderPresent(sdlRenderer);
}
That would be helpful to see whether the bIsSoftwareRenderer detection
is wrong, or whether there is another problem somewhere else.
Thomas