SDL_hid_close(3)

πŸ’– SDL_hid_close(3) πŸ’–

okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_hid_close β€” the girl whose whole job is saying bye to a HID device. no cap, she's a closer. πŸŽ€


🌸 NAME 🌸

SDL_hid_close β€” close a HID device. that's it. that's the whole vibe. she closes. periodt. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_hidapi.h>

int SDL_hid_close(SDL_hid_device *dev);

like, you pull in the header, you hand her the handle, she handles it. iconic. πŸ’…


πŸ“ FUNCTION PARAMETERS πŸ“

  • dev β€” a device handle returned from SDL_hid_open(). so like, not just any random handle you found on the floor, bestie β€” it's gotta be one that came from SDL_hid_open(). iykyk πŸ™ˆ

πŸ’œ RETURN VALUE πŸ’œ

she returns 0 on success, or a negative error code on failure. and if it fails?? don't just sit there spiraling β€” call SDL_GetError() for more information. she will tell you what went wrong, fr fr. 😭


🌈 AVAILABILITY 🌈

this one's been serving since SDL 3.2.0. vintage-ish. ✨


and that's the whole page, bestie!! 🫢 this lil' slice of wisdom comes to you from Simple Directmedia Layer, living its best life as SDL 3.4.18, dated SDL_hid_close(3) β€” go close a device, you absolute queen πŸ‘‘πŸ’–

πŸ“¦ where this page comes from