vi3itor / GameplayFootball

Football game
Apache License 2.0
91 stars 24 forks source link

Implement SDL2 calls to get available display modes #1

Closed alexhuntley closed 3 years ago

alexhuntley commented 3 years ago

This fixes the display mode selection in the graphical settings on Linux and other non-Windows platforms. Previously there was just a dummy mode, 1280x1024.

In this code I assumed that we want to use display 0. Is there any multi-monitor handling or is this sufficient?

I removed the check for res.bpp == 32 on line 1253, because (on my machine at least) this was removing all the candidate modes, resulting in an empty array.

vi3itor commented 3 years ago

Hey @alexhuntley! Thanks for your contribution! I'll check it out and merge (probably, in a couple of days).