2013-03-03 18:50:38 -05:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2013 - Jason Fetters
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2013-03-19 21:36:34 -04:00
|
|
|
#ifndef __IOS_RARCH_INPUT_H__
|
|
|
|
#define __IOS_RARCH_INPUT_H__
|
|
|
|
|
2013-03-03 18:50:38 -05:00
|
|
|
// Input responder
|
|
|
|
#define MAX_TOUCHES 16
|
|
|
|
#define MAX_KEYS 256
|
2013-06-19 19:05:44 -04:00
|
|
|
#define MAX_PADS 4
|
2013-03-03 18:50:38 -05:00
|
|
|
|
2013-04-04 13:06:32 -04:00
|
|
|
typedef struct
|
2013-03-03 18:50:38 -05:00
|
|
|
{
|
|
|
|
int16_t screen_x, screen_y;
|
|
|
|
int16_t fixed_x, fixed_y;
|
|
|
|
int16_t full_x, full_y;
|
2013-04-04 13:06:32 -04:00
|
|
|
} ios_touch_data_t;
|
2013-03-03 18:50:38 -05:00
|
|
|
|
2013-04-04 13:06:32 -04:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
ios_touch_data_t touches[MAX_TOUCHES];
|
|
|
|
uint32_t touch_count;
|
|
|
|
|
|
|
|
uint32_t keys[MAX_KEYS];
|
|
|
|
|
2013-06-19 19:05:44 -04:00
|
|
|
uint32_t pad_buttons[MAX_PADS];
|
|
|
|
int16_t pad_axis[MAX_PADS][4];
|
2013-04-04 13:06:32 -04:00
|
|
|
} ios_input_data_t;
|
|
|
|
|
2013-06-22 13:09:38 -04:00
|
|
|
extern ios_input_data_t g_current_input_data; //< Main thread data
|
|
|
|
extern ios_input_data_t g_polled_input_data; //< Game thread data
|
2013-04-04 13:06:32 -04:00
|
|
|
|
2013-06-22 13:09:38 -04:00
|
|
|
// Main thread only
|
|
|
|
void ios_input_enable_icade(bool on);
|
|
|
|
void ios_input_handle_key_event(unsigned keycode, bool down);
|
2013-03-19 21:36:34 -04:00
|
|
|
|
2013-03-29 20:00:42 -04:00
|
|
|
#endif
|