# If RetroArch do NOT detect a controller when connected via Bluetooth and won't even recognize manual binding, 
# the cause is most likely SDL (Simple DirectMedia Layer) NOT recognizing the controller as a joystick. 
# To fix this you need to add udev rules to force detection - https://hg.libsdl.org/SDL/file/704a0bfecf75/README-linux.txt
# -------------------------------------------------------------------------------------------------------------------------------------------------
# Fix it by adding this udev rule (the line below WITHOUT the # symbol at the beginning!) to "/etc/udev/rules.d/10-local.rules" and reboot.
# SUBSYSTEM=="input", ATTRS{name}=="8Bitdo SNES30 GamePad", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1"
# -------------------------------------------------------------------------------------------------------------------------------------------------

input_device = "8Bitdo SNES30 GamePad"
input_driver = "udev"

# Hex vid:pid = 2820:0009 -> Decimal vid:pid = 10272:9
input_vendor_id = 10272
input_product_id = 9

input_b_btn = "12"
input_y_btn = "15"
input_select_btn = "21"
input_start_btn = "22"
input_a_btn = "11"
input_x_btn = "14"
input_l_btn = "17"
input_r_btn = "18"

input_b_btn_label = "B"
input_y_btn_label = "Y"
input_select_btn_label = "Select"
input_start_btn_label = "Start"
input_a_btn_label = "A"
input_x_btn_label = "X"
input_l_btn_label = "L"
input_r_btn_label = "R"

# Bluetooth Mode(START) D-pad = Keyboard arrow keys
input_up_btn = "0"
input_down_btn = "5"
input_left_btn = "2"
input_right_btn = "3"

input_up_btn_label = "D-Pad Up"
input_down_btn_label = "D-Pad Down"
input_left_btn_label = "D-Pad Left"
input_right_btn_label = "D-Pad Right"
