git.y1.nz

SameBoy

Accurate GB/GBC emulator
download: https://git.y1.nz/archives/sameboy.tar.gz
README | Files | Log | Refs | LICENSE

commit ceacc226bc3e988db6c6453a5b429a8b0ca38175
parent 23e8cc58c55fe4e51c07d0329bb7e1bd1cd5f4e3
Author: Lior Halphon <LIJI32@gmail.com>
Date:   Wed, 23 Jun 2021 21:21:53 +0300

Fixed Switch Pro Controller in USB mode

Diffstat:
MJoyKit/ControllerConfiguration.inc5++---
MJoyKit/JOYController.m4++--
2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/JoyKit/ControllerConfiguration.inc b/JoyKit/ControllerConfiguration.inc @@ -442,10 +442,9 @@ hacksByName = @{ @{@"reportID": @(1), @"size":@12, @"offset":@76, @"usagePage":@(kHIDPage_GenericDesktop), @"usage":@(kHIDUsage_GD_Ry), @"min": @0xFFF, @"max": @0}, ], }, + + JOYIgnoredReports: @[@(0x30)], // Ignore the real 0x30 report as it's broken }, - - JOYIgnoredReports: @(0x30), // Ignore the real 0x30 report as it's broken - @"PLAYSTATION(R)3 Controller": @{ // DualShock 3 JOYAxisGroups: @{ @(kHIDUsage_GD_X): @(0), diff --git a/JoyKit/JOYController.m b/JoyKit/JOYController.m @@ -451,8 +451,8 @@ typedef union { id previous = nil; NSSet *ignoredReports = nil; - if (hacks[ignoredReports]) { - ignoredReports = [NSSet setWithArray:hacks[ignoredReports]]; + if (hacks[JOYIgnoredReports]) { + ignoredReports = [NSSet setWithArray:hacks[JOYIgnoredReports]]; } for (id _element in array) {

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.