[uae] Re: Forget that sdlgfx.patch

  • From: Jens Weichert <nexusle@xxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Mon, 7 Aug 2006 19:21:15 +0200


Am 07.08.2006 um 18:34 schrieb Jochen Becher:

Hi,

I wonder why that patch helped me and Jens with our speed problems with
sdl gfx.


First at all the patch contains 2 bugs; one minor and one critical. The
minor bug is the wrong calculation of the maximum number of update
rectangles on picasso screens: in theory screen height/2+1 rectangles
may be needed but the patch only reserves memory for screen height / 2
rectangles.


The critical bug simply is that I forgot to delete one source line when
I changed the source that it should not longer calloc/free the memory
with every screen update. The calloc'd memory is still freed at the end.
The next screen update writes into illegal memory.


Why didn't uae fail immediatly with that patch at my and Jens' machines?
It seems that the free'd memory stayed accessible by uae.


I fixed those bugs but now I have another problem: The patch simply does
not increase the sdl speed on my machine any longer. Don't know why.


I switch to sdl 1.2.11 which is fast enough and will not longer hunt
this sdl problem.

Jens: If you want to try the correct patch feel free to do so. I
attached it. But you must apply it to the original source of sdlgfx.c
not the already patched source.

I get this message:

"Reversed (or previously applied) patch detected!  Assume -R? [n]"

is this normal?


Riachard: If you want to apply that patch to the official source tree then please check that I didn't make other stupid errors. The patch should at least help a little bit with speed of sdl driver because sdl implements SDL_UpdateRect() via call of SDL_UpdateRects().

Regards, Jochen

<sdlgfx.patch>


Other related posts: