Added functions to get the platform dependent name for a joystick or game controller

This commit is contained in:
Sam Lantinga 2022-04-26 14:54:14 -07:00
parent b293888c7d
commit e551384a99
28 changed files with 306 additions and 26 deletions

View file

@ -28,7 +28,6 @@
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"
extern SDL_JoystickDriver SDL_VIRTUAL_JoystickDriver;
static joystick_hwdata * g_VJoys = NULL;
@ -275,6 +274,13 @@ VIRTUAL_JoystickGetDeviceName(int device_index)
}
static const char *
VIRTUAL_JoystickGetDevicePath(int device_index)
{
return NULL;
}
static int
VIRTUAL_JoystickGetDevicePlayerIndex(int device_index)
{
@ -435,6 +441,7 @@ SDL_JoystickDriver SDL_VIRTUAL_JoystickDriver =
VIRTUAL_JoystickGetCount,
VIRTUAL_JoystickDetect,
VIRTUAL_JoystickGetDeviceName,
VIRTUAL_JoystickGetDevicePath,
VIRTUAL_JoystickGetDevicePlayerIndex,
VIRTUAL_JoystickSetDevicePlayerIndex,
VIRTUAL_JoystickGetDeviceGUID,