| 950 | } |
| 951 | |
| 952 | void EngineGL33::ListRefreshRates(FindArray<int>& ret) |
| 953 | { |
| 954 | ret.Clear(); |
| 955 | if (_windowed) |
| 956 | { |
| 957 | ret.Add(0); |
| 958 | return; |
| 959 | } |
| 960 | |
| 961 | SDL_DisplayID display = _sdlWindow ? SDL_GetDisplayForWindow(_sdlWindow) : SDL_GetPrimaryDisplay(); |
| 962 | if (!display) |
| 963 | return; |
| 964 | |
| 965 | int count = 0; |
| 966 | SDL_DisplayMode** modes = SDL_GetFullscreenDisplayModes(display, &count); |
| 967 | if (!modes) |
| 968 | return; |
| 969 | |
| 970 | for (int i = 0; i < count; i++) |
| 971 | { |
| 972 | if (modes[i]->w == Width() && modes[i]->h == Height()) |
| 973 | { |
| 974 | int hz = static_cast<int>(modes[i]->refresh_rate); |
| 975 | ret.AddUnique(hz); |
| 976 | } |
| 977 | } |
| 978 | SDL_free(modes); |
| 979 | } |
| 980 | |
| 981 | void EngineGL33::DestroySurfaces() |
| 982 | { |