Added RETRO_DEVICE_INDEX_ANALOG_BUTTON constant

This commit is contained in:
David Walters 2017-11-17 21:50:50 +00:00
parent 41df4a0555
commit 668cc01c5c

View File

@ -131,11 +131,12 @@ extern "C" {
#define RETRO_DEVICE_LIGHTGUN 4
/* The ANALOG device is an extension to JOYPAD (RetroPad).
* Similar to DualShock it adds two analog sticks.
* This is treated as a separate device type as it returns values in the
* full analog range of [-0x8000, 0x7fff]. Positive X axis is right.
* Positive Y axis is down.
* Only use ANALOG type when polling for analog values of the axes.
* Similar to DualShock2 it adds two analog sticks and all buttons can
* be analog. This is treated as a separate device type as it returns
* axis values in the full analog range of [-0x8000, 0x7fff].
* Positive X axis is right. Positive Y axis is down.
* Buttons are returned in the range [0, 0x7fff].
* Only use ANALOG type when polling for analog values.
*/
#define RETRO_DEVICE_ANALOG 5
@ -174,7 +175,8 @@ extern "C" {
/* Buttons for the RetroPad (JOYPAD).
* The placement of these is equivalent to placements on the
* Super Nintendo controller.
* L2/R2/L3/R3 buttons correspond to the PS1 DualShock. */
* L2/R2/L3/R3 buttons correspond to the PS1 DualShock.
* Also used as id values for RETRO_DEVICE_INDEX_ANALOG_BUTTON */
#define RETRO_DEVICE_ID_JOYPAD_B 0
#define RETRO_DEVICE_ID_JOYPAD_Y 1
#define RETRO_DEVICE_ID_JOYPAD_SELECT 2
@ -193,10 +195,11 @@ extern "C" {
#define RETRO_DEVICE_ID_JOYPAD_R3 15
/* Index / Id values for ANALOG device. */
#define RETRO_DEVICE_INDEX_ANALOG_LEFT 0
#define RETRO_DEVICE_INDEX_ANALOG_RIGHT 1
#define RETRO_DEVICE_ID_ANALOG_X 0
#define RETRO_DEVICE_ID_ANALOG_Y 1
#define RETRO_DEVICE_INDEX_ANALOG_LEFT 0
#define RETRO_DEVICE_INDEX_ANALOG_RIGHT 1
#define RETRO_DEVICE_INDEX_ANALOG_BUTTON 2
#define RETRO_DEVICE_ID_ANALOG_X 0
#define RETRO_DEVICE_ID_ANALOG_Y 1
/* Id values for MOUSE. */
#define RETRO_DEVICE_ID_MOUSE_X 0