[uae] Re: SDL and Vsync

  • From: fari mueller <farimueller@xxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Fri, 3 Feb 2006 21:21:09 +0100 (CET)

I replaced both updaterect commands by
SDL_Flip(prSDLScreen) (I left those Picasso commands
untouched) but I still get jerky pictures. Alas, I
don't understand enough of the video stuff to fix it
myself. May be I'll try to ask the guys at the SDL
mailing list after my holiday :-) but of course it
would be great if you could take a look on it also.

--- fari mueller <farimueller@xxxxxxxx> schrieb:

> > The problem, though, is that even in DGA mode most
> X
> > drivers don't implement 
> > syncing with the vertical retrace, so tearing will
> > still occur.
> 
> From what I read in the SDL mailing list I think
> this
> depends on whether you get a hardware surface or
> not.
> I read that nowadays most videodrivers should
> support
> it when dga is used, but it will not work with the
> default x11 videodriver, so one has to change
> SDL_VIDEODRIVER to dga. Then SDL will activate
> SDL_HWSURFACE automatically if SDL_DOUBLEBUF is
> requested. Under these preconditions the use of
> SDL_Flip instead of updaterect(s) will wait for the
> vertical retrace to switch the videobuffers.
> In the link I sent in my previous posting you can
> see
> that this guys has done exactly the same thing to
> make
> vsync work in Xmame using dga as videodriver for
> SDL.
> My current problem is to understand what's going on
> in
> EUAE's sdlgfx.c. Yesterday I modified it and added
> the
> SDL_DOUBLEBUF flag to uiSDLVidModFlags before
> SDL_SetVideoMode is called. Alas I wasn't quite sure
> what to do with SDL_Flip so I added it to
> sdl_flush_block_nolock after SDL_UpdateRect which
> resulted is some frantic flickering of the lowermost
> 20% of my screen. In the meanwhile I think that I
> have
> to replace the SDL_UpdateRect by
> SDL_Flip(prSDLScreen). I'll try it this evening. I'm
> still not sure what to do with the other
> UpdateRect(s), as far as I can see they're for
> Picasse
> emulation only one is for erasing the screen,
> probably
> I have to replace them also by
> SDL_Flip(prSDLScreen).
> I'll play around a bit and keep you informed. May be
> you don't have to bother with OpenGL renderering to
> implement VSync after all - if the XMame guys could
> do
> it with some minor changes it should also be
> possible
> in E-UAE.
> 




        

        
                
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Other related posts: