2012-04-21 23:13:50 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2012-01-08 01:08:18 +01:00
|
|
|
* Copyright (C) 2010-2012 - Hans-Kristian Arntzen
|
2011-01-06 20:01:32 +01:00
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2011-01-06 20:01:32 +01:00
|
|
|
* 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.
|
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2011-01-06 20:01:32 +01:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 23:31:57 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2011-01-06 20:01:32 +01:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2012-04-21 23:25:32 +02:00
|
|
|
#ifndef __RARCH_SDL_INPUT_H
|
|
|
|
#define __RARCH_SDL_INPUT_H
|
2011-01-06 20:01:32 +01:00
|
|
|
|
2011-01-07 18:11:06 +01:00
|
|
|
#include "SDL.h"
|
2011-12-25 00:59:46 +01:00
|
|
|
#include "../general.h"
|
2011-06-10 17:34:04 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_DINPUT
|
2012-04-21 23:25:32 +02:00
|
|
|
#include "rarch_dinput.h"
|
2011-06-10 17:34:04 +02:00
|
|
|
#endif
|
|
|
|
|
2011-01-06 20:01:32 +01:00
|
|
|
typedef struct sdl_input
|
|
|
|
{
|
2011-06-10 17:34:04 +02:00
|
|
|
#ifdef HAVE_DINPUT
|
|
|
|
sdl_dinput_t *di;
|
|
|
|
#else
|
2011-01-10 16:53:37 +01:00
|
|
|
SDL_Joystick *joysticks[MAX_PLAYERS];
|
|
|
|
unsigned num_axes[MAX_PLAYERS];
|
|
|
|
unsigned num_buttons[MAX_PLAYERS];
|
|
|
|
unsigned num_hats[MAX_PLAYERS];
|
2011-01-06 20:01:32 +01:00
|
|
|
unsigned num_joysticks;
|
2011-06-10 17:34:04 +02:00
|
|
|
#endif
|
|
|
|
|
2011-03-13 00:44:49 +01:00
|
|
|
bool use_keyboard;
|
2011-01-06 20:01:32 +01:00
|
|
|
|
2011-01-10 08:40:44 +01:00
|
|
|
int16_t mouse_x, mouse_y;
|
2011-01-10 15:01:34 +01:00
|
|
|
int16_t mouse_l, mouse_r, mouse_m;
|
2011-01-06 20:01:32 +01:00
|
|
|
} sdl_input_t;
|
|
|
|
|
|
|
|
#endif
|