Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
54 user(s) are online (50 user(s) are browsing Forums)

Members: 0
Guests: 54

more...
Support us!
Recent OS4 Files
OS4Depot.net
Report message:*
 

Re: SDL1 open issues

Subject: Re: SDL1 open issues
by kas1e on 2019/1/31 18:22:02

@Capehill
Have another question, related to SDL1/SDL2 differences.

For SDL1 to get list of screenmodes we use something like:

SDL_ListModes();

Now, for SDL2, we use something like this (to have analogue):

SDL_GetNumDisplayModes() + SDL_GetDisplayMode()

Question now is:

For SDL1 return of screenmodes is sorted by height. For SDL2 return of screenmodes is sorted by width. I.e. when i do printf for what i have in return, then for SDL1 i have:


more_num: 0, w = 1920, h = 1200
more_num: 1, w = 1600, h = 1200
more_num: 2, w = 1920, h = 1080
more_num: 3, w = 1440, h = 900
more_num: 4, w = 1024, h = 768
more_num: 5, w = 1280, h = 720



And for SDL2:

more_num: 0, w = 1920, h = 1200
more_num: 1, w = 1920, h = 1080
more_num: 2, w = 1600, h = 1200
more_num: 3, w = 1440, h = 900
more_num: 4, w = 1280, h = 720
more_num: 5, w = 1024, h = 768


See for SDL1 order of screenmodes is sorted by height, while for SDL2 buffer of screenmodes is sorted by width.

I checked win32 version of the same code, and there SDL1 sort the output the same as in SDL2 : by width.

So, if i understand right, it is bug in SDL1 , right ?
Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project