From f1877d15d448600ac735363a63c857410c9de31c Mon Sep 17 00:00:00 2001 From: akallabeth Date: Sun, 3 Nov 2024 21:17:14 +0100 Subject: [PATCH] [client,sdl] fix sdl3 SDL_GetDisplayBounds checks Fix #10813, return value changed to bool, so fix checks meant for SDL2 --- client/SDL/SDL3/sdl_monitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/SDL/SDL3/sdl_monitor.cpp b/client/SDL/SDL3/sdl_monitor.cpp index 6b6342669..469cf998c 100644 --- a/client/SDL/SDL3/sdl_monitor.cpp +++ b/client/SDL/SDL3/sdl_monitor.cpp @@ -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);