mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-11 14:28:39 +00:00
Renamed SDL_AttachVirtualJoystickEx() to SDL_AttachVirtualJoystick()
The shorthand version of this function didn't allow specifying a controller name, which seems pretty important. It seems like anyone actually implementing a virtual joystick is going to want to use some of the extended functionality.
This commit is contained in:
@@ -28,7 +28,6 @@ SDL3_0.0.0 {
|
||||
SDL_AtomicSet;
|
||||
SDL_AtomicSetPtr;
|
||||
SDL_AttachVirtualJoystick;
|
||||
SDL_AttachVirtualJoystickEx;
|
||||
SDL_AudioDevicePaused;
|
||||
SDL_BindAudioStream;
|
||||
SDL_BindAudioStreams;
|
||||
@@ -203,6 +202,7 @@ SDL3_0.0.0 {
|
||||
SDL_GetCurrentTime;
|
||||
SDL_GetCurrentVideoDriver;
|
||||
SDL_GetCursor;
|
||||
SDL_GetDateTimeLocalePreferences;
|
||||
SDL_GetDayOfWeek;
|
||||
SDL_GetDayOfYear;
|
||||
SDL_GetDaysInMonth;
|
||||
@@ -1015,7 +1015,6 @@ SDL3_0.0.0 {
|
||||
SDL_wcsnstr;
|
||||
SDL_wcsstr;
|
||||
SDL_wcstol;
|
||||
SDL_GetDateTimeLocalePreferences;
|
||||
# extra symbols go here (don't modify this line)
|
||||
local: *;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,6 @@
|
||||
#define SDL_AtomicSet SDL_AtomicSet_REAL
|
||||
#define SDL_AtomicSetPtr SDL_AtomicSetPtr_REAL
|
||||
#define SDL_AttachVirtualJoystick SDL_AttachVirtualJoystick_REAL
|
||||
#define SDL_AttachVirtualJoystickEx SDL_AttachVirtualJoystickEx_REAL
|
||||
#define SDL_AudioDevicePaused SDL_AudioDevicePaused_REAL
|
||||
#define SDL_BindAudioStream SDL_BindAudioStream_REAL
|
||||
#define SDL_BindAudioStreams SDL_BindAudioStreams_REAL
|
||||
@@ -228,6 +227,7 @@
|
||||
#define SDL_GetCurrentTime SDL_GetCurrentTime_REAL
|
||||
#define SDL_GetCurrentVideoDriver SDL_GetCurrentVideoDriver_REAL
|
||||
#define SDL_GetCursor SDL_GetCursor_REAL
|
||||
#define SDL_GetDateTimeLocalePreferences SDL_GetDateTimeLocalePreferences_REAL
|
||||
#define SDL_GetDayOfWeek SDL_GetDayOfWeek_REAL
|
||||
#define SDL_GetDayOfYear SDL_GetDayOfYear_REAL
|
||||
#define SDL_GetDaysInMonth SDL_GetDaysInMonth_REAL
|
||||
@@ -1039,4 +1039,3 @@
|
||||
#define SDL_wcsnstr SDL_wcsnstr_REAL
|
||||
#define SDL_wcsstr SDL_wcsstr_REAL
|
||||
#define SDL_wcstol SDL_wcstol_REAL
|
||||
#define SDL_GetDateTimeLocalePreferences SDL_GetDateTimeLocalePreferences_REAL
|
||||
|
||||
@@ -92,8 +92,7 @@ SDL_DYNAPI_PROC(int,SDL_AtomicGet,(SDL_AtomicInt *a),(a),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_AtomicGetPtr,(void **a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_AtomicSet,(SDL_AtomicInt *a, int b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(void*,SDL_AtomicSetPtr,(void **a, void *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_AttachVirtualJoystick,(SDL_JoystickType a, int b, int c, int d),(a,b,c,d),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_AttachVirtualJoystickEx,(const SDL_VirtualJoystickDesc *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_JoystickID,SDL_AttachVirtualJoystick,(const SDL_VirtualJoystickDesc *a),(a),return)
|
||||
SDL_DYNAPI_PROC(SDL_bool,SDL_AudioDevicePaused,(SDL_AudioDeviceID a),(a),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_BindAudioStream,(SDL_AudioDeviceID a, SDL_AudioStream *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_BindAudioStreams,(SDL_AudioDeviceID a, SDL_AudioStream **b, int c),(a,b,c),return)
|
||||
@@ -266,6 +265,7 @@ SDL_DYNAPI_PROC(SDL_ThreadID,SDL_GetCurrentThreadID,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetCurrentTime,(SDL_Time *a),(a),return)
|
||||
SDL_DYNAPI_PROC(const char*,SDL_GetCurrentVideoDriver,(void),(),return)
|
||||
SDL_DYNAPI_PROC(SDL_Cursor*,SDL_GetCursor,(void),(),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDateTimeLocalePreferences,(SDL_DateFormat *a, SDL_TimeFormat *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDayOfWeek,(int a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDayOfYear,(int a, int b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDaysInMonth,(int a, int b),(a,b),return)
|
||||
@@ -1055,4 +1055,3 @@ SDL_DYNAPI_PROC(size_t,SDL_wcsnlen,(const wchar_t *a, size_t b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsnstr,(const wchar_t *a, const wchar_t *b, size_t c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(wchar_t*,SDL_wcsstr,(const wchar_t *a, const wchar_t *b),(a,b),return)
|
||||
SDL_DYNAPI_PROC(long,SDL_wcstol,(const wchar_t *a, wchar_t **b, int c),(a,b,c),return)
|
||||
SDL_DYNAPI_PROC(int,SDL_GetDateTimeLocalePreferences,(SDL_DateFormat *a, SDL_TimeFormat *b),(a,b),return)
|
||||
|
||||
@@ -1167,19 +1167,7 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)
|
||||
return joystick;
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_AttachVirtualJoystick(SDL_JoystickType type, int naxes, int nbuttons, int nhats)
|
||||
{
|
||||
SDL_VirtualJoystickDesc desc;
|
||||
|
||||
SDL_zero(desc);
|
||||
desc.type = (Uint16)type;
|
||||
desc.naxes = (Uint16)naxes;
|
||||
desc.nbuttons = (Uint16)nbuttons;
|
||||
desc.nhats = (Uint16)nhats;
|
||||
return SDL_AttachVirtualJoystickEx(&desc);
|
||||
}
|
||||
|
||||
SDL_JoystickID SDL_AttachVirtualJoystickEx(const SDL_VirtualJoystickDesc *desc)
|
||||
SDL_JoystickID SDL_AttachVirtualJoystick(const SDL_VirtualJoystickDesc *desc)
|
||||
{
|
||||
#ifdef SDL_JOYSTICK_VIRTUAL
|
||||
SDL_JoystickID retval;
|
||||
|
||||
Reference in New Issue
Block a user