ObjFW  Diff

Differences From Artifact [5529e3d7e0]:

To Artifact [c89b2d0c0b]:


15
16
17
18
19
20
21
22

23
24
25
26
27
28

29
30
31
32
33
34
35
15
16
17
18
19
20
21

22
23
24
25



26
27
28
29
30
31
32
33







-
+



-
-
-
+







 * 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 "OHEvdevDualSense.h"
#import "OHEvdevPlayStationGamepad.h"
#import "OFDictionary.h"
#import "OHGameControllerEmulatedTriggerButton.h"

#import "OFInvalidArgumentException.h"

@implementation OHEvdevDualSense
@implementation OHEvdevPlayStationGamepad
- (OFDictionary OF_GENERIC(OFString *, OHGameControllerButton *) *)buttons
{
	OFMutableDictionary *buttons =
	    [[_rawProfile.buttons mutableCopy] autorelease];

	[buttons setObject: self.leftTriggerButton forKey: @"L2"];
	[buttons setObject: self.rightTriggerButton forKey: @"R2"];
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
92
93
94
95
96
97
98





99
100
101
102
103







-
-
-
-
-





}

- (OHGameControllerButton *)menuButton
{
	return [_rawProfile.buttons objectForKey: @"Options"];
}

- (OHGameControllerButton *)optionsButton
{
	return [_rawProfile.buttons objectForKey: @"Create"];
}

- (OHGameControllerButton *)homeButton
{
	return [_rawProfile.buttons objectForKey: @"PS"];
}
@end