SDL 1.2 -> 2.0 migration

Hi, everyone. I’m currently porting SDL-1.2 game to SDL-2.0. I’ve already
found a useful wiki page:
http://wiki.libsdl.org/moin.cgi/MigrationGuidebut it seems to be far
from perfect :wink: In current codebase I had a
SDL_VideoModeOK() call that checks if provided video mode is supported
before window creation. Can someone help me with SDL-2.0 equivalent for
this missing function?

As a direct replacement, you can probably use SDL_GetClosestDisplayMode and
compare the result and your request to see if they’re the same. More
preferably, you might use SDL_GetNumDisplayModes and SDL_GetDisplayMode to
see what is available without guessing.

Jonny DOn Mon, Feb 25, 2013 at 4:30 PM, Alexey Petruchik < alexey.petruchik at gmail.com> wrote:

Hi, everyone. I’m currently porting SDL-1.2 game to SDL-2.0. I’ve already
found a useful wiki page: http://wiki.libsdl.org/moin.cgi/MigrationGuidebut it seems to be far from perfect :wink: In current codebase I had a
SDL_VideoModeOK() call that checks if provided video mode is supported
before window creation. Can someone help me with SDL-2.0 equivalent for
this missing function?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi, If you want to see some sample code. I made a post about how we
use both 1.2 and 2.0 in our project:

http://forums.libsdl.org/viewtopic.php?t=8112

DOn Mon, Feb 25, 2013 at 3:23 PM, Jonathan Dearborn wrote:

As a direct replacement, you can probably use SDL_GetClosestDisplayMode and
compare the result and your request to see if they’re the same. More
preferably, you might use SDL_GetNumDisplayModes and SDL_GetDisplayMode to
see what is available without guessing.

Jonny D

On Mon, Feb 25, 2013 at 4:30 PM, Alexey Petruchik <alexey.petruchik at gmail.com> wrote:

Hi, everyone. I’m currently porting SDL-1.2 game to SDL-2.0. I’ve already
found a useful wiki page: http://wiki.libsdl.org/moin.cgi/MigrationGuide but
it seems to be far from perfect :wink: In current codebase I had a
SDL_VideoModeOK() call that checks if provided video mode is supported
before window creation. Can someone help me with SDL-2.0 equivalent for this
missing function?


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org