From de20fc723275fbad67ed904509cb332e639b7709 Mon Sep 17 00:00:00 2001 From: Ploo <239304139+xinitrcn1@users.noreply.github.com> Date: Sat, 25 Apr 2026 10:22:37 +0000 Subject: [PATCH] Update sdlchecks.cmake --- cmake/sdlchecks.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake/sdlchecks.cmake b/cmake/sdlchecks.cmake index ea80e91dfe..6ece834f9b 100644 --- a/cmake/sdlchecks.cmake +++ b/cmake/sdlchecks.cmake @@ -529,7 +529,14 @@ macro(CheckX11) return 0; }" HAVE_XGENERICEVENT) # In OmniOS pkgsrc, XGenericEventCookie is defined, but fails to compile due to unrelated circumstances - if(HAVE_XGENERICEVENT OR ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # thus, if this check fails, it means that OmniOS's outdated X11 is being used + check_c_source_compiles(" + #include + typedef struct XGenericCookie XGenericCookie; + int main(int argc, char **argv) { + return 0; }" HAVE_XGENERICEVENT_TYPEDEF_QUIRK) + + if(HAVE_XGENERICEVENT OR NOT HAVE_XGENERICEVENT_TYPEDEF_QUIRK) set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1) endif()