Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/PsxNewLib.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ static const byte poll[] = {0x01, 0x42, 0x00, 0xFF, 0xFF};
enum PsxControllerType {
PSCTRL_UNKNOWN = 0, //!< No idea
PSCTRL_DUALSHOCK, //!< DualShock or compatible
PSCTRL_DUALSHOCK2, //!< DualShock2 or compatible
PSCTRL_DSWIRELESS, //!< Sony DualShock Wireless
PSCTRL_JOGCON, //!< Namco JogCon
PSCTRL_GUITHERO, //!< Guitar Hero controller
};

Expand Down Expand Up @@ -821,11 +823,15 @@ class PsxController {
if (in != nullptr) {
const byte& controllerType = in[3];
if (controllerType == 0x03) {
ret = PSCTRL_DUALSHOCK;
ret = PSCTRL_DUALSHOCK2;
//~ } else if (controllerType == 0x01 && in[1] == 0x42) {
//~ return 4; // ???
} else if (controllerType == 0x01 && in[1] != 0x42) {
ret = PSCTRL_GUITHERO;
} else if (controllerType == 0x01 && in[6] == 0x01) {
ret = PSCTRL_JOGCON;
//~ } else if (controllerType == 0x01 && in[1] != 0x42) {
//~ ret = PSCTRL_GUITHERO;
} else if (controllerType == 0x01) {
ret = PSCTRL_DUALSHOCK;
} else if (controllerType == 0x0C) {
ret = PSCTRL_DSWIRELESS;
}
Expand Down