public static void GetAnalogEnums(RETRO_DEVICE_INDEX_ANALOG index, RETRO_DEVICE_ID_ANALOG direction, out RetroAnalogDevice positive, out RetroAnalogDevice negative) { if (index == RETRO_DEVICE_INDEX_ANALOG.LEFT) { if (direction == RETRO_DEVICE_ID_ANALOG.X) { positive = RetroAnalogDevice.LeftThumbRight; negative = RetroAnalogDevice.LeftThumbLeft; } else { //Libretro defines positive Y values as down positive = RetroAnalogDevice.LeftThumbDown; negative = RetroAnalogDevice.LeftThumbUp; } } else { if (direction == RETRO_DEVICE_ID_ANALOG.X) { positive = RetroAnalogDevice.RightThumbRight; negative = RetroAnalogDevice.RightThumbLeft; } else { //Libretro defines positive Y values as down positive = RetroAnalogDevice.RightThumbDown; negative = RetroAnalogDevice.RightThumbUp; } } }
public void MapAnalog(RetroAnalogDevice retroAnalog, DeviceInput deviceInput) { _analogMappings[retroAnalog] = deviceInput; }