Recent commits on sdl-dll (hg) - sdl-dll - OSDN https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/ 493201: virtual joysticks: add autotools-build support (Bug 5028)... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/49320151ca4d7990d128f08220fd703ec1d40e3d David Ludwig Commit: 49320151ca4d7990d128f08220fd703ec1d40e3d
virtual joysticks: add autotools-build support (Bug 5028)

Autotools support for virtual-joysticks turns it OFF by default.  To turn it
on, pass the following into configure: --enable-joystick-virtual
]]>
4ee09b: virtual joysticks: MSVC support part 2/2, add file refs t... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/4ee09b18876b47ceb73a142d1f94083f63db0198 David Ludwig Commit: 4ee09b18876b47ceb73a142d1f94083f63db0198
virtual joysticks: MSVC support part 2/2, add file refs to MSVC projects (bug 5028)
]]>
a0ab6d: virtual joysticks: MSVC support part 1/2, make driver's .... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/a0ab6d4ff5e74f2d90b417dd3eceb81aeef55fa1 David Ludwig Commit: a0ab6d4ff5e74f2d90b417dd3eceb81aeef55fa1
virtual joysticks: MSVC support part 1/2, make driver's .c file be uniquely named
]]>
811d19: iOS: fixed build error when building test apps via Xcode ... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/811d194a1f25aeb99540a54f413c3108792366fa David Ludwig Commit: 811d194a1f25aeb99540a54f413c3108792366fa
iOS: fixed build error when building test apps via Xcode

CoreBluetooth.framework needed to get linked into test apps, all of which
are currently using statically-linked SDL.
]]>
a9723f: virtual joysticks: added source files to Xcode projects (... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/a9723f168294092739eca9dadedf22eb6e1f5f0a David Ludwig Commit: a9723f168294092739eca9dadedf22eb6e1f5f0a
virtual joysticks: added source files to Xcode projects (Bug 5028)
]]>
c88387: virtual joysticks: improved docs for SDL_JoystickSetVirtu... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/c88387a1e0e22d6056065ef52969e695189f230c David Ludwig Commit: c88387a1e0e22d6056065ef52969e695189f230c
virtual joysticks: improved docs for SDL_JoystickSetVirtual* functions
]]>
4377c5: virtual joysticks: removed ball support (Bug 5028) https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/4377c59b636e4486f0468d60c6e1042c06421432 David Ludwig Commit: 4377c59b636e4486f0468d60c6e1042c06421432
virtual joysticks: removed ball support (Bug 5028)
]]>
d19586: Fixed build error Malte Kießling I get a build error in... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/d195863f82266f5a0da4852d9249acd1941199d5 Sam Lantinga Commit: d195863f82266f5a0da4852d9249acd1941199d5
Fixed build error

Malte Kießling

I get a build error in SDL_sysjoystick.c:74 for the merged patch, but its nothing to sweat about, just -Werror=declaration-after-statement doing its usual stuff.
]]>
8fb074: Added SDL_GetErrorMsg() to get the error message in a thr... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/8fb0748c2cce52b91ce1111de56da5bc4fccaa1e Sam Lantinga Commit: 8fb0748c2cce52b91ce1111de56da5bc4fccaa1e
Added SDL_GetErrorMsg() to get the error message in a thread-safe way
]]>
77d566: Fixed slow enumeration when Apple Cinema HD display 30" i... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/77d56667ebe02570c6aad1b2a61ce4fc2d1db9cf Sam Lantinga Commit: 77d56667ebe02570c6aad1b2a61ce4fc2d1db9cf
Fixed slow enumeration when Apple Cinema HD display 30" is plugged in
]]>
958bd9: Fixed bug 5028 - Virtual Joysticks (new joystick backend)... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/958bd91f4f4c8a0f8e0b99c44fbb12a32a324eab Sam Lantinga Commit: 958bd91f4f4c8a0f8e0b99c44fbb12a32a324eab
Fixed bug 5028 - Virtual Joysticks (new joystick backend)

David Ludwig

I have created a new driver for SDL's Joystick and Game-Controller subsystem: a Virtual driver.  This driver allows one to create a software-based joystick, which to SDL applications will look and react like a real joystick, but whose state can be set programmatically.  A primary use case for this is to help enable developers to add touch-screen joysticks to their apps.

The driver comes with a set of new, public APIs, with functions to attach and detach joysticks, set virtual-joystick state, and to determine if a joystick is a virtual-one.

Use of virtual joysticks goes as such:

