Path: blob/master/thirdparty/sdl/joystick/SDL_gamepad_c.h
9903 views
/*1Simple DirectMedia Layer2Copyright (C) 1997-2025 Sam Lantinga <[email protected]>34This software is provided 'as-is', without any express or implied5warranty. In no event will the authors be held liable for any damages6arising from the use of this software.78Permission is granted to anyone to use this software for any purpose,9including commercial applications, and to alter it and redistribute it10freely, subject to the following restrictions:11121. The origin of this software must not be misrepresented; you must not13claim that you wrote the original software. If you use this software14in a product, an acknowledgment in the product documentation would be15appreciated but is not required.162. Altered source versions must be plainly marked as such, and must not be17misrepresented as being the original software.183. This notice may not be removed or altered from any source distribution.19*/2021#ifndef SDL_gamepad_c_h_22#define SDL_gamepad_c_h_2324#include "SDL_internal.h"2526// Useful functions and variables from SDL_gamepad.c2728// Initialization and shutdown functions29extern bool SDL_InitGamepadMappings(void);30extern void SDL_QuitGamepadMappings(void);31extern bool SDL_InitGamepads(void);32extern void SDL_QuitGamepads(void);3334extern void SDL_PrivateGamepadAdded(SDL_JoystickID instance_id);35extern void SDL_PrivateGamepadRemoved(SDL_JoystickID instance_id);3637// Function to return whether a joystick name and GUID is a gamepad38extern bool SDL_IsGamepadNameAndGUID(const char *name, SDL_GUID guid);3940// Function to return whether a gamepad should be ignored41extern bool SDL_ShouldIgnoreGamepad(Uint16 vendor_id, Uint16 product_id, Uint16 version, const char *name);4243// Handle delayed guide button on a gamepad44extern void SDL_GamepadHandleDelayedGuideButton(SDL_Joystick *joystick);4546// Handle system sensor data47extern void SDL_GamepadSensorWatcher(Uint64 timestamp, SDL_SensorID sensor, Uint64 sensor_timestamp, float *data, int num_values);4849#endif // SDL_gamepad_c_h_505152