SDL
2.0
|
#include "../../SDL_internal.h"
#include "SDL_sysjoystick_c.h"
#include "SDL_config_iphoneos.h"
#include "SDL_assert.h"
#include "SDL_events.h"
#include "SDL_joystick.h"
#include "SDL_hints.h"
#include "SDL_stdinc.h"
#include "../SDL_sysjoystick.h"
#include "../SDL_joystick_c.h"
#include "../steam/SDL_steamcontroller.h"
#include "../../events/SDL_events_c.h"
#import <CoreMotion/CoreMotion.h>
Go to the source code of this file.
Variables | |
static const char * | accelerometerName = "iOS Accelerometer" |
static CMMotionManager * | motionManager = nil |
static SDL_JoystickDeviceItem * | deviceList = NULL |
static int | numjoysticks = 0 |
static SDL_JoystickID | instancecounter = 0 |
int | SDL_AppleTVRemoteOpenedAsJoystick = 0 |
|
static |
Definition at line 66 of file SDL_sysjoystick.m.
References device, deviceList, i, recDevice::next, and NULL.
Referenced by SDL_SYS_GetInstanceIdOfDeviceIndex(), SDL_SYS_JoystickGetDeviceGUID(), SDL_SYS_JoystickNameForDeviceIndex(), and SDL_SYS_JoystickOpen().
|
static |
Definition at line 475 of file SDL_sysjoystick.m.
References motionManager, SDL_HAT_CENTERED, SDL_HAT_DOWN, SDL_HAT_LEFT, SDL_HAT_RIGHT, SDL_HAT_UP, SDL_IPHONE_MAX_GFORCE, SDL_max, SDL_min, and SDL_PrivateJoystickAxis().
Referenced by SDL_SYS_JoystickUpdate().
Definition at line 151 of file SDL_sysjoystick.m.
References recDevice::accelerometer, accelerometerName, recDevice::controller, SDL_JoystickGUID::data, device, deviceList, recDevice::guid, recDevice::instance_id, instancecounter, recDevice::name, recDevice::naxes, recDevice::nbuttons, recDevice::next, recDevice::nhats, NULL, numjoysticks, SDL_calloc, SDL_free, SDL_GetHintBoolean, SDL_HINT_TV_REMOTE_AS_JOYSTICK, SDL_memcpy, SDL_min, SDL_PrivateJoystickAdded(), SDL_strdup, SDL_strlen, SDL_SYS_AddMFIJoystickDevice(), and SDL_TRUE.
Referenced by SDL_SYS_JoystickInit().
|
static |
Definition at line 83 of file SDL_sysjoystick.m.
References recDevice::controller, SDL_JoystickGUID::data, recDevice::guid, recDevice::name, recDevice::naxes, recDevice::nbuttons, recDevice::nhats, NULL, recDevice::remote, SDL_FALSE, SDL_GetHintBoolean, SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, SDL_strdup, and SDL_TRUE.
Referenced by SDL_SYS_AddJoystickDevice().
SDL_JoystickID SDL_SYS_GetInstanceIdOfDeviceIndex | ( | int | device_index | ) |
Definition at line 409 of file SDL_sysjoystick.m.
References device, GetDeviceForIndex(), and recDevice::instance_id.
Referenced by SDL_GameControllerOpen(), and SDL_JoystickGetDeviceInstanceID().
SDL_bool SDL_SYS_JoystickAttached | ( | SDL_Joystick * | joystick | ) |
Definition at line 469 of file SDL_sysjoystick.m.
References NULL.
Referenced by SDL_JoystickGetAttached().
void SDL_SYS_JoystickClose | ( | SDL_Joystick * | joystick | ) |
Definition at line 704 of file SDL_sysjoystick.m.
References recDevice::accelerometer, recDevice::controller, device, recDevice::joystick, NULL, recDevice::remote, and SDL_AppleTVRemoteOpenedAsJoystick.
Referenced by SDL_JoystickClose().
Definition at line 395 of file SDL_sysjoystick.m.
References SDL_UpdateSteamControllers().
Referenced by SDL_JoystickUpdate().
SDL_JoystickGUID SDL_SYS_JoystickGetDeviceGUID | ( | int | device_index | ) |
Definition at line 771 of file SDL_sysjoystick.m.
References device, GetDeviceForIndex(), recDevice::guid, and SDL_zero.
Referenced by SDL_JoystickGetDeviceGUID().
SDL_JoystickGUID SDL_SYS_JoystickGetGUID | ( | SDL_Joystick * | joystick | ) |
Definition at line 784 of file SDL_sysjoystick.m.
References recDevice::guid, and SDL_zero.
Referenced by SDL_JoystickGetGUID().
int SDL_SYS_JoystickInit | ( | void | ) |
Definition at line 330 of file SDL_sysjoystick.m.
References recDevice::controller, sort_controllers::controllers, NULL, numjoysticks, SDL_AddHintCallback, SDL_FALSE, SDL_GetHintBoolean, SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, SDL_InitSteamControllers(), SDL_SYS_AddJoystickDevice(), SDL_TRUE, SteamControllerConnectedCallback(), and SteamControllerDisconnectedCallback().
Referenced by SDL_JoystickInit().
const char* SDL_SYS_JoystickNameForDeviceIndex | ( | int | device_index | ) |
Definition at line 402 of file SDL_sysjoystick.m.
References device, GetDeviceForIndex(), and recDevice::name.
Referenced by SDL_JoystickNameForIndex(), and SDL_JoystickOpen().
int SDL_SYS_JoystickOpen | ( | SDL_Joystick * | joystick, |
int | device_index | ||
) |
Definition at line 421 of file SDL_sysjoystick.m.
References recDevice::accelerometer, recDevice::controller, device, GetDeviceForIndex(), recDevice::instance_id, recDevice::joystick, motionManager, recDevice::naxes, recDevice::nbuttons, recDevice::nhats, NULL, recDevice::remote, SDL_AppleTVRemoteOpenedAsJoystick, and SDL_SetError.
Referenced by SDL_JoystickOpen().
Definition at line 734 of file SDL_sysjoystick.m.
References motionManager, NULL, numjoysticks, SDL_DelHintCallback, SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, SDL_QuitSteamControllers(), and SDL_SYS_RemoveJoystickDevice().
Referenced by SDL_JoystickQuit().
void SDL_SYS_JoystickUpdate | ( | SDL_Joystick * | joystick | ) |
Definition at line 682 of file SDL_sysjoystick.m.
References recDevice::accelerometer, recDevice::controller, device, recDevice::m_bSteamController, NULL, SDL_SYS_AccelerometerUpdate(), SDL_SYS_MFIJoystickUpdate(), and SDL_UpdateSteamController().
Referenced by SDL_JoystickOpen(), and SDL_JoystickUpdate().
|
static |
Definition at line 545 of file SDL_sysjoystick.m.
References recDevice::axes, recDevice::buttons, recDevice::controller, sort_controllers::controllers, i, SDL_arraysize, SDL_HAT_CENTERED, SDL_PRESSED, SDL_PrivateJoystickAxis(), SDL_PrivateJoystickButton(), SDL_PrivateJoystickHat(), and SDL_RELEASED.
Referenced by SDL_SYS_JoystickUpdate().
int SDL_SYS_NumJoysticks | ( | void | ) |
Definition at line 389 of file SDL_sysjoystick.m.
References numjoysticks.
Referenced by SDL_NumJoysticks().
|
static |
Definition at line 212 of file SDL_sysjoystick.m.
References recDevice::controller, sort_controllers::controllers, deviceList, recDevice::instance_id, recDevice::item, recDevice::joystick, recDevice::name, recDevice::next, NULL, numjoysticks, SDL_free, SDL_PrivateJoystickRemoved(), and SDLCALL.
Referenced by SDL_SYS_JoystickQuit(), and SteamControllerDisconnectedCallback().
|
static |
Definition at line 281 of file SDL_sysjoystick.m.
References device, deviceList, recDevice::guid, recDevice::instance_id, instancecounter, recDevice::m_bSteamController, recDevice::name, recDevice::naxes, recDevice::nbuttons, recDevice::next, recDevice::nhats, NULL, numjoysticks, SDL_calloc, SDL_FALSE, SDL_GetSteamControllerInputs(), SDL_PrivateJoystickAdded(), SDL_strdup, and SDL_TRUE.
Referenced by SDL_SYS_JoystickInit().
|
static |
Definition at line 313 of file SDL_sysjoystick.m.
References recDevice::instance_id, recDevice::item, recDevice::next, and SDL_SYS_RemoveJoystickDevice().
Referenced by SDL_SYS_JoystickInit().
|
static |
Definition at line 55 of file SDL_sysjoystick.m.
Referenced by SDL_SYS_AddJoystickDevice().
|
static |
Definition at line 59 of file SDL_sysjoystick.m.
Referenced by GetDeviceForIndex(), SDL_SYS_AddJoystickDevice(), SDL_SYS_RemoveJoystickDevice(), and SteamControllerConnectedCallback().
|
static |
Definition at line 62 of file SDL_sysjoystick.m.
Referenced by SDL_SYS_AddJoystickDevice(), and SteamControllerConnectedCallback().
|
static |
Definition at line 56 of file SDL_sysjoystick.m.
Referenced by SDL_SYS_AccelerometerUpdate(), SDL_SYS_JoystickOpen(), and SDL_SYS_JoystickQuit().
|
static |
Definition at line 61 of file SDL_sysjoystick.m.
Referenced by SDL_SYS_AddJoystickDevice(), SDL_SYS_JoystickInit(), SDL_SYS_JoystickQuit(), SDL_SYS_NumJoysticks(), SDL_SYS_RemoveJoystickDevice(), and SteamControllerConnectedCallback().
int SDL_AppleTVRemoteOpenedAsJoystick = 0 |
Definition at line 63 of file SDL_sysjoystick.m.
Referenced by SDL_SYS_JoystickClose(), and SDL_SYS_JoystickOpen().