This is equivalent to a diff from
dcea3bad47
to a7a6705d90
Modified src/Makefile
from [6486149d8c]
to [188c5944db].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
+
|
OFData.m \
OFData+CryptographicHashing.m \
OFData+MessagePackParsing.m \
OFDate.m \
OFDictionary.m \
OFEnumerator.m \
OFFileManager.m \
OFGameController.m \
OFGZIPStream.m \
OFHMAC.m \
OFINICategory.m \
OFINIFile.m \
OFIRI.m \
OFIRIHandler.m \
OFInflate64Stream.m \
|
︙ | | |
Added src/OFGameController.h version [d675a51f7b].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
/*
* Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program 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 Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#import "OFObject.h"
#import "OFString.h"
OF_ASSUME_NONNULL_BEGIN
/** @file */
@class OFSet OF_GENERIC(ObjectType);
/**
* @brief A class for reading state from a game controller.
*/
OF_SUBCLASSING_RESTRICTED
@interface OFGameController: OFObject
#ifdef OF_HAVE_CLASS_PROPERTIES
@property (class, readonly, nonatomic) size_t numControllers;
#endif
/**
* @brief The buttons the controller has.
*/
@property (readonly, nonatomic) OFSet OF_GENERIC(OFString *) *buttons;
/**
* @brief The currently pressed buttons on the controller.
*/
@property (readonly, nonatomic) OFSet OF_GENERIC(OFString *) *pressedButtons;
/**
* @brief The number of axes the controller has.
*/
@property (readonly, nonatomic) size_t numAxes;
/**
* @brief Returns the number of available controllers.
*
* @return The number of available controllers
*/
+ (size_t)numControllers;
/**
* @brief Returns the specified controller.
*
* @param index The index of the controller to return
* @return The specified controller
*/
+ (OFGameController *)controllerWithIndex: (size_t)index;
- (instancetype)init OF_UNAVAILABLE;
/**
* @brief Returns the current position of the specified axis.
*
* The range is from (-1, -1) to (1, 1).
*
* @param index The index of the axis whose position to return
* @return The current position of the specified axis
*/
- (OFPoint)positionOfAxisWithIndex: (size_t)index;
@end
OF_ASSUME_NONNULL_END
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Added src/OFGameController.m version [fafb3475e1].
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
/*
* Copyright (c) 2008-2024 Jonathan Schleifer <js@nil.im>
*
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3.0 only,
* as published by the Free Software Foundation.
*
* This program 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 Lesser General Public License
* version 3.0 for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* version 3.0 along with this program. If not, see
* <https://www.gnu.org/licenses/>.
*/
#include "config.h"
#import "OFGameController.h"
#import "OFOutOfRangeException.h"
#if defined(OF_NINTENDO_DS)
# include "platform/NintendoDS/OFGameController.m"
#elif defined(F_NINTENDO_3DS)
# include "platform/Nintendo3DS/OFGameController.m"
#else
@implementation OFGameController
@dynamic buttons, pressedButtons, numAxes;
+ (size_t)numControllers
{
return 0;
}
+ (OFGameController *)controllerWithIndex: (size_t)index
{
@throw [OFOutOfRangeException exception];
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (OFPoint)positionOfAxisWithIndex: (size_t)index
{
OF_UNRECOGNIZED_SELECTOR
}
@end
#endif
|
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Modified src/ObjFW.h
from [11ffe4203c]
to [04ce1fb016].
︙ | | |
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
+
|
#import "OFSystemInfo.h"
#import "OFLocale.h"
#import "OFOptionsParser.h"
#import "OFTimer.h"
#import "OFRunLoop.h"
#import "OFMatrix4x4.h"
#import "OFGameController.h"
#ifdef OF_WINDOWS
# import "OFWindowsRegistryKey.h"
#endif
#import "OFAllocFailedException.h"
#import "OFAlreadyOpenException.h"
|
︙ | | |
Added src/platform/Nintendo3DS/OFGameController.m version [9240091586].