RetroArch
input.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2013-2014 - Jason Fetters
3  * Copyright (C) 2011-2017 - 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 __WIIU_INPUT__H
18 #define __WIIU_INPUT__H
19 
20 #include <string.h>
21 #include <malloc.h>
22 #include <unistd.h>
23 
24 #include "hid_types.h"
25 #include "../gamepad.h"
26 
27 #include <wiiu/os.h>
28 #include <wiiu/syshid.h>
29 #include <wiiu/vpad.h>
30 #include <wiiu/kpad.h>
31 #include <wiiu/pad_strings.h>
32 #include "hid.h"
33 
34 #include "../../input_driver.h"
35 #include "../../common/hid/hid_device_driver.h"
36 #include "../../connect/joypad_connection.h"
37 #include "../../../retroarch.h"
38 #include "../../../verbosity.h"
39 #include "../../../command.h"
40 
41 #ifdef HAVE_CONFIG_H
42 #include "../../../config.h"
43 #endif /* HAVE_CONFIG_H */
44 
45 #include "../../../gfx/video_driver.h"
46 #include "../../../tasks/tasks_internal.h"
47 
48 #define WIIMOTE_TYPE_WIIPLUS 0x00
49 #define WIIMOTE_TYPE_NUNCHUK 0x01
50 #define WIIMOTE_TYPE_CLASSIC 0x02
51 #define WIIMOTE_TYPE_PRO 0x1f
52 #define WIIMOTE_TYPE_NONE 0xfd
53 
54 #define WIIU_DEVICE_INDEX_TOUCHPAD 2
55 
56 #define PAD_GAMEPAD 0
57 #define WIIU_WIIMOTE_CHANNELS 4
58 
59 #define WIIU_ANALOG_FACTOR 0x7ff0
60 #define WIIU_READ_STICK(stick) ((stick) * WIIU_ANALOG_FACTOR)
61 
63  int16_t (*get_axis_value)(int32_t axis, int16_t state[3][2], bool is_negative);
64  void (*set_axis_value)(int16_t state[3][2], int16_t left_x, int16_t left_y,
65  int16_t right_x, int16_t right_y, int16_t touch_x, int16_t touch_y);
67  void (*connect)(unsigned pad, input_device_driver_t *driver);
68 };
69 
70 #endif /* __WIIU_INPUT__H */
void(* set_axis_value)(int16_t state[3][2], int16_t left_x, int16_t left_y, int16_t right_x, int16_t right_y, int16_t touch_x, int16_t touch_y)
Definition: input.h:64
void(* read_axis_data)(uint32_t axis, axis_data *data)
Definition: input.h:66
int16_t(* get_axis_value)(int32_t axis, int16_t state[3][2], bool is_negative)
Definition: input.h:63
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:6303
Definition: input.h:62
signed short int16_t
Definition: stdint.h:122
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
signed int int32_t
Definition: stdint.h:123
Definition: input_driver.h:170
Definition: gamepad.h:27
void(* connect)(unsigned pad, input_device_driver_t *driver)
Definition: input.h:67
unsigned int uint32_t
Definition: stdint.h:126