#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <stddef.h>
#include <iterator>
#include "base/ranges/algorithm.h"
#include "device/gamepad/gamepad_id_list.h"
#include "device/gamepad/gamepad_standard_mappings.h"
namespace device {
namespace {
const uint16_t kDualshockPatchedBcdHidMask = …;
const uint16_t kStadiaControllerOldFirmwareVersion = …;
enum StadiaGamepadButtons { … };
enum XboxSeriesXGamepadButtons { … };
void MapperXInputStyleGamepad(const Gamepad& input, Gamepad* mapped) { … }
void MapperXboxBluetooth(const Gamepad& input, Gamepad* mapped) { … }
void MapperXboxSeriesXBluetooth(const Gamepad& input, Gamepad* mapped) { … }
void MapperXboxOneS(const Gamepad& input, Gamepad* mapped) { … }
void MapperXboxOneS2016Firmware(const Gamepad& input, Gamepad* mapped) { … }
void MapperXboxElite2Bluetooth(const Gamepad& input, Gamepad* mapped) { … }
void MapperLakeviewResearch(const Gamepad& input, Gamepad* mapped) { … }
void MapperDualshock3SixAxis(const Gamepad& input, Gamepad* mapped) { … }
void MapperDualshock3SixAxisNew(const Gamepad& input, Gamepad* mapped) { … }
void MapperDualshock4(const Gamepad& input, Gamepad* mapped) { … }
void MapperPs4Ps5(const Gamepad& input, Gamepad* mapped) { … }
void MapperDualSense(const Gamepad& input, Gamepad* mapped) { … }
void MapperIBuffalo(const Gamepad& input, Gamepad* mapped) { … }
void MapperXGEAR(const Gamepad& input, Gamepad* mapped) { … }
void MapperDragonRiseGeneric(const Gamepad& input, Gamepad* mapped) { … }
void MapperOnLiveWireless(const Gamepad& input, Gamepad* mapped) { … }
void MapperADT1(const Gamepad& input, Gamepad* mapped) { … }
void MapperNvShield(const Gamepad& input, Gamepad* mapped) { … }
void MapperNvShield2017(const Gamepad& input, Gamepad* mapped) { … }
void MapperOUYA(const Gamepad& input, Gamepad* mapped) { … }
void MapperRazerServal(const Gamepad& input, Gamepad* mapped) { … }
void MapperMoga(const Gamepad& input, Gamepad* mapped) { … }
void MapperSamsung_EI_GP20(const Gamepad& input, Gamepad* mapped) { … }
void MapperSteelSeriesZeemote(const Gamepad& input, Gamepad* mapped) { … }
void MapperSteelSeriesStratusXLUsb(const Gamepad& input, Gamepad* mapped) { … }
void MapperSteelSeriesStratusBt(const Gamepad& input, Gamepad* mapped) { … }
void MapperSteelSeriesStratusPlusBt(const Gamepad& input, Gamepad* mapped) { … }
void MapperLogitechDInput(const Gamepad& input, Gamepad* mapped) { … }
void MapperStadiaControllerOldFirmware(const Gamepad& input, Gamepad* mapped) { … }
void MapperStadiaController(const Gamepad& input, Gamepad* mapped) { … }
void MapperXSkills(const Gamepad& input, Gamepad* mapped) { … }
void MapperBoomN64Psx(const Gamepad& input, Gamepad* mapped) { … }
void MapperSnakebyteIDroidCon(const Gamepad& input, Gamepad* mapped) { … }
void MapperHoripadSwitch(const Gamepad& input, Gamepad* mapped) { … }
void MapperElecomWiredDirectInput(const Gamepad& input, Gamepad* mapped) { … }
void MapperElecomWirelessDirectInput(const Gamepad& input, Gamepad* mapped) { … }
void MapperDjiFpv(const Gamepad& input, Gamepad* mapped) { … }
void MapperAcer(const Gamepad& input, Gamepad* mapped) { … }
void MapperAcerAppMode(const Gamepad& input, Gamepad* mapped) { … }
constexpr struct MappingData { … } kAvailableMappings[] = …;
}
GamepadStandardMappingFunction GetGamepadStandardMappingFunction(
const std::string_view product_name,
const uint16_t vendor_id,
const uint16_t product_id,
const uint16_t hid_specification_version,
const uint16_t version_number,
GamepadBusType bus_type) { … }
}