| 97 | } |
| 98 | |
| 99 | static uint32_t getDisplayIndex(SDL_DisplayID displayId) |
| 100 | { |
| 101 | int32_t numDisplays = 0; |
| 102 | auto displayIds = SDL_GetDisplays(&numDisplays); |
| 103 | if (displayIds == nullptr || numDisplays <= 0) |
| 104 | { |
| 105 | return 0; |
| 106 | } |
| 107 | |
| 108 | uint32_t displayIndex = 0; |
| 109 | for (int32_t i = 0; i < numDisplays; i++) |
| 110 | { |
| 111 | if (displayIds[i] == displayId) |
| 112 | { |
| 113 | displayIndex = i; |
| 114 | break; |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | SDL_free(displayIds); |
| 119 | return displayIndex; |
| 120 | } |
| 121 | |
| 122 | static Config::Resolution getSaneWindowedResolution(uint32_t displayIndex, Config::Resolution preferredResolution) |
| 123 | { |
no outgoing calls
no test coverage detected