SDL: Use the window display index when querying display modes
This commit is contained in:
parent
41798fca5d
commit
60f1fd98aa
6 changed files with 27 additions and 33 deletions
|
@ -140,10 +140,11 @@ OpenGLSdlGraphicsManager::OpenGLSdlGraphicsManager(SdlEventSource *eventSource,
|
|||
|
||||
// Retrieve a list of working fullscreen modes
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
const int numModes = SDL_GetNumDisplayModes(0);
|
||||
const int display = _window->getDisplayIndex();
|
||||
const int numModes = SDL_GetNumDisplayModes(display);
|
||||
for (int i = 0; i < numModes; ++i) {
|
||||
SDL_DisplayMode mode;
|
||||
if (SDL_GetDisplayMode(0, i, &mode)) {
|
||||
if (SDL_GetDisplayMode(display, i, &mode)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue