Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
public class SupportedDeviceHid extends SupportedDevice {
private static final String HID_STUB_DEVICE_NAME = "HID";
private static final ImmutableList<Pattern> NAME_REGEXES =
ImmutableList.of(Pattern.compile(HID_STUB_DEVICE_NAME));
ImmutableList.of(
Pattern.compile(HID_STUB_DEVICE_NAME),
Pattern.compile("BP24-"));

@Override
public String driverCode() {
Expand Down Expand Up @@ -42,6 +44,12 @@ public Map<String, Integer> friendlyKeyNames() {
.add("DPadCenter", R.string.key_dpad_center)
.add("RockerUp", R.string.key_rocker_up)
.add("RockerDown", R.string.key_rocker_down)
.add("JoystickUp", R.string.key_JoystickUp)
.add("JoystickDown", R.string.key_JoystickDown)
.add("JoystickLeft", R.string.key_JoystickLeft)
.add("JoystickRight", R.string.key_JoystickRight)
.add("JoystickCenter", R.string.key_JoystickCenter)
.routing()
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ int KEY_MAP[][2] = {
{HID_USG_BRL_DPadDown, HID_KEY_DPadDown},
{HID_USG_BRL_DPadLeft, HID_KEY_DPadLeft},
{HID_USG_BRL_DPadRight, HID_KEY_DPadRight},
// BP24 internal pan keys.
// BP24 exposes them as Button usages 0x14 and 0x15.
{0x14, HID_KEY_DPadLeft},
{0x15, HID_KEY_DPadRight},
{HID_USG_BRL_DPadCenter, HID_KEY_DPadCenter},
{HID_USG_BRL_RockerUp, HID_KEY_RockerUp},
{HID_USG_BRL_RockerDown, HID_KEY_RockerDown},
Expand Down