# Yet another ShanWan based controller:
# http://www.spartangear.eu/product/oplon-wired-controller-for-pc-ps3/
#
# Seems to identify and map in different ways:
#
# Debian Buster, XInput mode: 1118:654 / "Microsoft X-Box 360 pad"
#    -> "Microsoft X-Box 360 pad.cfg"
#
# Debian Buster, DInput mode: 9571:1315 / "ShanWan PS3/PC Wired GamePad"
#    -> "Spartan Gear Oplon Dinput.cfg"
#
# Lakka 2.3, both XInput & DInput modes: 8380:21760 / "ShanWan PS3/PC Wired GamePad" 
#    -> "Spartan Gear Oplon.cfg"
#    (BETOP_AX1_BFM.cfg has same VID and PID, but different device name)

input_driver = "udev"
input_device = "ShanWan PS3/PC Wired GamePad"
input_device_display_name = "Spartan Gear Oplon (DInput)"
input_vendor_id = "9571"
input_product_id = "1315"

input_b_btn = "2"
input_y_btn = "3"
input_select_btn = "8"
input_start_btn = "9"
# D-pad overlaps left analog
#input_up_axis = "-1"
#input_down_axis = "+1"
#input_left_axis = "-0"
#input_right_axis = "+0"
input_a_btn = "1"
input_x_btn = "0"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_r2_btn = "7"
input_l3_btn = "10"
input_r3_btn = "11"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
# Right analog overlaps ABXY buttons
#input_r_x_plus_btn = "1"
#input_r_x_minus_btn = "3"
#input_r_y_plus_btn = "2"
#input_r_y_minus_btn = "0"

input_b_btn_label = "Cross"
input_y_btn_label = "Square"
input_select_btn_label = "Select"
input_start_btn_label = "Start"
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"
input_a_btn_label = "Circle"
input_x_btn_label = "Triangle"
input_l_btn_label = "L1"
input_r_btn_label = "R1"
input_l2_btn_label = "L2"
input_r2_btn_label = "R2"
input_l3_btn_label = "L3"
input_r3_btn_label = "R3"
input_l_x_plus_axis_label = "Left Analog Right"
input_l_x_minus_axis_label = "Left Analog Left"
input_l_y_plus_axis_label = "Left Analog Down"
input_l_y_minus_axis_label = "Left Analog Up"
input_r_x_plus_axis_label = "Right Analog Right"
input_r_x_minus_axis_label = "Right Analog Left"
input_r_y_plus_axis_label = "Right Analog Down"
input_r_y_minus_axis_label = "Right Analog Up"
