Determining Which Zune Generation Your Game Is On

From XNAWiki
Jump to: navigation, search

Using the GamePad class's method for getting capabilities, you can easily determine if the Zune your game is on is a generation one or generation two device:

public enum ZuneType
{
    GenerationOne,
    GenerationTwo
}
 
public ZuneType GetZuneType()
{
    bool hasThumbstick =
             GamePad.GetCapabilities(0).HasLeftXThumbStick;
 
    return (hasThumbstick)
            ? ZuneType.GenerationTwo
            : ZuneType.GenerationOne;
}