The Select and Start buttons are erroneously swapped in the Mahjong controller. In the code snippet below (from NstApiInput.hpp), the values for the associated constants need to be swapped to fix this. In fact, just like the standard gamepad controller, Select appears to the left of Start on the Mahjong controller and all of the other constants in the snippet below are ordered in the same left-to-right button ordering as that appears on the actual controller, with the exception of Select and Start.
Code:
/**
* Mahjong.
*/
struct Mahjong
{
enum
{
PART_1 = 0x02,
PART_1_I = 0x80,
PART_1_J = 0x40,
PART_1_K = 0x20,
PART_1_L = 0x10,
PART_1_M = 0x08,
PART_1_N = 0x04,
PART_2 = 0x04,
PART_2_A = 0x80,
PART_2_B = 0x40,
PART_2_C = 0x20,
PART_2_D = 0x10,
PART_2_E = 0x08,
PART_2_F = 0x04,
PART_2_G = 0x02,
PART_2_H = 0x01,
PART_3 = 0x06,
PART_3_START = 0x80,
PART_3_SELECT = 0x40,
PART_3_KAN = 0x20,
PART_3_PON = 0x10,
PART_3_CHI = 0x08,
PART_3_REACH = 0x04,
PART_3_RON = 0x02,
NUM_PARTS = 3
};
uint buttons;
Mahjong()
: buttons(0) {}
typedef bool (NST_CALLBACK *PollCallback) (void*,Mahjong&,uint);
static PollCaller2<Mahjong> callback;
};
* Mahjong.
*/
struct Mahjong
{
enum
{
PART_1 = 0x02,
PART_1_I = 0x80,
PART_1_J = 0x40,
PART_1_K = 0x20,
PART_1_L = 0x10,
PART_1_M = 0x08,
PART_1_N = 0x04,
PART_2 = 0x04,
PART_2_A = 0x80,
PART_2_B = 0x40,
PART_2_C = 0x20,
PART_2_D = 0x10,
PART_2_E = 0x08,
PART_2_F = 0x04,
PART_2_G = 0x02,
PART_2_H = 0x01,
PART_3 = 0x06,
PART_3_START = 0x80,
PART_3_SELECT = 0x40,
PART_3_KAN = 0x20,
PART_3_PON = 0x10,
PART_3_CHI = 0x08,
PART_3_REACH = 0x04,
PART_3_RON = 0x02,
NUM_PARTS = 3
};
uint buttons;
Mahjong()
: buttons(0) {}
typedef bool (NST_CALLBACK *PollCallback) (void*,Mahjong&,uint);
static PollCaller2<Mahjong> callback;
};