| 924 | } |
| 925 | |
| 926 | void EngineGL33::ListResolutions(FindArray<ResolutionInfo>& ret) |
| 927 | { |
| 928 | ret.Clear(); |
| 929 | if (_windowed) |
| 930 | return; |
| 931 | |
| 932 | SDL_DisplayID display = _sdlWindow ? SDL_GetDisplayForWindow(_sdlWindow) : SDL_GetPrimaryDisplay(); |
| 933 | if (!display) |
| 934 | return; |
| 935 | |
| 936 | int count = 0; |
| 937 | SDL_DisplayMode** modes = SDL_GetFullscreenDisplayModes(display, &count); |
| 938 | if (!modes) |
| 939 | return; |
| 940 | |
| 941 | for (int i = 0; i < count; i++) |
| 942 | { |
| 943 | ResolutionInfo info; |
| 944 | info.w = modes[i]->w; |
| 945 | info.h = modes[i]->h; |
| 946 | info.bpp = SDL_BITSPERPIXEL(modes[i]->format); |
| 947 | ret.AddUnique(info); |
| 948 | } |
| 949 | SDL_free(modes); |
| 950 | } |
| 951 | |
| 952 | void EngineGL33::ListRefreshRates(FindArray<int>& ret) |
| 953 | { |