1 /* RetroArch - A frontend for libretro. 2 * Copyright (C) 2010-2014 - Hans-Kristian Arntzen 3 * Copyright (C) 2011-2020 - Daniel De Matteis 4 * 5 * RetroArch is free software: you can redistribute it and/or modify it under the terms 6 * of the GNU General Public License as published by the Free Software Found- 7 * ation, either version 3 of the License, or (at your option) any later version. 8 * 9 * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 10 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 * PURPOSE. See the GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License along with RetroArch. 14 * If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 #ifndef __DINPUT_JOYPAD_H 18 #define __DINPUT_JOYPAD_H 19 20 #include <stdint.h> 21 #include <boolean.h> 22 #include <retro_common_api.h> 23 24 #include <dinput.h> 25 26 /* For DIJOYSTATE2 struct, rgbButtons will always have 128 elements */ 27 #define ARRAY_SIZE_RGB_BUTTONS 128 28 29 RETRO_BEGIN_DECLS 30 31 struct dinput_joypad_data 32 { 33 LPDIRECTINPUTDEVICE8 joypad; 34 DIJOYSTATE2 joy_state; 35 char* joy_name; 36 char* joy_friendly_name; 37 int32_t vid; 38 int32_t pid; 39 LPDIRECTINPUTEFFECT rumble_iface[2]; 40 DIEFFECT rumble_props; 41 }; 42 43 RETRO_END_DECLS 44 45 #endif 46