Atlas - controller_type.h
Home / ext / SDL / src / joystick Lines: 1 | Size: 3110 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Copyright (C) Valve Corporation 3 4 This software is provided 'as-is', without any express or implied 5 warranty. In no event will the authors be held liable for any damages 6 arising from the use of this software. 7 8 Permission is granted to anyone to use this software for any purpose, 9 including commercial applications, and to alter it and redistribute it 10 freely, subject to the following restrictions: 11 12 1. The origin of this software must not be misrepresented; you must not 13 claim that you wrote the original software. If you use this software 14 in a product, an acknowledgment in the product documentation would be 15 appreciated but is not required. 16 2. Altered source versions must be plainly marked as such, and must not be 17 misrepresented as being the original software. 18 3. This notice may not be removed or altered from any source distribution. 19*/ 20 21#ifndef CONTROLLER_TYPE_H 22#define CONTROLLER_TYPE_H 23#ifdef _WIN32 24#pragma once 25#endif 26 27//----------------------------------------------------------------------------- 28// Purpose: Steam Controller models 29// WARNING: DO NOT RENUMBER EXISTING VALUES - STORED IN A DATABASE 30//----------------------------------------------------------------------------- 31typedef enum 32{ 33 k_eControllerType_None = -1, 34 k_eControllerType_Unknown = 0, 35 36 // Steam Controllers 37 k_eControllerType_UnknownSteamController = 1, 38 k_eControllerType_SteamController = 2, 39 k_eControllerType_SteamControllerV2 = 3, 40 k_eControllerType_SteamControllerNeptune = 4, 41 42 k_eControllerType_SteamControllerTriton = 10, 43 44 // Other Controllers 45 k_eControllerType_UnknownNonSteamController = 30, 46 k_eControllerType_XBox360Controller = 31, 47 k_eControllerType_XBoxOneController = 32, 48 k_eControllerType_PS3Controller = 33, 49 k_eControllerType_PS4Controller = 34, 50 k_eControllerType_WiiController = 35, 51 k_eControllerType_AppleController = 36, 52 k_eControllerType_AndroidController = 37, 53 k_eControllerType_SwitchProController = 38, 54 k_eControllerType_SwitchJoyConLeft = 39, 55 k_eControllerType_SwitchJoyConRight = 40, 56 k_eControllerType_SwitchJoyConPair = 41, 57 k_eControllerType_SwitchInputOnlyController = 42, 58 k_eControllerType_MobileTouch = 43, 59 k_eControllerType_XInputSwitchController = 44, // Client-side only, used to mark Nintendo Switch style controllers as using XInput instead of the Nintendo Switch protocol 60 k_eControllerType_PS5Controller = 45, 61 k_eControllerType_XInputPS4Controller = 46, // Client-side only, used to mark DualShock 4 style controllers using XInput instead of the DualShock 4 controller protocol 62 k_eControllerType_LastController, // Don't add game controllers below this enumeration - this enumeration can change value 63 64 // Keyboards and Mice 65 k_eControllertype_GenericKeyboard = 400, 66 k_eControllertype_GenericMouse = 800, 67} EControllerType; 68 69typedef struct 70{ 71 unsigned int m_unDeviceID; 72 EControllerType m_eControllerType; 73 const char *m_pszName; 74} ControllerDescription_t; 75 76 77extern EControllerType GuessControllerType( int nVID, int nPID ); 78extern const char *GuessControllerName( int nVID, int nPID ); 79 80#endif // CONTROLLER_TYPE_H 81[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.