Add struct field tag fmt formatting

This commit is contained in:
gingerBill
2025-02-05 10:30:14 +00:00
parent 802895aa43
commit 83542a3f04
4 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -85,8 +85,8 @@ VirtualJoystickDesc :: struct {
e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX) */
name: cstring, /**< the name of the joystick */
touchpads: [^]VirtualJoystickTouchpadDesc, /**< A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0 */
sensors: [^]VirtualJoystickSensorDesc, /**< A pointer to an array of sensor descriptions, required if `nsensors` is > 0 */
touchpads: [^]VirtualJoystickTouchpadDesc `fmt:"v,ntouchpads"`, /**< A pointer to an array of touchpad descriptions, required if `ntouchpads` is > 0 */
sensors: [^]VirtualJoystickSensorDesc `fmt:"v,nsensors"`, /**< A pointer to an array of sensor descriptions, required if `nsensors` is > 0 */
userdata: rawptr, /**< User data pointer passed to callbacks */
Update: proc "c" (userdata: rawptr), /**< Called when the joystick state should be updated */