# This configuration is for when the controller is connected by Bluetooth, and there's a corresponding one for when it is connected by USB.
#
# It's best to use this controller in DirectInput mode (which the manual calls "Android (D - input)") rather than XInput mode because in XInput mode it identifies itself using a generic product ID and a generic name that is shared with other 8BitDo controllers. That means that it's impossible to change the RetroArch configuration for it without also affecting the configuration of other 8BitDo controllers that have different layouts. In DirectInput mode the controller uses a unique product ID so we can recognize and configure it distinctly.
# The RetroPad layout has four face buttons, whereas the M30 has six. We map the M30's L and R buttons to the RetroPad's triggers, and map the M30's Z and C buttons to the RetroPad's left and right shoulder buttons respectively. That may seem somewhat counterintuitive but it follows the convention that is used in many cores for systems that have six face buttons in this layout. That allows the controller to be autoconfigured and work in the natural way in the Beetle Saturn core, and in 6-button fighting games in the FinalBurn Neo and MAME cores.