ObjFW  Check-in [4bee9b1b32]

Overview
Comment:Make GCC happy again
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4bee9b1b320597143b7d0937a239ad141382fdb34b067f309305d3ec5c0ec53e
User & Date: js on 2024-06-03 00:31:59
Other Links: manifest | tags
Context
2024-06-03
19:39
ObjFWHID: Change prefix to OH check-in: afae3291bf user: js tags: trunk
00:31
Make GCC happy again check-in: 4bee9b1b32 user: js tags: trunk
2024-06-02
23:51
Add HIDGameControllerMapping check-in: 16aab59c3c user: js tags: trunk
Changes

Modified src/hid/HIDEvdevGameController.m from [3928045f56] to [3e3a114e9f].

479
480
481
482
483
484
485
486



487
488
489
490
491
492
493
		if (name == nil)
			continue;

		button = [_mapping.buttons objectForKey: name];
		if (button == nil)
			continue;

		button.value = (OFBitSetIsSet(keyState, buttonIDs[i]) ? 1 : 0);



	}

	if (OFBitSetIsSet(_evBits, EV_ABS)) {
		for (size_t i = 0; i < sizeof(axisIDs) / sizeof(*axisIDs);
		    i++) {
			struct input_absinfo info;
			OFString *name;







|
>
>
>







479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
		if (name == nil)
			continue;

		button = [_mapping.buttons objectForKey: name];
		if (button == nil)
			continue;

		if (OFBitSetIsSet(keyState, buttonIDs[i]))
			button.value = 1.f;
		else
			button.value = 0.f;
	}

	if (OFBitSetIsSet(_evBits, EV_ABS)) {
		for (size_t i = 0; i < sizeof(axisIDs) / sizeof(*axisIDs);
		    i++) {
			struct input_absinfo info;
			OFString *name;
562
563
564
565
566
567
568

569


570
571
572
573
574
575
576
			if (name == nil)
				continue;

			button = [_mapping.buttons objectForKey: name];
			if (button == nil)
				continue;


			button.value = (event.value ? 1 : 0);



			break;
		case EV_ABS:
			name = axisToName(event.code);
			if (name == nil)
				continue;








>
|
>
>







565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
			if (name == nil)
				continue;

			button = [_mapping.buttons objectForKey: name];
			if (button == nil)
				continue;

			if (event.value)
				button.value = 1.f;
			else
				button.value = 0.f;

			break;
		case EV_ABS:
			name = axisToName(event.code);
			if (name == nil)
				continue;

Modified src/hid/HIDGameControllerMapping.m from [5697f19019] to [16d8c69c01].

16
17
18
19
20
21
22

23
24
25
26
27
28
29
 * version 3.0 along with this program. If not, see
 * <https://www.gnu.org/licenses/>.
 */

#include "config.h"

#import "HIDGameControllerMapping.h"


@implementation HIDGameControllerMapping: OFObject
@synthesize buttons = _buttons, axes = _axes;
@synthesize directionalPads = _directionalPads;

- (void)dealloc
{







>







16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 * version 3.0 along with this program. If not, see
 * <https://www.gnu.org/licenses/>.
 */

#include "config.h"

#import "HIDGameControllerMapping.h"
#import "OFDictionary.h"

@implementation HIDGameControllerMapping: OFObject
@synthesize buttons = _buttons, axes = _axes;
@synthesize directionalPads = _directionalPads;

- (void)dealloc
{