Skip to content

Commit

Permalink
Merge pull request MonoGame#237 from tomspilman/develop
Browse files Browse the repository at this point in the history
Gamepad fix and default namespace
  • Loading branch information
kjpou1 committed Jan 25, 2012
2 parents ab8c416 + b0171b7 commit 0189a45
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 3 additions & 1 deletion MonoGame.Framework/Desktop/Input/GamePad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ static GamePadState ReadState(PlayerIndex index, GamePadDeadZone deadZone)
if (device == IntPtr.Zero || c == null)
return GamePadState.InitializedState;

GamePadThumbSticks sticks = new GamePadThumbSticks(new Vector2(c.LeftStick.ReadAxisPair(device)), new Vector2(c.RightStick.ReadAxisPair(device)));
var leftStick = c.LeftStick.ReadAxisPair(device);
var rightStick = c.RightStick.ReadAxisPair(device);
GamePadThumbSticks sticks = new GamePadThumbSticks(new Vector2(leftStick.X, leftStick.Y), new Vector2(rightStick.X, rightStick.Y));
sticks.ApplyDeadZone(deadZone, DeadZoneSize);
GamePadTriggers triggers = new GamePadTriggers(c.LeftTrigger.ReadFloat(device), c.RightTrigger.ReadFloat(device));
GamePadButtons buttons = new GamePadButtons(ReadButtons(device, c, DeadZoneSize));
Expand Down
2 changes: 1 addition & 1 deletion MonoGame.Framework/MonoGame.Framework.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<ProjectGuid>{7DE47032-A904-4C29-BD22-2D235E8D91BA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MonoGame.Framework</RootNamespace>
<RootNamespace>Microsoft.Xna.Framework</RootNamespace>
<AssemblyName>MonoGame.Framework.Windows</AssemblyName>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
Expand Down
5 changes: 0 additions & 5 deletions MonoGame.Framework/Windows/Input/GamePad.cs

This file was deleted.

0 comments on commit 0189a45

Please sign in to comment.