SDL, Windows, and Vsync or double buffering in emulators

Announce new emulators, discuss which games run best under each emulator, and much much more.

Moderator: General Mods

Post Reply
vanfanel
Rookie
Posts: 34
Joined: Mon Mar 02, 2009 4:59 pm

SDL, Windows, and Vsync or double buffering in emulators

Post by vanfanel »

hello there

Even if DirectX is the way to go for Windows app, some emulator programmers choose sdl nowadays as an abstraction layer on a higher level for their emus, improving portability.
The problem is that SDL relies on DirectX, or GDI, or whatever you configure it for... It can be done in compile-time, and there are enviroment variables to set default render API... All in all, very confusing.

I have compiled my own version in Linux, with DirecfFB support, wich supports double buffer. It works fine if I set the video enviroment variable to directfb, but most good emulators are for Windows.

So let's fix the OS: let's say I am on WindowsXP. Do you guys know how to configure it in order to force a double buffer in every application using SDL?
Spanish third republic NOW!
AamirM
Regen Developer
Regen Developer
Posts: 533
Joined: Sun Feb 17, 2008 8:01 am
Contact:

Post by AamirM »

No, there is no global setting to force double buffering in all applications using SDL (if thats what you meant).

If your favourite emu doesn't have double buffering support, you'll have to add it yourself or ask the developer to add it.
creaothceann
Seen it all
Posts: 2302
Joined: Mon Jan 03, 2005 5:04 pm
Location: Germany
Contact:

Post by creaothceann »

My Nvidia control panel lets me configure vertical synchronization to be on, off or selectable by applications.

That should at least work with SDL apps using DirectX and maybe OpenGL (not tested).
vSNES | Delphi 10 BPLs
bsnes launcher with recent files list
vanfanel
Rookie
Posts: 34
Joined: Mon Mar 02, 2009 4:59 pm

Post by vanfanel »

NVidia is always a step ahead when it comes to graphics controllers: it's Linux controllers are INCREDIBLE (insecure, yeah, I don'y run a server so I don't give a f**k about my desktop security).

Have you tried it with SDL?? doe sit work for every SDL app using DirectX??
Spanish third republic NOW!
Mednafen
Rookie
Posts: 10
Joined: Fri Jan 09, 2009 6:02 am

Post by Mednafen »

Be warned, some emulators may malfunction if you force their video refreshes to be synchronized to vertical blank/retrace at 60Hz and they were not designed for it.

Out of curiosity, what emulator(s) are you referring to?
vanfanel
Rookie
Posts: 34
Joined: Mon Mar 02, 2009 4:59 pm

Post by vanfanel »

I was thinking about 68k macintosh emulators, not Mednafen.
The best emulators around (SnesGT, KEGA Fusion, WinUAE, Nestopia, MAME...) don't depend on SDL and it's tearing windows implementation. That's lucky...
Spanish third republic NOW!
AamirM
Regen Developer
Regen Developer
Posts: 533
Joined: Sun Feb 17, 2008 8:01 am
Contact:

Post by AamirM »

Your best option is to ask the developer(s) of the emu to add support for vsync.
Post Reply