forked from MonoGame/MonoGame
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gamepad support implemented for Win/Lin/OSX
- Loading branch information
Showing
11 changed files
with
342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
|
||
namespace Microsoft.Xna.Framework.Input | ||
{ | ||
// Summary: | ||
// Specifies a type of dead zone processing to apply to Xbox 360 Controller | ||
// analog sticks when calling GetState. | ||
// | ||
// Parameters: | ||
// Circular: | ||
// The combined X and Y position of each stick is compared to the dead zone. | ||
// This provides better control than IndependentAxes when the stick is used | ||
// as a two-dimensional control surface, such as when controlling a character's | ||
// view in a first-person game. | ||
// | ||
// IndependentAxes: | ||
// The X and Y positions of each stick are compared against the dead zone independently. | ||
// This setting is the default when calling GetState. | ||
// | ||
// None: | ||
// The values of each stick are not processed and are returned by GetState as | ||
// "raw" values. This is best if you intend to implement your own dead zone | ||
// processing. | ||
public enum GamePadDeadZone | ||
{ | ||
None, | ||
IndependentAxes, | ||
Circular | ||
}; | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?xml version="1.0"?> | ||
<configuration> | ||
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client"/></startup></configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
These files can be used for commercial and non-commercial projects that makes use of MonoGame. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<configuration> | ||
<dllmap dll="SDL.dll" os="windows" target="SDL.dll"/> | ||
<dllmap dll="SDL.dll" os="osx" target="/Library/Frameworks/SDL.framework/SDL" /> | ||
<dllmap dll="SDL.dll" os="!windows,osx" target="libSDL-1.2.so.0"/> | ||
|
||
<dllmap dll="SDL_image.dll" os="windows" target="SDL_image.dll"/> | ||
<dllmap dll="SDL_image.dll" os="osx" target="/Library/Frameworks/SDL_image.framework/SDL_image" /> | ||
<dllmap dll="SDL_image.dll" os="!windows,osx" target="libSDL_image-1.2.so.0" /> | ||
|
||
<dllmap dll="SDL_mixer.dll" os="windows" target="SDL_mixer.dll"/> | ||
<dllmap dll="SDL_mixer.dll" os="osx" target="/Library/Frameworks/SDL_mixer.framework/SDL_mixer" /> | ||
<dllmap dll="SDL_mixer.dll" os="!windows,osx" target="libSDL_mixer-1.2.so.0" /> | ||
|
||
<dllmap dll="SDL_ttf.dll" os="windows" target="SDL_ttf.dll"/> | ||
<dllmap dll="SDL_ttf.dll" os="osx" target="/Library/Frameworks/SDL_ttf.framework/SDL_ttf" /> | ||
<dllmap dll="SDL_ttf.dll" os="!windows,osx" target="libSDL_ttf-2.0.so.0" /> | ||
|
||
<dllmap dll="SDL_net.dll" os="windows" target="SDL_net.dll"/> | ||
<dllmap dll="SDL_net.dll" os="osx" target="/Library/Frameworks/SDL_net.framework/SDL_net" /> | ||
<dllmap dll="SDL_net.dll" os="!windows,osx" target="libSDL_net-1.2.so.0" /> | ||
|
||
<dllmap dll="smpeg.dll" os="windows" target="smpeg.dll"/> | ||
<dllmap dll="smpeg.dll" os="osx" target="/Library/Frameworks/smpeg.framework/smpeg" /> | ||
<dllmap dll="smpeg.dll" os="!windows,osx" target="libsmpeg-0.4.so.0" /> | ||
|
||
<dllmap dll="SDL_gfx.dll" os="windows" target="SDL_gfx.dll"/> | ||
<dllmap dll="SDL_gfx.dll" os="osx" target="/Library/Frameworks/SDL_gfx.framework/SDL_gfx" /> | ||
<dllmap dll="SDL_gfx.dll" os="!windows,osx" target="libSDL_gfx.so.13" /> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
<?xml version="1.0"?> | ||
<PadConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<JoystickName>潃瑮潲汬牥⠠托硯㌠〶圠物汥獥敒散癩牥映牯圠湩潤獷)</JoystickName> | ||
<ID>0</ID> | ||
<LeftStick> | ||
<X> | ||
<Negative> | ||
<ID>0</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>0</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</X> | ||
<Y> | ||
<Negative> | ||
<ID>1</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>1</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</Y> | ||
<Press> | ||
<ID>8</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Press> | ||
</LeftStick> | ||
<RightStick> | ||
<X> | ||
<Negative> | ||
<ID>0</ID> | ||
<Type>None</Type> | ||
<Negative>false</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>0</ID> | ||
<Type>None</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</X> | ||
<Y> | ||
<Negative> | ||
<ID>0</ID> | ||
<Type>None</Type> | ||
<Negative>false</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>0</ID> | ||
<Type>None</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</Y> | ||
<Press> | ||
<ID>9</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Press> | ||
</RightStick> | ||
<Dpad> | ||
<Up> | ||
<ID>0</ID> | ||
<Type>PovUp</Type> | ||
<Negative>false</Negative> | ||
</Up> | ||
<Down> | ||
<ID>0</ID> | ||
<Type>PovDown</Type> | ||
<Negative>false</Negative> | ||
</Down> | ||
<Left> | ||
<ID>0</ID> | ||
<Type>PovLeft</Type> | ||
<Negative>false</Negative> | ||
</Left> | ||
<Right> | ||
<ID>0</ID> | ||
<Type>PovRight</Type> | ||
<Negative>false</Negative> | ||
</Right> | ||
</Dpad> | ||
<Button_A> | ||
<ID>0</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_A> | ||
<Button_B> | ||
<ID>1</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_B> | ||
<Button_X> | ||
<ID>2</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_X> | ||
<Button_Y> | ||
<ID>3</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Y> | ||
<Button_LB> | ||
<ID>4</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_LB> | ||
<Button_RB> | ||
<ID>5</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_RB> | ||
<Button_Start> | ||
<ID>7</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Start> | ||
<Button_Back> | ||
<ID>6</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Back> | ||
<LeftTrigger> | ||
<ID>2</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</LeftTrigger> | ||
<RightTrigger> | ||
<ID>2</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</RightTrigger> | ||
</PadConfig> |
139 changes: 139 additions & 0 deletions
139
ThirdParty/GamepadConfig/Xbox 360 Wireless Receiver.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<PadConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
<JoystickName>Xbox 360 Wireless Receiver</JoystickName> | ||
<ID>0</ID> | ||
<LeftStick> | ||
<X> | ||
<Negative> | ||
<ID>0</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>0</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</X> | ||
<Y> | ||
<Negative> | ||
<ID>1</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>1</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</Y> | ||
<Press> | ||
<ID>9</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Press> | ||
</LeftStick> | ||
<RightStick> | ||
<X> | ||
<Negative> | ||
<ID>3</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>3</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</X> | ||
<Y> | ||
<Negative> | ||
<ID>4</ID> | ||
<Type>Axis</Type> | ||
<Negative>true</Negative> | ||
</Negative> | ||
<Positive> | ||
<ID>4</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</Positive> | ||
</Y> | ||
<Press> | ||
<ID>10</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Press> | ||
</RightStick> | ||
<Dpad> | ||
<Up> | ||
<ID>13</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Up> | ||
<Down> | ||
<ID>14</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Down> | ||
<Left> | ||
<ID>11</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Left> | ||
<Right> | ||
<ID>12</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Right> | ||
</Dpad> | ||
<Button_A> | ||
<ID>0</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_A> | ||
<Button_B> | ||
<ID>1</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_B> | ||
<Button_X> | ||
<ID>2</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_X> | ||
<Button_Y> | ||
<ID>3</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Y> | ||
<Button_LB> | ||
<ID>4</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_LB> | ||
<Button_RB> | ||
<ID>5</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_RB> | ||
<Button_Start> | ||
<ID>7</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Start> | ||
<Button_Back> | ||
<ID>6</ID> | ||
<Type>Button</Type> | ||
<Negative>false</Negative> | ||
</Button_Back> | ||
<LeftTrigger> | ||
<ID>2</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</LeftTrigger> | ||
<RightTrigger> | ||
<ID>5</ID> | ||
<Type>Axis</Type> | ||
<Negative>false</Negative> | ||
</RightTrigger> | ||
</PadConfig> |