2011-01-17 19:54:58 +00:00
|
|
|
/* SSNES - A Super Nintendo Entertainment System (SNES) Emulator frontend for libsnes.
|
2011-01-23 19:29:28 +00:00
|
|
|
* Copyright (C) 2010-2011 - Hans-Kristian Arntzen
|
2011-01-06 19:01:32 +00:00
|
|
|
*
|
|
|
|
* Some code herein may be based on code found in BSNES.
|
|
|
|
*
|
|
|
|
* SSNES 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.
|
|
|
|
*
|
|
|
|
* SSNES 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 SSNES.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SSNES_SDL_INPUT_H
|
|
|
|
#define __SSNES_SDL_INPUT_H
|
|
|
|
|
2011-01-07 17:11:06 +00:00
|
|
|
#include "SDL.h"
|
2011-12-24 23:59:46 +00:00
|
|
|
#include "../general.h"
|
2011-06-10 15:34:04 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_DINPUT
|
|
|
|
#include "ssnes_dinput.h"
|
|
|
|
#endif
|
|
|
|
|
2011-01-06 19:01:32 +00:00
|
|
|
typedef struct sdl_input
|
|
|
|
{
|
2011-06-10 15:34:04 +00:00
|
|
|
#ifdef HAVE_DINPUT
|
|
|
|
sdl_dinput_t *di;
|
|
|
|
#else
|
2011-01-10 15:53:37 +00:00
|
|
|
SDL_Joystick *joysticks[MAX_PLAYERS];
|
|
|
|
unsigned num_axes[MAX_PLAYERS];
|
|
|
|
unsigned num_buttons[MAX_PLAYERS];
|
|
|
|
unsigned num_hats[MAX_PLAYERS];
|
2011-01-06 19:01:32 +00:00
|
|
|
unsigned num_joysticks;
|
2011-06-10 15:34:04 +00:00
|
|
|
#endif
|
|
|
|
|
2011-03-12 23:44:49 +00:00
|
|
|
bool use_keyboard;
|
2011-01-06 19:01:32 +00:00
|
|
|
|
2011-01-10 07:40:44 +00:00
|
|
|
int16_t mouse_x, mouse_y;
|
2011-01-10 14:01:34 +00:00
|
|
|
int16_t mouse_l, mouse_r, mouse_m;
|
2011-01-06 19:01:32 +00:00
|
|
|
} sdl_input_t;
|
|
|
|
|
|
|
|
#endif
|