From b603120bb5d4ebaaebd1d423507a0728b502e1f2 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 29 May 2023 18:56:02 +0300
Subject: [PATCH] avoid type redefinition errors.
---
src/sdl2_compat.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index ab07005..58d6ddd 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -1085,7 +1085,7 @@ typedef struct EventFilterWrapperData
/* SDL3 added a bus_type field we need to workaround. */
-typedef struct SDL2_hid_device_info
+struct SDL2_hid_device_info
{
char *path;
unsigned short vendor_id;
@@ -1101,7 +1101,7 @@ typedef struct SDL2_hid_device_info
int interface_subclass;
int interface_protocol;
struct SDL2_hid_device_info *next;
-} SDL2_hid_device_info;
+};
@@ -4666,12 +4666,6 @@ SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
SDL3_SetWindowMaximumSize(window, max_w, max_h);
}
-DECLSPEC void SDLCALL
-SDL_hid_close(SDL_hid_device * dev)
-{
- SDL3_hid_close(dev);
-}
-
DECLSPEC void SDLCALL
SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)
{
@@ -5593,6 +5587,11 @@ SDL_hid_open_path(const char *path, int bExclusive)
return SDL3_hid_open_path(path);
}
+DECLSPEC void SDLCALL
+SDL_hid_close(SDL_hid_device * dev)
+{
+ SDL3_hid_close(dev);
+}
DECLSPEC void SDLCALL
SDL_hid_free_enumeration(SDL2_hid_device_info *devs)