On Sun, 31 May 2026 19:15:57 +0200 Christian Weisgerber <[email protected]> wrote:
> http://build-failures.rhaalovely.net/amd64/2026-05-30/ [...] > games/wrath ports@ Below is a diff to fix games/wrath. Without it, the code does weird things of trying to determine at runtime if the type is SDL_GameController or SDL_Joystick, while it's compiled to be an SDL_Joystick type. This here nukes the whole SDL_IsGameController() parts which fixes the build. My PS4 gamecontroller is still recognized, though the axis seem weirdly assigned and it's not playable this way, but might just need some customization. Ah and this also updates it to the commit they labeled for release 1.1.2. I've tested this with the latest version of the commercial assets of Wrath: Aeons of Ruin from GOG which is 1.1.2. ok? Index: Makefile =================================================================== RCS file: /cvs/ports/games/wrath/Makefile,v diff -u -p -r1.8 Makefile --- Makefile 25 Dec 2024 08:45:30 -0000 1.8 +++ Makefile 31 May 2026 23:45:38 -0000 @@ -1,10 +1,10 @@ COMMENT = client of wrath-darkplaces engine -DISTNAME = wrath-1.0 +DISTNAME = wrath-1.1.2 GH_ACCOUNT = Official3DRealms GH_PROJECT = wrath-darkplaces -GH_COMMIT = d7a494fbe76f45a84d1df0c7360c0c4848042e45 +GH_COMMIT = f6862f628d6ddc133a9ef67bc4631b6137809772 CATEGORIES = games Index: distinfo =================================================================== RCS file: /cvs/ports/games/wrath/distinfo,v diff -u -p -r1.5 distinfo --- distinfo 1 Mar 2024 23:16:25 -0000 1.5 +++ distinfo 31 May 2026 23:45:38 -0000 @@ -1,2 +1,2 @@ -SHA256 (wrath-1.0-d7a494fb.tar.gz) = gl5B8+tVp0cZN4MEQ/DOJHgVFKM8x5eCy7E03F4ZnU8= -SIZE (wrath-1.0-d7a494fb.tar.gz) = 2710199 +SHA256 (wrath-1.1.2-f6862f62.tar.gz) = xNaQg8y1uF11rGFirHFl98vGSfEzXdgRlbTBdVfHQjs= +SIZE (wrath-1.1.2-f6862f62.tar.gz) = 2710604 Index: patches/patch-makefile_inc =================================================================== RCS file: /cvs/ports/games/wrath/patches/patch-makefile_inc,v diff -u -p -r1.2 patch-makefile_inc --- patches/patch-makefile_inc 11 Mar 2022 19:05:13 -0000 1.2 +++ patches/patch-makefile_inc 31 May 2026 23:45:38 -0000 @@ -1,7 +1,7 @@ Index: makefile.inc --- makefile.inc.orig +++ makefile.inc -@@ -190,7 +190,7 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS) +@@ -191,7 +191,7 @@ OPTIM_DEBUG=$(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O2 -fno-strict-aliasing -fno-math-errno -fno-trapping-math -ffinite-math-only -fno-signaling-nans -fcx-limited-range -funroll-loops $(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O2 -fno-strict-aliasing -funroll-loops $(CPUOPTIMIZATIONS) #OPTIM_RELEASE=-O2 -fno-strict-aliasing $(CPUOPTIMIZATIONS) Index: patches/patch-vid_sdl_c =================================================================== RCS file: patches/patch-vid_sdl_c diff -N patches/patch-vid_sdl_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-vid_sdl_c 31 May 2026 23:45:38 -0000 @@ -0,0 +1,66 @@ +unbreak with llvm22. vid_sdljoystick is considered a Joystick type at +build time, not GameController, so remove the whole dance using +SDL_IsGameConttroller() + +Index: vid_sdl.c +--- vid_sdl.c.orig ++++ vid_sdl.c +@@ -2197,47 +2197,26 @@ void VID_EnableJoystick(qboolean enable) + // close SDL joystick if active + if (vid_sdljoystick) + { +- if (SDL_IsGameController(vid_sdljoystick)) +- SDL_GameControllerClose(vid_sdljoystick); +- else +- SDL_JoystickClose(vid_sdljoystick); ++ SDL_JoystickClose(vid_sdljoystick); + } + vid_sdlcontroller = NULL; + vid_sdljoystick = NULL; + if (sdlindex >= 0) + { +- if (SDL_IsGameController(sdlindex)) ++ vid_sdljoystick = SDL_JoystickOpen(sdlindex); ++ if (vid_sdljoystick) + { +- vid_sdljoystick = SDL_GameControllerOpen(sdlindex); +- vid_sdlcontroller = vid_sdljoystick; +- if (vid_sdljoystick) +- { +- const char *joystickname = SDL_GameControllerName(vid_sdljoystick); +- Con_Printf("GameController %i opened (SDL_GameController %i is \"%s\")\n", index, sdlindex, joystickname); +- } +- else +- { +- Con_Printf("GameController %i failed (SDL_GameControllerOpen(%i) returned: %s)\n", index, sdlindex, SDL_GetError()); +- sdlindex = -1; +- } +- } +- else +- { +- vid_sdljoystick = SDL_JoystickOpen(sdlindex); +- if (vid_sdljoystick) +- { + #if SDL_MAJOR_VERSION == 1 +- const char *joystickname = SDL_JoystickName(sdlindex); ++ const char *joystickname = SDL_JoystickName(sdlindex); + #else +- const char *joystickname = SDL_JoystickName(vid_sdljoystick); ++ const char *joystickname = SDL_JoystickName(vid_sdljoystick); + #endif +- Con_Printf("Joystick %i opened (SDL_Joystick %i is \"%s\" with %i axes, %i buttons, %i balls)\n", index, sdlindex, joystickname, (int)SDL_JoystickNumAxes(vid_sdljoystick), (int)SDL_JoystickNumButtons(vid_sdljoystick), (int)SDL_JoystickNumBalls(vid_sdljoystick)); +- } +- else +- { +- Con_Printf("Joystick %i failed (SDL_JoystickOpen(%i) returned: %s)\n", index, sdlindex, SDL_GetError()); +- sdlindex = -1; +- } ++ Con_Printf("Joystick %i opened (SDL_Joystick %i is \"%s\" with %i axes, %i buttons, %i balls)\n", index, sdlindex, joystickname, (int)SDL_JoystickNumAxes(vid_sdljoystick), (int)SDL_JoystickNumButtons(vid_sdljoystick), (int)SDL_JoystickNumBalls(vid_sdljoystick)); ++ } ++ else ++ { ++ Con_Printf("Joystick %i failed (SDL_JoystickOpen(%i) returned: %s)\n", index, sdlindex, SDL_GetError()); ++ sdlindex = -1; + } + } + }
