SDL
2.0
|
#include "../../SDL_internal.h"
#include "SDL_sysjoystick_c.h"
#include "../../../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 "../../events/SDL_events_c.h"
#import <CoreMotion/CoreMotion.h>
#import <GameController/GameController.h>
#include <Availability.h>
#include <objc/message.h>
Go to the source code of this file.
Data Structures | |
category | GCExtendedGamepad(SDL) |
category | GCMicroGamepad(SDL) |
Functions | |
static SDL_JoystickDeviceItem * | GetDeviceForIndex (int device_index) |
static void | IOS_AddMFIJoystickDevice (SDL_JoystickDeviceItem *device, GCController *controller) |
static void | IOS_AddJoystickDevice (GCController *controller, SDL_bool accelerometer) |
static SDL_JoystickDeviceItem * | IOS_RemoveJoystickDevice (SDL_JoystickDeviceItem *device) |
static int | IOS_JoystickInit (void) |
static int | IOS_JoystickGetCount (void) |
static void | IOS_JoystickDetect (void) |
static const char * | IOS_JoystickGetDeviceName (int device_index) |
static int | IOS_JoystickGetDevicePlayerIndex (int device_index) |
static void | IOS_JoystickSetDevicePlayerIndex (int device_index, int player_index) |
static SDL_JoystickGUID | IOS_JoystickGetDeviceGUID (int device_index) |
static SDL_JoystickID | IOS_JoystickGetDeviceInstanceID (int device_index) |
static int | IOS_JoystickOpen (SDL_Joystick *joystick, int device_index) |
static void | IOS_AccelerometerUpdate (SDL_Joystick *joystick) |
static Uint8 | IOS_MFIJoystickHatStateForDPad (GCControllerDirectionPad *dpad) |
static void | IOS_MFIJoystickUpdate (SDL_Joystick *joystick) |
static int | IOS_JoystickRumble (SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) |
static void | IOS_JoystickUpdate (SDL_Joystick *joystick) |
static void | IOS_JoystickClose (SDL_Joystick *joystick) |
static void | IOS_JoystickQuit (void) |
Variables | |
static id | connectObserver = nil |
static id | disconnectObserver = nil |
static const char * | accelerometerName = "iOS Accelerometer" |
static CMMotionManager * | motionManager = nil |
static SDL_JoystickDeviceItem * | deviceList = NULL |
static int | numjoysticks = 0 |
int | SDL_AppleTVRemoteOpenedAsJoystick = 0 |
SDL_JoystickDriver | SDL_IOS_JoystickDriver |
|
static |
Definition at line 87 of file SDL_sysjoystick.m.
References device, deviceList, i, and NULL.
Referenced by IOS_JoystickGetDeviceGUID(), IOS_JoystickGetDeviceInstanceID(), IOS_JoystickGetDeviceName(), IOS_JoystickGetDevicePlayerIndex(), IOS_JoystickOpen(), and IOS_JoystickSetDevicePlayerIndex().
|
static |
Definition at line 552 of file SDL_sysjoystick.m.
References motionManager, SDL_IPHONE_MAX_GFORCE, SDL_max, SDL_min, and SDL_PrivateJoystickAxis().
Referenced by IOS_JoystickUpdate().
Definition at line 262 of file SDL_sysjoystick.m.
References accelerometerName, device, deviceList, IOS_AddMFIJoystickDevice(), recDevice::next, NULL, numjoysticks, SDL_calloc, SDL_free, SDL_GetHintBoolean, SDL_GetNextJoystickInstanceID(), SDL_HINT_TV_REMOTE_AS_JOYSTICK, SDL_memcpy, SDL_min, SDL_PrivateJoystickAdded(), SDL_strdup, SDL_strlen, and SDL_TRUE.
Referenced by IOS_JoystickInit().
|
static |
Definition at line 104 of file SDL_sysjoystick.m.
References GCExtendedGamepad(SDL)::buttonOptions, device, FALSE, GCExtendedGamepad(SDL)::leftThumbstickButton, NULL, GCExtendedGamepad(SDL)::rightThumbstickButton, SDL_CONTROLLER_BUTTON_A, SDL_CONTROLLER_BUTTON_B, SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSHOULDER, SDL_CONTROLLER_BUTTON_LEFTSTICK, SDL_CONTROLLER_BUTTON_RIGHTSHOULDER, SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_START, SDL_CONTROLLER_BUTTON_X, SDL_CONTROLLER_BUTTON_Y, SDL_FALSE, SDL_GetHintBoolean, SDL_HARDWARE_BUS_BLUETOOTH, SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, SDL_strdup, SDL_SwapLE16, and SDL_TRUE.
Referenced by IOS_AddJoystickDevice().
|
static |
Definition at line 783 of file SDL_sysjoystick.m.
References device, NULL, and SDL_AppleTVRemoteOpenedAsJoystick.
Definition at line 455 of file SDL_sysjoystick.m.
|
static |
Definition at line 449 of file SDL_sysjoystick.m.
References numjoysticks.
|
static |
Definition at line 483 of file SDL_sysjoystick.m.
References device, GetDeviceForIndex(), and SDL_zero.
|
static |
|
static |
|
static |
|
static |
Definition at line 393 of file SDL_sysjoystick.m.
References connectObserver, sort_controllers::controllers, disconnectObserver, IOS_AddJoystickDevice(), NULL, SDL_AddHintCallback, SDL_FALSE, SDL_GetHintBoolean, SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION, and SDL_TRUE.
|
static |
Definition at line 503 of file SDL_sysjoystick.m.
References device, GetDeviceForIndex(), motionManager, NULL, SDL_AppleTVRemoteOpenedAsJoystick, and SDL_SetError.
Definition at line 812 of file SDL_sysjoystick.m.
References connectObserver, deviceList, disconnectObserver, IOS_RemoveJoystickDevice(), motionManager, NULL, numjoysticks, SDL_DelHintCallback, and SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION.
|
static |
Definition at line 761 of file SDL_sysjoystick.m.
References SDL_Unsupported.
|
static |
|
static |
Definition at line 767 of file SDL_sysjoystick.m.
References device, IOS_AccelerometerUpdate(), IOS_MFIJoystickUpdate(), and NULL.
|
static |
Definition at line 597 of file SDL_sysjoystick.m.
References SDL_HAT_CENTERED, SDL_HAT_DOWN, SDL_HAT_LEFT, SDL_HAT_RIGHT, and SDL_HAT_UP.
Referenced by IOS_MFIJoystickUpdate().
|
static |
Definition at line 622 of file SDL_sysjoystick.m.
References i, IOS_MFIJoystickHatStateForDPad(), SDL_arraysize, SDL_CONTROLLER_BUTTON_BACK, SDL_CONTROLLER_BUTTON_LEFTSTICK, SDL_CONTROLLER_BUTTON_RIGHTSTICK, SDL_CONTROLLER_BUTTON_START, SDL_HAT_CENTERED, SDL_PRESSED, SDL_PrivateJoystickAxis(), SDL_PrivateJoystickButton(), SDL_PrivateJoystickHat(), and SDL_RELEASED.
Referenced by IOS_JoystickUpdate().
|
static |
Definition at line 323 of file SDL_sysjoystick.m.
References device, deviceList, recDevice::next, NULL, numjoysticks, SDL_free, and SDL_PrivateJoystickRemoved().
Referenced by IOS_JoystickQuit().
|
static |
Definition at line 77 of file SDL_sysjoystick.m.
Referenced by IOS_AddJoystickDevice().
|
static |
Definition at line 49 of file SDL_sysjoystick.m.
Referenced by IOS_JoystickInit(), and IOS_JoystickQuit().
|
static |
Definition at line 81 of file SDL_sysjoystick.m.
Referenced by GetDeviceForIndex(), IOS_AddJoystickDevice(), IOS_JoystickQuit(), and IOS_RemoveJoystickDevice().
|
static |
Definition at line 50 of file SDL_sysjoystick.m.
Referenced by IOS_JoystickInit(), and IOS_JoystickQuit().
|
static |
Definition at line 78 of file SDL_sysjoystick.m.
Referenced by IOS_AccelerometerUpdate(), IOS_JoystickOpen(), and IOS_JoystickQuit().
|
static |
Definition at line 83 of file SDL_sysjoystick.m.
Referenced by IOS_AddJoystickDevice(), IOS_JoystickGetCount(), IOS_JoystickQuit(), and IOS_RemoveJoystickDevice().
int SDL_AppleTVRemoteOpenedAsJoystick = 0 |
Definition at line 84 of file SDL_sysjoystick.m.
Referenced by IOS_JoystickClose(), and IOS_JoystickOpen().
SDL_JoystickDriver SDL_IOS_JoystickDriver |
Definition at line 846 of file SDL_sysjoystick.m.