File build_fix.patch of Package wrath-darkplaces

--- wrath-darkplaces/menu.c	2025-04-24 08:30:19.098917779 +0200
+++ wrath-darkplaces-patched/menu.c	2025-04-24 08:51:30.086972439 +0200
@@ -5058,7 +5058,7 @@ void M_KeyEvent (int key, int ascii, qbo
 	}
 }
 
-static int M_InputEvent (int type, int key, int ascii)
+static int M_InputEvent (int type, float key, float ascii)
 {
 	return false;
 }
--- wrath-darkplaces/mvm_cmds.c	2025-04-24 08:30:19.106066488 +0200
+++ wrath-darkplaces-patched/mvm_cmds.c	2025-04-24 08:58:55.062846784 +0200
@@ -4,6 +4,7 @@
 #include "clvm_cmds.h"
 #include "menu.h"
 #include "csprogs.h"
+#include "cl_steam.h"
 
 // TODO check which strings really should be engine strings
 
--- wrath-darkplaces/vid_sdl.c	2025-04-24 08:30:19.133591626 +0200
+++ wrath-darkplaces-patched/vid_sdl.c	2025-04-24 09:27:09.366132043 +0200
@@ -2197,10 +2197,7 @@ 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;
@@ -2208,11 +2205,10 @@ void VID_EnableJoystick(qboolean enable)
 		{
 			if (SDL_IsGameController(sdlindex))
 			{
-				vid_sdljoystick = SDL_GameControllerOpen(sdlindex);
-				vid_sdlcontroller = vid_sdljoystick;
-				if (vid_sdljoystick)
+				vid_sdlcontroller = SDL_GameControllerOpen(sdlindex);
+				if (vid_sdlcontroller)
 				{
-					const char *joystickname = SDL_GameControllerName(vid_sdljoystick);
+					const char *joystickname = SDL_GameControllerName(vid_sdlcontroller);
 					Con_Printf("GameController %i opened (SDL_GameController %i is \"%s\")\n", index, sdlindex, joystickname);
 				}
 				else
openSUSE Build Service is sponsored by