From 35a4dd0e48a82d90157e92c49dc87202a31d4c1c Mon Sep 17 00:00:00 2001 From: JohnnyonFlame Date: Tue, 8 Aug 2023 23:40:52 -0300 Subject: [PATCH 7/7] Support building without hacky libmali headers. --- src/video/kmsdrm/SDL_kmsdrmmouse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/video/kmsdrm/SDL_kmsdrmmouse.c b/src/video/kmsdrm/SDL_kmsdrmmouse.c index 5dcaaaab6..fe17964a9 100644 --- a/src/video/kmsdrm/SDL_kmsdrmmouse.c +++ b/src/video/kmsdrm/SDL_kmsdrmmouse.c @@ -109,6 +109,13 @@ void KMSDRM_CreateCursorBO(SDL_VideoDisplay *display) dispdata->cursor_w, dispdata->cursor_h, GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE | GBM_BO_USE_LINEAR); + // GBM_BO_USE_LINEAR not supported on mali... retry when this fails. + if (!dispdata->cursor_bo) { + dispdata->cursor_bo = KMSDRM_gbm_bo_create(viddata->gbm_dev, + dispdata->cursor_w, dispdata->cursor_h, + GBM_FORMAT_ARGB8888, GBM_BO_USE_CURSOR | GBM_BO_USE_WRITE); + } + if (!dispdata->cursor_bo) { SDL_SetError("Could not create GBM cursor BO"); return; -- 2.20.1