diff --git a/vendor/sdl3/sdl3_endian.odin b/vendor/sdl3/sdl3_endian.odin index 277237a18..2a34fa9d6 100644 --- a/vendor/sdl3/sdl3_endian.odin +++ b/vendor/sdl3/sdl3_endian.odin @@ -13,12 +13,12 @@ BYTEORDER :: LIL_ENDIAN when ODIN_ENDIAN == .Little else BIG_ENDIAN @(require_results) SwapFloat :: #force_inline proc "c" (x: f32) -> f32 { return intrinsics.byte_swap(x) } -@(require_results) Swap16LE :: #force_inline proc "c" (x: Uint16) -> Uint16 { x := x; return Uint16((^u16le)(&x)^) } -@(require_results) Swap32LE :: #force_inline proc "c" (x: Uint32) -> Uint32 { x := x; return Uint32((^u32le)(&x)^) } -@(require_results) Swap64LE :: #force_inline proc "c" (x: Uint64) -> Uint64 { x := x; return Uint64((^u64le)(&x)^) } -@(require_results) SwapFloatLE :: #force_inline proc "c" (x: f32) -> f32 { x := x; return f32 ((^f32le)(&x)^) } +@(require_results) Swap16LE :: #force_inline proc "c" (x: Uint16) -> Uint16 { return Uint16(transmute(u16le)x) } +@(require_results) Swap32LE :: #force_inline proc "c" (x: Uint32) -> Uint32 { return Uint32(transmute(u32le)x) } +@(require_results) Swap64LE :: #force_inline proc "c" (x: Uint64) -> Uint64 { return Uint64(transmute(u64le)x) } +@(require_results) SwapFloatLE :: #force_inline proc "c" (x: f32) -> f32 { return f32 (transmute(f32le)x) } -@(require_results) Swap16BE :: #force_inline proc "c" (x: Uint16) -> Uint16 { x := x; return Uint16((^u16be)(&x)^) } -@(require_results) Swap32BE :: #force_inline proc "c" (x: Uint32) -> Uint32 { x := x; return Uint32((^u32be)(&x)^) } -@(require_results) Swap64BE :: #force_inline proc "c" (x: Uint64) -> Uint64 { x := x; return Uint64((^u64be)(&x)^) } -@(require_results) SwapFloatBE :: #force_inline proc "c" (x: f32) -> f32 { x := x; return f32 ((^f32be)(&x)^) } \ No newline at end of file +@(require_results) Swap16BE :: #force_inline proc "c" (x: Uint16) -> Uint16 { return Uint16(transmute(u16be)x) } +@(require_results) Swap32BE :: #force_inline proc "c" (x: Uint32) -> Uint32 { return Uint32(transmute(u32be)x) } +@(require_results) Swap64BE :: #force_inline proc "c" (x: Uint64) -> Uint64 { return Uint64(transmute(u64be)x) } +@(require_results) SwapFloatBE :: #force_inline proc "c" (x: f32) -> f32 { return f32 (transmute(f32be)x) } \ No newline at end of file diff --git a/vendor/sdl3/sdl3_hidapi.odin b/vendor/sdl3/sdl3_hidapi.odin index 861604a39..6817bffa2 100644 --- a/vendor/sdl3/sdl3_hidapi.odin +++ b/vendor/sdl3/sdl3_hidapi.odin @@ -34,20 +34,20 @@ hid_bus_type :: enum c.int { hid_device_info :: struct { /** Platform-specific device path */ - path: [^]c.char, + path: [^]c.char `fmt:"q,0"`, /** Device Vendor ID */ vendor_id: c.ushort, /** Device Product ID */ product_id: c.ushort, /** Serial Number */ - serial_number: [^]c.wchar_t, + serial_number: [^]c.wchar_t `fmt:"q,0"`, /** Device Release Number in binary-coded decimal, also known as Device Version Number */ release_number: c.ushort, /** Manufacturer String */ - manufacturer_string: [^]c.wchar_t, + manufacturer_string: [^]c.wchar_t `fmt:"q,0"`, /** Product string */ - product_string: [^]c.wchar_t, + product_string: [^]c.wchar_t `fmt:"q,0"`, /** Usage Page for this Device/Interface (Windows/Mac/hidraw only) */ usage_page: c.ushort, diff --git a/vendor/sdl3/sdl3_joystick.odin b/vendor/sdl3/sdl3_joystick.odin index b0f855e8b..d2ce07e1e 100644 --- a/vendor/sdl3/sdl3_joystick.odin +++ b/vendor/sdl3/sdl3_joystick.odin @@ -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 */ diff --git a/vendor/sdl3/sdl3_pixels.odin b/vendor/sdl3/sdl3_pixels.odin index a2dffecc7..0bea733f8 100644 --- a/vendor/sdl3/sdl3_pixels.odin +++ b/vendor/sdl3/sdl3_pixels.odin @@ -523,17 +523,17 @@ Color :: distinct [4]Uint8 FColor :: distinct [4]f32 Palette :: struct { - ncolors: c.int, /**< number of elements in `colors`. */ - colors: [^]Color, /**< an array of colors, `ncolors` long. */ - version: Uint32, /**< internal use only, do not touch. */ - refcount: c.int, /**< internal use only, do not touch. */ + ncolors: c.int, /**< number of elements in `colors`. */ + colors: [^]Color `fmt:"v,ncolors"`, /**< an array of colors, `ncolors` long. */ + version: Uint32, /**< internal use only, do not touch. */ + refcount: c.int, /**< internal use only, do not touch. */ } PixelFormatDetails :: struct { format: PixelFormat, bits_per_pixel: Uint8, bytes_per_pixel: Uint8, - padding: [2]Uint8, + _: [2]Uint8, Rmask: Uint32, Gmask: Uint32, Bmask: Uint32,