From 675662e739d29d5a86bd6dda2ca2728ca158e075 Mon Sep 17 00:00:00 2001 From: byuu <2107894+byuu@users.noreply.github.com> Date: Sat, 21 Sep 2019 04:59:29 +0900 Subject: [PATCH] v110 Corrections for IOKit joypad driver [Sintendo] --- bsnes/emulator/emulator.hpp | 4 ++-- ruby/input/joypad/iokit.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bsnes/emulator/emulator.hpp b/bsnes/emulator/emulator.hpp index 2cdece28..0e910df3 100644 --- a/bsnes/emulator/emulator.hpp +++ b/bsnes/emulator/emulator.hpp @@ -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 { diff --git a/ruby/input/joypad/iokit.cpp b/ruby/input/joypad/iokit.cpp index 0df2e570..9a016c2d 100644 --- a/ruby/input/joypad/iokit.cpp +++ b/ruby/input/joypad/iokit.cpp @@ -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};