summaryrefslogtreecommitdiff
path: root/render_sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-xrender_sdl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/render_sdl.c b/render_sdl.c
index ca5cce5..7168752 100755
--- a/render_sdl.c
+++ b/render_sdl.c
@@ -814,6 +814,17 @@ SDL_Joystick *render_get_joystick(int index)
return joysticks[index];
}
+char* render_joystick_type_id(int index)
+{
+ SDL_Joystick *stick = render_get_joystick(index);
+ if (!stick) {
+ return NULL;
+ }
+ char *guid_string = malloc(33);
+ SDL_JoystickGetGUIDString(SDL_JoystickGetGUID(stick), guid_string, 33);
+ return guid_string;
+}
+
SDL_GameController *render_get_controller(int index)
{
if (index >= MAX_JOYSTICKS) {