Enum pscontroller_rs::Device [−][src]
pub enum Device { None, Unknown, ConfigurationMode, Classic(Classic), DualShock(DualShock), DualShock2(DualShock2), GuitarHero(GuitarHero), JogCon(JogCon), NegCon(NegCon), GunCon(GunCon), Baton(Baton), }
Possible devices that can be returned by the poll command to the controller. Currently, we're relying both on the device type (high nybble) and the number of 16bit words its returning (low nybble) to guess the device type.
While that's not ideal, I haven't found a better way to do this yet. It seems as though the constants to define devices rarely change so for example, the Guitar Hero controller reports in every way that it is a DualShock 1 controller. Other devices, like the DVD remote don't even support escape mode so this is the best I can do until we find a better way to get creative.
Variants
None
If pulling the device type didn't work
Unknown
A new controller type we haven't seen before
ConfigurationMode
The controller is waiting for configuration data. Users of the library should never need to see this state.
Classic(Classic)
Original controller that shipped with the PlayStation. Only contains regular buttons. DualShock 1 and 2 can emulate this mode
DualShock(DualShock)
Controller with two analog sticks. This was the final controller style shipped with the original PlayStation
DualShock2(DualShock2)
Controller that shipped with the PlayStation 2. Has dual analog sticks but also pressure senstive buttons
GuitarHero(GuitarHero)
Controller that shipped with Guitar Hero
JogCon(JogCon)
The Namco JonCon
NegCon(NegCon)
The Namco NegCon
GunCon(GunCon)
The Namco GunCon
Baton(Baton)
The Mad Maestro Baton