1. Attach one or more virtual joysticks by calling SDL_JoystickAttachVirtual.  If successful, this returns the virtual-device's joystick-index.
2. Open the virtual joysticks (using indicies returned by SDL_JoystickAttachVirtual).
3. Call any of the SDL_JoystickSetVirtual* functions when joystick-state changes.  Please note that virtual-joystick state will only get applied on the next call to SDL_JoystickUpdate, or when pumping or polling for SDL events (via SDL_PumpEvents or SDL_PollEvent).


Here is a listing of the new, public APIs, at present and subject to change:

------------------------------------------------------------

/**
 * Attaches a new virtual joystick.
 * Returns the joystick's device index, or -1 if an error occurred.
 */
extern DECLSPEC int SDLCALL SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nballs, int nbuttons, int nhats);

/**
 * Detaches a virtual joystick
 * Returns 0 on success, or -1 if an error occurred.
 */
extern DECLSPEC int SDLCALL SDL_JoystickDetachVirtual(int device_index);

/**
 * Indicates whether or not a virtual-joystick is at a given device index.
 */
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);

/**
 * Set values on an opened, virtual-joystick's controls.
 * Returns 0 on success, -1 on error.
 */
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualAxis(SDL_Joystick * joystick, int axis, Sint16 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualBall(SDL_Joystick * joystick, int ball, Sint16 xrel, Sint16 yrel);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualButton(SDL_Joystick * joystick, int button, Uint8 value);
extern DECLSPEC int SDLCALL SDL_JoystickSetVirtualHat(SDL_Joystick * joystick, int hat, Uint8 value);

------------------------------------------------------------

Miscellaneous notes on the initial patch, which are also subject to change:

1. no test code is present in SDL, yet.  This should, perhaps, change.  Initial development was done with an ImGui-based app, which potentially is too thick for use in SDL-official.  If tests are to be added, what kind of tests?  Automated?  Graphical?

2. virtual game controllers can be created by calling SDL_JoystickAttachVirtual with a joystick-type of SDL_JOYSTICK_TYPE_GAME_CONTROLLER, with naxes (num axes) set to SDL_CONTROLLER_AXIS_MAX, and with nbuttons (num buttons) set to SDL_CONTROLLER_BUTTON_MAX.  When updating their state, values of type SDL_GameControllerAxis or SDL_GameControllerButton can be casted to an int and used for the control-index (in calls to SDL_JoystickSetVirtual* functions).

3. virtual joysticks' guids are mostly all-zeros with the exception of the last two bytes, the first of which is a 'v', to indicate that the guid is a virtual one, and the second of which is a SDL_JoystickType that has been converted into a Uint8.

4. virtual joysticks are ONLY turned into virtual game-controllers if and when their joystick-type is set to SDL_JOYSTICK_TYPE_GAMECONTROLLER.  This is controlled by having SDL's default list of game-controllers have a single entry for a virtual game controller (of guid, "00000000000000000000000000007601", which is subject to the guid-encoding described above).

5. regarding having to call SDL_JoystickUpdate, either directly or indirectly via SDL_PumpEvents or SDL_PollEvents, before new virtual-joystick state becomes active (as specified via SDL_JoystickSetVirtual* function-calls), this was done to match behavior found in SDL's other joystick drivers, almost all of which will only update SDL-state during SDL_JoystickUpdate.

6. the initial patch is based off of SDL 2.0.12

7. the virtual joystick subsystem is disabled by default.  It should be possible to enable it by building with SDL_JOYSTICK_VIRTUAL=1



Questions, comments, suggestions, or bug reports very welcome!
]]>
317366: Added support for the older Xbox One S Bluetooth controll... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/317366b2c172bdbc3a88df9e612644de950e1c15 Sam Lantinga Commit: 317366b2c172bdbc3a88df9e612644de950e1c15
Added support for the older Xbox One S Bluetooth controller report format
]]>
217a7d: Fixed crash if manufacturer or product string is NULL https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/217a7d8a5fef586667b3414902be8c0672f21796 Sam Lantinga Commit: 217a7d8a5fef586667b3414902be8c0672f21796
Fixed crash if manufacturer or product string is NULL
]]>
2ef60a: Fixed bug 4921 - Do not swap B/X buttons on GameCube cont... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/2ef60abd9132835ee7d94fd1e8ef377a2986a076 Sam Lantinga Commit: 2ef60abd9132835ee7d94fd1e8ef377a2986a076
Fixed bug 4921 - Do not swap B/X buttons on GameCube controller unless it's requested


