I want to get rid of the tearing effects I have when
using E-UAE (Amiga emulator) on my arcade monitor.
Hence I’m trying to implement VSync in E-UAEs SDL
graphic routines like it was done for XMAME in the
patch linked below.
http://www.mail-archive.com/xmame at toybox.twisted.org.uk/msg06159.html
Alas, I’m not familiar with SDl programming and I my
attempts to do it just in the above linked example
were not successful. What I did is the following:
I set the flags SDL_DOUBLEBUF and SDL_HWSURFACE before
invoking SDL_SetVideoMode. Furthermore I replaced all
SDL_UpdateRect commands by SDL_Flip and set the
environment variable SDL_videodriver to dga. With
these changes I get an OK looking fullscreen picture
as long as nothing moves, but if something starts to
move the lowest 20% of the screen start to flicker
white and the whole stuff slows down dramatically.
May be the reason is that the original command
SDL_UpdateRect (prSDLScreen, 0, first_line,
current_width, last_line - first_line + 1);
updates only a part of the screen, since I have the
impression that exacly the part below the updated rect
is flickering. However, I have replaced this command
by
SDL_Flip(prSDLScreen);
which does not work. So my question is how to do it
properly, do I have to update the rect by a blit
command before flipping or how can I do it?
Thank you in advance___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de