2014-10-25 17:56:22 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2015-01-07 16:46:50 +00:00
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
2014-10-25 17:56:22 +00:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef INPUT_CONTEXT_H__
|
|
|
|
#define INPUT_CONTEXT_H__
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <boolean.h>
|
2014-11-29 20:01:21 +00:00
|
|
|
#include "../libretro.h"
|
2014-10-25 17:56:22 +00:00
|
|
|
|
|
|
|
enum retro_rumble_effect;
|
|
|
|
|
|
|
|
struct rarch_joypad_driver
|
|
|
|
{
|
|
|
|
bool (*init)(void);
|
|
|
|
bool (*query_pad)(unsigned);
|
|
|
|
void (*destroy)(void);
|
|
|
|
bool (*button)(unsigned, uint16_t);
|
|
|
|
int16_t (*axis)(unsigned, uint32_t);
|
|
|
|
void (*poll)(void);
|
|
|
|
bool (*set_rumble)(unsigned, enum retro_rumble_effect, uint16_t);
|
|
|
|
const char *(*name)(unsigned);
|
|
|
|
|
|
|
|
const char *ident;
|
|
|
|
};
|
2014-10-25 23:09:34 +00:00
|
|
|
|
|
|
|
typedef struct rarch_joypad_driver rarch_joypad_driver_t;
|
2014-10-25 17:56:22 +00:00
|
|
|
|
2014-11-26 20:56:53 +00:00
|
|
|
const char* config_get_joypad_driver_options(void);
|
|
|
|
|
2014-10-25 17:56:22 +00:00
|
|
|
/* If ident points to NULL or a zero-length string,
|
|
|
|
* equivalent to calling input_joypad_init_first(). */
|
|
|
|
const rarch_joypad_driver_t *input_joypad_init_driver(const char *ident);
|
|
|
|
|
|
|
|
const rarch_joypad_driver_t *input_joypad_init_first(void);
|
|
|
|
|
|
|
|
extern rarch_joypad_driver_t dinput_joypad;
|
|
|
|
extern rarch_joypad_driver_t linuxraw_joypad;
|
|
|
|
extern rarch_joypad_driver_t parport_joypad;
|
|
|
|
extern rarch_joypad_driver_t udev_joypad;
|
|
|
|
extern rarch_joypad_driver_t winxinput_joypad;
|
|
|
|
extern rarch_joypad_driver_t sdl_joypad;
|
|
|
|
extern rarch_joypad_driver_t ps3_joypad;
|
|
|
|
extern rarch_joypad_driver_t psp_joypad;
|
|
|
|
extern rarch_joypad_driver_t xdk_joypad;
|
|
|
|
extern rarch_joypad_driver_t gx_joypad;
|
|
|
|
extern rarch_joypad_driver_t apple_hid_joypad;
|
|
|
|
extern rarch_joypad_driver_t apple_ios_joypad;
|
|
|
|
extern rarch_joypad_driver_t android_joypad;
|
|
|
|
extern rarch_joypad_driver_t qnx_joypad;
|
2014-10-27 13:45:28 +00:00
|
|
|
extern rarch_joypad_driver_t null_joypad;
|
2014-10-25 17:56:22 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|