From 21668dc941a6a34fc7d15fd33f2b4e6293206750 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Wed, 16 Oct 2024 11:41:15 +0200 Subject: [PATCH] [client,sdl] fix sdl3 warnings --- client/SDL/SDL3/sdl_clip.cpp | 2 +- client/SDL/SDL3/sdl_monitor.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/SDL/SDL3/sdl_clip.cpp b/client/SDL/SDL3/sdl_clip.cpp index f10b9107b..0ac423ae0 100644 --- a/client/SDL/SDL3/sdl_clip.cpp +++ b/client/SDL/SDL3/sdl_clip.cpp @@ -242,7 +242,7 @@ UINT sdlClip::MonitorReady(CliprdrClientContext* context, const CLIPRDR_MONITOR_ return ret; clipboard->_sync = true; - SDL_ClipboardEvent ev = { SDL_EVENT_CLIPBOARD_UPDATE, 0, 0, false, NULL, 0 }; + SDL_ClipboardEvent ev = { SDL_EVENT_CLIPBOARD_UPDATE, 0, 0, false, 0, nullptr }; if (!clipboard->handle_update(ev)) return ERROR_INTERNAL_ERROR; diff --git a/client/SDL/SDL3/sdl_monitor.cpp b/client/SDL/SDL3/sdl_monitor.cpp index d91be891f..adba22fe7 100644 --- a/client/SDL/SDL3/sdl_monitor.cpp +++ b/client/SDL/SDL3/sdl_monitor.cpp @@ -207,7 +207,7 @@ static BOOL sdl_apply_display_properties(SdlContext* sdl) float vdpi = dpi; SDL_Rect rect = {}; - if (SDL_GetDisplayBounds(*id, &rect) < 0) + if (!SDL_GetDisplayBounds(*id, &rect)) return FALSE; WINPR_ASSERT(rect.w > 0);