The binding for the Mayflash GameCube controller adapter now respects the SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS hint
]]>
c2c70c: vjoy: documented connection to SDL_JoystickUpdate https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/c2c70ce871766eb23a1df1a8569a30e25aa166dd David Ludwig Commit: c2c70ce871766eb23a1df1a8569a30e25aa166dd
vjoy: documented connection to SDL_JoystickUpdate
]]>
08acb1: Handle entirely duplicated joystick product names, as wel... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/08acb1ee220ac42a3016469eaddbb54857917600 Sam Lantinga Commit: 08acb1ee220ac42a3016469eaddbb54857917600
Handle entirely duplicated joystick product names, as well as vendor and product names that start with the name of the vendor, but with different case (e.g. 8bitdo 8BitDo)
]]>
aa4407: Fixed binding the D-PAD on the 8BitDo M30 controller https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/aa4407193fa2b60bc7b85fd5c47da27cbc0d112a Sam Lantinga Commit: aa4407193fa2b60bc7b85fd5c47da27cbc0d112a
Fixed binding the D-PAD on the 8BitDo M30 controller
]]>
04a241: Updated 8BitDo SF30 Pro mapping with hint support, added ... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/04a241d30c91bdd395026eeefc3abc99c27b35cc Sam Lantinga Commit: 04a241d30c91bdd395026eeefc3abc99c27b35cc
Updated 8BitDo SF30 Pro mapping with hint support, added Android binding for the 8BitDo M30 Gamepad
]]>
a2bfec: Fixed exception at shutdown if the controllers are closed... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/a2bfecfe4ec284679ac36061abfde564ce0bcbe5 Sam Lantinga Commit: a2bfecfe4ec284679ac36061abfde564ce0bcbe5
Fixed exception at shutdown if the controllers are closed after the HIDDeviceManager is shutdown
]]>
65d1b7: Fixed compiler warnings https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/65d1b7b419a25bb4b3b0bbeae8043cea16e6e9e8 Sam Lantinga Commit: 65d1b7b419a25bb4b3b0bbeae8043cea16e6e9e8
Fixed compiler warnings
]]>
27166f: vjoy: merged two, internal-use structs into one https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/27166fe5be6aeb657b8663c5a4f5685c7209aa80 David Ludwig Commit: 27166fe5be6aeb657b8663c5a4f5685c7209aa80
vjoy: merged two, internal-use structs into one
]]>
f1d5f1: vjoy: more debug-code removal https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/f1d5f1053cf7d5351843cf0020b739e41fa7043f David Ludwig Commit: f1d5f1053cf7d5351843cf0020b739e41fa7043f
vjoy: more debug-code removal
]]>
66b28c: Fixed build warnings https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/66b28c199af17c1e95b9b7ade2ae9f81090c1929 Sam Lantinga Commit: 66b28c199af17c1e95b9b7ade2ae9f81090c1929
Fixed build warnings
]]>
bcbfec: Unified code to standardize joystick names https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/bcbfec15e25fab06d4dba47695bfebff310b3d7e Sam Lantinga Commit: bcbfec15e25fab06d4dba47695bfebff310b3d7e
Unified code to standardize joystick names
]]>
e60a1b: Added support for SDL hints in the game controller mappin... https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/e60a1b63742b585b1f327e3f69adbca293393663 Sam Lantinga Commit: e60a1b63742b585b1f327e3f69adbca293393663
Added support for SDL hints in the game controller mapping database
]]>
7d9f10: vjoy: removed a bit of debug-logging code https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/7d9f100abeeb18565fa88e874739b318cff38dd4 David Ludwig Commit: 7d9f100abeeb18565fa88e874739b318cff38dd4
vjoy: removed a bit of debug-logging code
]]>
4a9a4c: merged with SDL 2.0.12 https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/4a9a4caf9328556c794d0599a45cff9b6d40d110 David Ludwig Commit: 4a9a4caf9328556c794d0599a45cff9b6d40d110
merged with SDL 2.0.12
]]>
1daea6: Use LIBUSB_CALL for hidapi's read_callback function https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/1daea6276f1bb87c0f1c43768a9f1fd4e2c0fe21 Ethan Lee Commit: 1daea6276f1bb87c0f1c43768a9f1fd4e2c0fe21
Use LIBUSB_CALL for hidapi's read_callback function
]]>
34cc7d: Added tag release-2.0.12 for changeset 355a4f94a782 https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/34cc7d3b69d33f930c787a669b12c7371f0eade1 Sam Lantinga Commit: 34cc7d3b69d33f930c787a669b12c7371f0eade1
Added tag release-2.0.12 for changeset 355a4f94a782
]]>
5abd51: Updated SDL to version 2.0.13 for development builds https://pt.osdn.net/projects/sdl-dll/scm/hg/sdl-dll/commits/5abd513b853da031c24773119a1348c6f714c22f Sam Lantinga Commit: 5abd513b853da031c24773119a1348c6f714c22f
Updated SDL to version 2.0.13 for development builds
]]>