[client,sdl] fix sdl3 SDL_GetDisplayBounds checks

Fix #10813, return value changed to bool, so fix checks meant for SDL2
This commit is contained in:
akallabeth 2024-11-03 21:17:14 +01:00
parent 63121583eb
commit f1877d15d4
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5

View File

@ -68,10 +68,10 @@ int sdl_list_monitors(SdlContext* sdl)
{
SDL_Rect rect = {};
auto id = ids[i];
const int brc = SDL_GetDisplayBounds(id, &rect);
const auto brc = SDL_GetDisplayBounds(id, &rect);
const char* name = SDL_GetDisplayName(id);
if (brc != 0)
if (!brc)
continue;
printf(" %s [%u] [%s] %dx%d\t+%d+%d\n", (i == 0) ? "*" : " ", id, name, rect.w, rect.h,
rect.x, rect.y);