Corrections for IOKit joypad driver [Sintendo]
This commit is contained in:
byuu 2019-09-21 04:59:29 +09:00
parent 409dd371b9
commit 675662e739
2 changed files with 4 additions and 4 deletions

View File

@ -29,13 +29,13 @@ using namespace nall;
namespace Emulator {
static const string Name = "bsnes";
static const string Version = "109.5";
static const string Version = "110";
static const string Author = "byuu";
static const string License = "GPLv3";
static const string Website = "https://byuu.org";
//incremented only when serialization format changes
static const string SerializerVersion = "109";
static const string SerializerVersion = "110";
namespace Constants {
namespace Colorburst {

View File

@ -145,7 +145,7 @@ struct InputJoypadIOKit {
}
}
assign(jp.hid, HID::Joypad::GroupID::Hat, n * 2 + 0, x * 32767);
assign(jp.hid, HID::Joypad::GroupID::Hat, n * 2 + 1, x * 32767);
assign(jp.hid, HID::Joypad::GroupID::Hat, n * 2 + 1, y * 32767);
}
for(uint n : range(jp.buttons.size())) {
@ -247,7 +247,7 @@ private:
if(!pageNumber) return nullptr;
CFNumberRef usageNumber = CFNumberCreate(kCFAllocatorDefault, kCFNumberIntType, &usage);
if(!usageNumber) return nullptr;
if(!usageNumber) return CFRelease(pageNumber), nullptr;
const void* keys[] = {CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey)};
const void* values[] = {pageNumber, usageNumber};