Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/sdl/joystick/apple/SDL_mfijoystick_c.h
9913 views
1
/*
2
Simple DirectMedia Layer
3
Copyright (C) 1997-2025 Sam Lantinga <[email protected]>
4
5
This software is provided 'as-is', without any express or implied
6
warranty. In no event will the authors be held liable for any damages
7
arising from the use of this software.
8
9
Permission is granted to anyone to use this software for any purpose,
10
including commercial applications, and to alter it and redistribute it
11
freely, subject to the following restrictions:
12
13
1. The origin of this software must not be misrepresented; you must not
14
claim that you wrote the original software. If you use this software
15
in a product, an acknowledgment in the product documentation would be
16
appreciated but is not required.
17
2. Altered source versions must be plainly marked as such, and must not be
18
misrepresented as being the original software.
19
3. This notice may not be removed or altered from any source distribution.
20
*/
21
#include "SDL_internal.h"
22
23
#ifndef SDL_JOYSTICK_IOS_H
24
#define SDL_JOYSTICK_IOS_H
25
26
#include "../SDL_sysjoystick.h"
27
28
#import <CoreFoundation/CoreFoundation.h>
29
#import <Foundation/Foundation.h>
30
31
@class GCController;
32
33
typedef struct joystick_hwdata
34
{
35
GCController __unsafe_unretained *controller;
36
void *rumble;
37
int pause_button_index;
38
Uint64 pause_button_pressed;
39
40
char *name;
41
SDL_Joystick *joystick;
42
SDL_JoystickID instance_id;
43
SDL_GUID guid;
44
45
int naxes;
46
int nbuttons;
47
int nhats;
48
Uint32 button_mask;
49
bool is_xbox;
50
bool is_ps4;
51
bool is_ps5;
52
bool is_switch_pro;
53
bool is_switch_joycon_pair;
54
bool is_switch_joyconL;
55
bool is_switch_joyconR;
56
bool is_stadia;
57
bool is_backbone_one;
58
int is_siri_remote;
59
60
NSArray __unsafe_unretained *axes;
61
NSArray __unsafe_unretained *buttons;
62
63
bool has_dualshock_touchpad;
64
bool has_xbox_paddles;
65
bool has_xbox_share_button;
66
bool has_nintendo_buttons;
67
68
struct joystick_hwdata *next;
69
} joystick_hwdata;
70
71
typedef joystick_hwdata SDL_JoystickDeviceItem;
72
73
#endif // SDL_JOYSTICK_IOS_H
74
75