Browse Source

Merge branch 'master' of github.com:CartBlanche/MonoGame-Samples

Dominique Louis 13 years ago
parent
commit
ab0b9a1be4
45 changed files with 1930 additions and 0 deletions
  1. 82 0
      Samples/MacOS/InputReporter/ChargeSwitch.cs
  2. 29 0
      Samples/MacOS/InputReporter/ChargeSwitchDeadZone.cs
  3. 29 0
      Samples/MacOS/InputReporter/ChargeSwitchExit.cs
  4. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/DataActiveFont.spritefont
  5. BIN
      Samples/MacOS/InputReporter/Content/Fonts/DataActiveFont.xnb
  6. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/DataFont.spritefont
  7. BIN
      Samples/MacOS/InputReporter/Content/Fonts/DataFont.xnb
  8. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/InstructionsActiveFont.spritefont
  9. BIN
      Samples/MacOS/InputReporter/Content/Fonts/InstructionsActiveFont.xnb
  10. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/InstructionsFont.spritefont
  11. BIN
      Samples/MacOS/InputReporter/Content/Fonts/InstructionsFont.xnb
  12. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/TitleFont.spritefont
  13. BIN
      Samples/MacOS/InputReporter/Content/Fonts/TitleFont.xnb
  14. 48 0
      Samples/MacOS/InputReporter/Content/Fonts/TypeFont.spritefont
  15. BIN
      Samples/MacOS/InputReporter/Content/Fonts/TypeFont.xnb
  16. BIN
      Samples/MacOS/InputReporter/Content/Textures/background.jpg
  17. BIN
      Samples/MacOS/InputReporter/Content/Textures/background.xnb
  18. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller1.png
  19. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller1.xnb
  20. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller2.png
  21. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller2.xnb
  22. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller3.png
  23. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller3.xnb
  24. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller4.png
  25. BIN
      Samples/MacOS/InputReporter/Content/Textures/connected_controller4.xnb
  26. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller1.png
  27. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller1.xnb
  28. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller2.png
  29. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller2.xnb
  30. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller3.png
  31. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller3.xnb
  32. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller4.png
  33. BIN
      Samples/MacOS/InputReporter/Content/Textures/select_controller4.xnb
  34. BIN
      Samples/MacOS/InputReporter/Game.ico
  35. 16 0
      Samples/MacOS/InputReporter/Info.plist
  36. 98 0
      Samples/MacOS/InputReporter/InputReporter.csproj
  37. BIN
      Samples/MacOS/InputReporter/InputReporter.png
  38. 604 0
      Samples/MacOS/InputReporter/InputReporterGame.cs
  39. 342 0
      Samples/MacOS/InputReporter/InputReporterResources.Designer.cs
  40. BIN
      Samples/MacOS/InputReporter/InputReporterResources.resources
  41. 214 0
      Samples/MacOS/InputReporter/InputReporterResources.resx
  42. 36 0
      Samples/MacOS/InputReporter/Program.cs
  43. 150 0
      Samples/MacOS/InputReporter/Settings.xml
  44. 22 0
      Samples/MonoGame.Samples.Linux.sln
  45. 20 0
      Samples/MonoGame.Samples.MacOS.sln

+ 82 - 0
Samples/MacOS/InputReporter/ChargeSwitch.cs

@@ -0,0 +1,82 @@
+#region File Description
+//-----------------------------------------------------------------------------
+// ChargeSwitch.cs
+//
+// Microsoft XNA Community Game Platform
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+#endregion
+
+#region Using Statements
+using System;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input;
+#endregion
+
+namespace InputReporter
+{
+    /// <summary>
+    /// A GamePad-controlled switch that fires after the switch "charges up"
+    /// (typically by holding a button down) for a set duration.
+    /// </summary>
+    /// <remarks>
+    /// Since all buttons are relevant for data viewing, we don't want to directly
+    /// tie any button press to an action, like exiting the application.  Our solution
+    /// is to provide "charging" switches that run an event, like exiting, after holding
+    /// the button down for a specified amount of time.
+    /// </remarks>
+    abstract class ChargeSwitch
+    {
+        public delegate void FireDelegate();
+        public event FireDelegate Fire;
+
+        private float duration = 3f;
+        private float remaining = 0f;
+        private bool active = false;
+        public bool Active
+        {
+            get { return active; }
+        }
+
+
+        public ChargeSwitch(float duration)
+        {
+            Reset(duration);
+        }
+
+        public void Update(GameTime gameTime, ref GamePadState gamePadState)
+        {
+            active = IsCharging(ref gamePadState);
+            if (active)
+            {
+                if (remaining > 0f)
+                {
+                    remaining -= (float)gameTime.ElapsedGameTime.TotalSeconds;
+                    if (remaining <= 0f)
+                    {
+                        if (Fire != null)
+                        {
+                            Fire();
+                        }
+                    }
+                }
+            }
+            else
+            {
+                // reset to the current duration
+                Reset(duration);
+            }
+        }
+
+        public void Reset(float duration)
+        {
+            if (duration < 0f)
+            {
+                throw new ArgumentOutOfRangeException("duration");
+            }
+            this.remaining = this.duration = duration;
+        }
+
+        protected abstract bool IsCharging(ref GamePadState gamePadState);
+    }
+}

+ 29 - 0
Samples/MacOS/InputReporter/ChargeSwitchDeadZone.cs

@@ -0,0 +1,29 @@
+#region File Description
+//-----------------------------------------------------------------------------
+// ChargeSwitchDeadZone.cs
+//
+// Microsoft XNA Community Game Platform
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+#endregion
+
+#region Using Statements
+using System;
+using Microsoft.Xna.Framework.Input;
+#endregion
+
+namespace InputReporter
+{
+    /// <summary>
+    /// ChargeSwitch type for switching between dead-zone types.
+    /// </summary>
+    class ChargeSwitchDeadZone : ChargeSwitch
+    {
+        public ChargeSwitchDeadZone(float duration) : base(duration) { }
+
+        protected override bool IsCharging(ref GamePadState gamePadState)
+        {
+            return (gamePadState.Buttons.Start == ButtonState.Pressed);
+        }
+    }
+}

+ 29 - 0
Samples/MacOS/InputReporter/ChargeSwitchExit.cs

@@ -0,0 +1,29 @@
+#region File Description
+//-----------------------------------------------------------------------------
+// ChargeSwitchExit.cs
+//
+// Microsoft XNA Community Game Platform
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+#endregion
+
+#region Using Statements
+using System;
+using Microsoft.Xna.Framework.Input;
+#endregion
+
+namespace InputReporter
+{
+    /// <summary>
+    /// ChargeSwitch type for exiting the game.
+    /// </summary>
+    class ChargeSwitchExit : ChargeSwitch
+    {
+        public ChargeSwitchExit(float duration) : base(duration) { }
+
+        protected override bool IsCharging(ref GamePadState gamePadState)
+        {
+            return (gamePadState.Buttons.Back == ButtonState.Pressed);
+        }
+    }
+}

+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/DataActiveFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>11</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Bold</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/DataActiveFont.xnb


+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/DataFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>11</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Regular</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/DataFont.xnb


+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/InstructionsActiveFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>10</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Bold</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/InstructionsActiveFont.xnb


+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/InstructionsFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>10</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Regular</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/InstructionsFont.xnb


+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/TitleFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>28</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Bold</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/TitleFont.xnb


+ 48 - 0
Samples/MacOS/InputReporter/Content/Fonts/TypeFont.spritefont

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+This file contains an xml description of a font, and will be read by the XNA
+Framework Content Pipeline. Follow the comments to customize the appearance
+of the font in your game, and to change the characters which are available to draw
+with.
+-->
+<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
+  <Asset Type="Graphics:FontDescription">
+
+    <!--
+    Modify this string to change the font that will be imported.
+    -->
+    <FontName>Arial</FontName>
+
+    <!--
+    Size is a float value, measured in points. Modify this value to change
+    the size of the font.
+    -->
+    <Size>14</Size>
+
+    <!--
+    Spacing is a float value, measured in pixels. Modify this value to change
+    the amount of spacing in between characters.
+    -->
+    <Spacing>2</Spacing>
+
+    <!--
+    Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
+    and "Bold, Italic", and are case sensitive.
+    -->
+    <Style>Regular</Style>
+
+    <!--
+    CharacterRegions control what letters are available in the font. Every
+    character from Start to End will be built and made available for drawing. The
+    default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
+    character set. The characters are ordered according to the Unicode standard.
+    See the documentation for more information.
+    -->
+    <CharacterRegions>
+      <CharacterRegion>
+        <Start>&#32;</Start>
+        <End>&#126;</End>
+      </CharacterRegion>
+    </CharacterRegions>
+  </Asset>
+</XnaContent>

BIN
Samples/MacOS/InputReporter/Content/Fonts/TypeFont.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/background.jpg


BIN
Samples/MacOS/InputReporter/Content/Textures/background.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller1.png


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller1.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller2.png


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller2.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller3.png


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller3.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller4.png


BIN
Samples/MacOS/InputReporter/Content/Textures/connected_controller4.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller1.png


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller1.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller2.png


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller2.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller3.png


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller3.xnb


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller4.png


BIN
Samples/MacOS/InputReporter/Content/Textures/select_controller4.xnb


BIN
Samples/MacOS/InputReporter/Game.ico


+ 16 - 0
Samples/MacOS/InputReporter/Info.plist

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.InputReporter</string>
+	<key>CFBundleName</key>
+	<string>InputReporter</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>10.6</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 98 - 0
Samples/MacOS/InputReporter/InputReporter.csproj

@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{A0669F3D-AB7C-43BB-9423-506E24629EF0}</ProjectGuid>
+    <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>InputReporter</RootNamespace>
+    <AssemblyName>InputReporter</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="MonoMac" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+    <None Include="Game.ico" />
+    <None Include="InputReporter.png" />
+    <None Include="Content\Fonts\DataActiveFont.spritefont" />
+    <None Include="Content\Fonts\DataFont.spritefont" />
+    <None Include="Content\Fonts\InstructionsActiveFont.spritefont" />
+    <None Include="Content\Fonts\InstructionsFont.spritefont" />
+    <None Include="Content\Fonts\TitleFont.spritefont" />
+    <None Include="Content\Fonts\TypeFont.spritefont" />
+    <None Include="Content\Textures\background.jpg" />
+    <None Include="Content\Textures\connected_controller1.png" />
+    <None Include="Content\Textures\connected_controller2.png" />
+    <None Include="Content\Textures\connected_controller3.png" />
+    <None Include="Content\Textures\connected_controller4.png" />
+    <None Include="Content\Textures\select_controller1.png" />
+    <None Include="Content\Textures\select_controller2.png" />
+    <None Include="Content\Textures\select_controller3.png" />
+    <None Include="Content\Textures\select_controller4.png" />
+    <None Include="InputReporterResources.resources" />
+    <None Include="Settings.xml" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+      <Name>MonoGame.Framework.MacOS</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ChargeSwitch.cs" />
+    <Compile Include="ChargeSwitchDeadZone.cs" />
+    <Compile Include="ChargeSwitchExit.cs" />
+    <Compile Include="InputReporterGame.cs" />
+    <Compile Include="InputReporterResources.Designer.cs" />
+    <Compile Include="Program.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Content\Fonts\DataActiveFont.xnb" />
+    <Content Include="Content\Fonts\DataFont.xnb" />
+    <Content Include="Content\Fonts\InstructionsActiveFont.xnb" />
+    <Content Include="Content\Fonts\InstructionsFont.xnb" />
+    <Content Include="Content\Fonts\TitleFont.xnb" />
+    <Content Include="Content\Fonts\TypeFont.xnb" />
+    <Content Include="Content\Textures\background.xnb" />
+    <Content Include="Content\Textures\connected_controller1.xnb" />
+    <Content Include="Content\Textures\connected_controller2.xnb" />
+    <Content Include="Content\Textures\connected_controller3.xnb" />
+    <Content Include="Content\Textures\connected_controller4.xnb" />
+    <Content Include="Content\Textures\select_controller1.xnb" />
+    <Content Include="Content\Textures\select_controller2.xnb" />
+    <Content Include="Content\Textures\select_controller3.xnb" />
+    <Content Include="Content\Textures\select_controller4.xnb" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="InputReporterResources.resx" />
+  </ItemGroup>
+</Project>

BIN
Samples/MacOS/InputReporter/InputReporter.png


+ 604 - 0
Samples/MacOS/InputReporter/InputReporterGame.cs

@@ -0,0 +1,604 @@
+#region File Description
+//-----------------------------------------------------------------------------
+// InputReporterGame.cs
+//
+// Microsoft XNA Community Game Platform
+// Copyright (C) Microsoft Corporation. All rights reserved.
+//-----------------------------------------------------------------------------
+#endregion
+
+#region Using Statements
+using System;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+#endregion
+
+namespace InputReporter
+{
+    /// <summary>
+    /// Displays live input values for all connected controllers.
+    /// </summary>
+    partial class InputReporterGame : Microsoft.Xna.Framework.Game
+    {
+        #region Image Positions
+        private static readonly Vector2[] connectedControllerPositions = new Vector2[4]
+            {
+                new Vector2(606f, 60f),
+                new Vector2(656f, 60f),
+                new Vector2(606f, 110f),
+                new Vector2(656f, 110f),
+            };
+        private static readonly Vector2[] selectedControllerPositions = new Vector2[4]
+            {
+                new Vector2(594f, 36f),
+                new Vector2(686f, 36f),
+                new Vector2(594f, 137f),
+                new Vector2(686f, 137f),
+            };
+        #endregion
+
+
+        #region Text Positions
+        private static readonly Vector2 titlePosition = 
+            new Vector2(180f, 73f);
+        private static readonly Vector2 typeCenterPosition = 
+            new Vector2(660f, 270f);
+        private static readonly Vector2 descriptionColumn1Position = 
+            new Vector2(65f, 135f);
+        private static readonly Vector2 valueColumn1Position =
+            new Vector2(220f, 135f);
+        private static readonly Vector2 descriptionColumn2Position =
+            new Vector2(310f, 135f);
+        private static readonly Vector2 valueColumn2Position =
+            new Vector2(472f, 135f);
+        private static readonly Vector2 deadZoneInstructionsPosition =
+            new Vector2(570f, 380f);
+        private static readonly Vector2 exitInstructionsPosition =
+            new Vector2(618f, 425f);
+        #endregion
+
+
+        #region Text Colors
+        private static readonly Color titleColor = new Color(60, 134, 11);
+        private static readonly Color typeColor = new Color(38, 108, 87);
+        private static readonly Color descriptionColor = new Color(33, 89, 15);
+        private static readonly Color valueColor = new Color(38, 108, 87);
+        private static readonly Color disabledColor = new Color(171, 171, 171);
+        private static readonly Color instructionsColor = new Color(127, 130, 127);
+        #endregion
+
+
+        #region ChargeSwitch Durations
+        private const float deadZoneChargeSwitchDuration = 2f;
+        private const float exitChargeSwitchDuration = 2f;
+        #endregion
+
+
+        #region Input Data
+        private int selectedPlayer;
+        private GamePadState[] gamePadStates = new GamePadState[4];
+        private GamePadCapabilities[] gamePadCapabilities = new GamePadCapabilities[4];
+        private KeyboardState lastKeyboardState;
+        #endregion
+
+
+        #region Dead Zone Data
+        private GamePadDeadZone deadZone = GamePadDeadZone.IndependentAxes;
+        public GamePadDeadZone DeadZone
+        {
+            get { return deadZone; }
+            set
+            {
+                deadZone = value;
+                deadZoneString = "(" + deadZone.ToString() + ")";
+                if (dataFont != null)
+                {
+                    Vector2 deadZoneStringSize =
+                        dataFont.MeasureString(deadZoneString);
+                    deadZoneStringPosition = new Vector2(
+                        (float)Math.Floor(deadZoneStringCenterPosition.X - 
+                            deadZoneStringSize.X / 2f),
+                        (float)Math.Floor(deadZoneStringCenterPosition.Y - 
+                            deadZoneStringSize.Y / 2f));
+                }
+            }
+        }
+        private string deadZoneString;
+        private Vector2 deadZoneStringPosition;
+        private Vector2 deadZoneStringCenterPosition;
+        #endregion
+
+
+        #region ChargeSwitches
+        private ChargeSwitchExit exitSwitch = 
+            new ChargeSwitchExit(exitChargeSwitchDuration);
+        private ChargeSwitchDeadZone deadZoneSwitch = 
+            new ChargeSwitchDeadZone(deadZoneChargeSwitchDuration);
+        #endregion
+
+
+        #region Graphics Data
+        private GraphicsDeviceManager graphics;
+        private SpriteBatch spriteBatch;
+        private SpriteFont titleFont;
+        private SpriteFont dataFont;
+        private SpriteFont dataActiveFont;
+        private SpriteFont typeFont;
+        private SpriteFont instructionsFont;
+        private SpriteFont instructionsActiveFont;
+        private Texture2D backgroundTexture;
+        private Texture2D[] connectedControllerTextures = new Texture2D[4];
+        private Texture2D[] selectedControllerTextures = new Texture2D[4];
+        private float dataSpacing;
+        #endregion
+
+
+        #region Initialization
+        /// <summary>
+        /// Primary constructor.
+        /// </summary>
+        public InputReporterGame()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            graphics.PreferredBackBufferWidth = 853;
+            graphics.PreferredBackBufferHeight = 480;
+            Content.RootDirectory = "Content";
+            exitSwitch.Fire += new ChargeSwitch.FireDelegate(exitSwitch_Fire);
+            deadZoneSwitch.Fire += new ChargeSwitch.FireDelegate(ToggleDeadZone);
+        }
+
+
+        /// <summary>
+        /// Allows the game to perform any initialization it needs to before starting 
+        /// to run.  This is where it can query for any required services and load any 
+        /// non-graphic related content.  Calling base.Initialize will enumerate through
+        /// any components and initialize them as well.
+        /// </summary>
+        protected override void Initialize()
+        {
+            selectedPlayer = 0;
+
+            exitSwitch.Reset(exitChargeSwitchDuration);
+            deadZoneSwitch.Reset(deadZoneChargeSwitchDuration);
+
+            base.Initialize();
+
+            DeadZone = GamePadDeadZone.IndependentAxes;
+        }
+        #endregion
+
+
+        #region Graphics Load/Unload
+        /// <summary>
+        /// Load your graphics content.
+        /// </summary>
+        /// <param name="loadAllContent">Which type of content to load.</param>
+        protected override void LoadContent()
+        {
+            spriteBatch = new SpriteBatch(graphics.GraphicsDevice);
+            titleFont = Content.Load<SpriteFont>("Fonts\\TitleFont");
+            dataFont = Content.Load<SpriteFont>("Fonts\\DataFont");
+            dataActiveFont = Content.Load<SpriteFont>("Fonts\\DataActiveFont");
+            typeFont = Content.Load<SpriteFont>("Fonts\\TypeFont");
+            instructionsFont = Content.Load<SpriteFont>("Fonts\\InstructionsFont");
+            instructionsActiveFont =
+                Content.Load<SpriteFont>("Fonts\\InstructionsActiveFont");
+            dataSpacing = (float)Math.Floor(dataFont.LineSpacing * 1.3f);
+            deadZoneStringCenterPosition = new Vector2(687f,
+                (float)Math.Floor(deadZoneInstructionsPosition.Y +
+                dataFont.LineSpacing * 1.7f));
+
+            backgroundTexture = Content.Load<Texture2D>("Textures\\background");
+            connectedControllerTextures[0] =
+                Content.Load<Texture2D>("Textures\\connected_controller1");
+            connectedControllerTextures[1] =
+                Content.Load<Texture2D>("Textures\\connected_controller2");
+            connectedControllerTextures[2] =
+                Content.Load<Texture2D>("Textures\\connected_controller3");
+            connectedControllerTextures[3] =
+                Content.Load<Texture2D>("Textures\\connected_controller4");
+            selectedControllerTextures[0] =
+                Content.Load<Texture2D>("Textures\\select_controller1");
+            selectedControllerTextures[1] =
+                Content.Load<Texture2D>("Textures\\select_controller2");
+            selectedControllerTextures[2] =
+                Content.Load<Texture2D>("Textures\\select_controller3");
+            selectedControllerTextures[3] =
+                Content.Load<Texture2D>("Textures\\select_controller4");
+        }
+        #endregion
+
+
+        #region Updating
+        /// <summary>
+        /// Allows the game to run logic such as updating the world,
+        /// checking for collisions, gathering input and playing audio.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Update(GameTime gameTime)
+        {
+            KeyboardState keyboardState = Keyboard.GetState();
+            if (keyboardState.IsKeyDown(Keys.Escape))
+            {
+                this.Exit();
+            }
+            if (keyboardState.IsKeyDown(Keys.Space) &&
+                !lastKeyboardState.IsKeyDown(Keys.Space))
+            {
+                ToggleDeadZone();
+            }
+
+            bool setSelectedPlayer = false; // give preference to earlier controllers
+            for (int i = 0; i < 4; i++)
+            {
+                gamePadStates[i] = GamePad.GetState((PlayerIndex)i, deadZone);
+                gamePadCapabilities[i] = GamePad.GetCapabilities((PlayerIndex)i);
+                if (!setSelectedPlayer && IsActiveGamePad(ref gamePadStates[i]))
+                {
+                    selectedPlayer = i;
+                    setSelectedPlayer = true;
+                }
+            }
+
+            deadZoneSwitch.Update(gameTime, ref gamePadStates[selectedPlayer]);
+            exitSwitch.Update(gameTime, ref gamePadStates[selectedPlayer]);
+
+            base.Update(gameTime);
+
+            lastKeyboardState = keyboardState;
+        }
+
+
+        /// <summary>
+        /// Determines if the provided GamePadState is "active".
+        /// </summary>
+        /// <param name="gamePadState">The GamePadState that is checked.</param>
+        /// <remarks>
+        /// "Active" currently means that at least one of the buttons is being pressed.
+        /// </remarks>
+        /// <returns>True if "active".</returns>
+        private static bool IsActiveGamePad(ref GamePadState gamePadState)
+        {
+            return (gamePadState.IsConnected &&
+                ((gamePadState.Buttons.A == ButtonState.Pressed) ||
+                (gamePadState.Buttons.B == ButtonState.Pressed) ||
+                (gamePadState.Buttons.X == ButtonState.Pressed) ||
+                (gamePadState.Buttons.Y == ButtonState.Pressed) ||
+                (gamePadState.Buttons.Start == ButtonState.Pressed) ||
+                (gamePadState.Buttons.Back == ButtonState.Pressed) ||
+                (gamePadState.Buttons.LeftShoulder == ButtonState.Pressed) ||
+                (gamePadState.Buttons.RightShoulder == ButtonState.Pressed) ||
+                (gamePadState.Buttons.LeftStick == ButtonState.Pressed) ||
+                (gamePadState.Buttons.RightStick == ButtonState.Pressed) ||
+                (gamePadState.DPad.Up == ButtonState.Pressed) ||
+                (gamePadState.DPad.Left == ButtonState.Pressed) ||
+                (gamePadState.DPad.Right == ButtonState.Pressed) ||
+                (gamePadState.DPad.Down == ButtonState.Pressed)));
+        }
+        #endregion
+
+
+        #region Drawing
+        /// <summary>
+        /// This is called when the game should draw itself.
+        /// </summary>
+        /// <param name="gameTime">Provides a snapshot of timing values.</param>
+        protected override void Draw(GameTime gameTime)
+        {
+            graphics.GraphicsDevice.Clear(Color.Black);
+
+            base.Draw(gameTime);
+
+            spriteBatch.Begin();
+
+            // draw the background
+            spriteBatch.Draw(backgroundTexture, Vector2.Zero, Color.White);
+
+            // draw the connected-controller images
+            for (int i = 0; i < 4; i++)
+            {
+                if (gamePadStates[i].IsConnected)
+                {
+                    spriteBatch.Draw(connectedControllerTextures[i], 
+                        connectedControllerPositions[i], Color.White);
+                }
+            }
+            // draw the selected-player texture (numeral)
+            spriteBatch.Draw(selectedControllerTextures[selectedPlayer], 
+                selectedControllerPositions[selectedPlayer], Color.White);
+
+            // draw controller title
+            string text = InputReporterResources.Title + 
+                ((PlayerIndex)selectedPlayer).ToString();
+            spriteBatch.DrawString(titleFont, text, titlePosition,
+                titleColor);
+
+            // draw controller type
+            text = gamePadCapabilities[selectedPlayer].GamePadType.ToString();
+            Vector2 textSize = typeFont.MeasureString(text);
+            spriteBatch.DrawString(typeFont, text, new Vector2(
+                (float)Math.Floor(typeCenterPosition.X - 
+                    textSize.X / 2f),
+                (float)Math.Floor(typeCenterPosition.Y - 
+                    textSize.Y / 2f)),
+                typeColor);
+
+            // draw the data
+            DrawData(ref gamePadStates[selectedPlayer], 
+                ref gamePadCapabilities[selectedPlayer]);
+
+            // draw the instructions
+            spriteBatch.DrawString(deadZoneSwitch.Active ? instructionsActiveFont : 
+                instructionsFont, InputReporterResources.DeadZoneInstructions, 
+                deadZoneInstructionsPosition, instructionsColor);
+            spriteBatch.DrawString(instructionsFont, deadZoneString,
+                deadZoneStringPosition, instructionsColor);
+            spriteBatch.DrawString(exitSwitch.Active ? instructionsActiveFont :
+                instructionsFont, InputReporterResources.ExitInstructions, 
+                exitInstructionsPosition, instructionsColor);
+
+            spriteBatch.End();
+        }
+
+
+        /// <summary>
+        /// Draw all data for a set of GamePad data and capabilities.
+        /// </summary>
+        /// <param name="gamePadState">The GamePad data.</param>
+        /// <param name="gamePadCapabilities">The GamePad capabilities.</param>
+        /// <remarks>
+        /// The GamePad structures are passed by reference for speed.  They are not
+        /// modified in this method.
+        /// </remarks>
+        private void DrawData(ref GamePadState gamePadState, 
+            ref GamePadCapabilities gamePadCapabilities)
+        {
+            //
+            // Draw the first column of data
+            //
+            Vector2 descriptionPosition = descriptionColumn1Position;
+            Vector2 valuePosition = valueColumn1Position;
+
+            // draw left thumbstick data
+            DrawValue(InputReporterResources.LeftThumbstickX, ref descriptionPosition,
+                gamePadState.ThumbSticks.Left.X.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasLeftXThumbStick,
+                gamePadState.ThumbSticks.Left.X != 0f);
+            DrawValue(InputReporterResources.LeftThumbstickY, ref descriptionPosition,
+                gamePadState.ThumbSticks.Left.Y.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasLeftYThumbStick,
+                gamePadState.ThumbSticks.Left.Y != 0f);
+
+            // draw the right thumbstick data
+            DrawValue(InputReporterResources.RightThumbstickX, ref descriptionPosition,
+                gamePadState.ThumbSticks.Right.X.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasRightXThumbStick,
+                gamePadState.ThumbSticks.Right.X != 0f);
+            DrawValue(InputReporterResources.RightThumbstickY, ref descriptionPosition,
+                gamePadState.ThumbSticks.Right.Y.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasRightYThumbStick,
+                gamePadState.ThumbSticks.Right.Y != 0f);
+
+            descriptionPosition.Y += dataSpacing;
+            valuePosition.Y += dataSpacing;
+
+            // draw the trigger data
+            DrawValue(InputReporterResources.LeftTrigger, ref descriptionPosition,
+                gamePadState.Triggers.Left.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasLeftTrigger,
+                gamePadState.Triggers.Left != 0f);
+            DrawValue(InputReporterResources.RightTrigger, ref descriptionPosition,
+                gamePadState.Triggers.Right.ToString("0.000"), ref valuePosition,
+                gamePadCapabilities.HasRightTrigger, 
+                gamePadState.Triggers.Right != 0f);
+
+            descriptionPosition.Y += dataSpacing;
+            valuePosition.Y += dataSpacing;
+
+            // draw the directional pad data
+            DrawValue(InputReporterResources.DPadUp, ref descriptionPosition,
+                (gamePadState.DPad.Up == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasDPadUpButton,
+                gamePadState.DPad.Up == ButtonState.Pressed);
+            DrawValue(InputReporterResources.DPadDown, ref descriptionPosition,
+                (gamePadState.DPad.Down == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasDPadDownButton,
+                gamePadState.DPad.Down == ButtonState.Pressed);
+            DrawValue(InputReporterResources.DPadLeft, ref descriptionPosition,
+                (gamePadState.DPad.Left == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed :
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasDPadLeftButton,
+                gamePadState.DPad.Left == ButtonState.Pressed);
+            DrawValue(InputReporterResources.DPadRight, ref descriptionPosition,
+                (gamePadState.DPad.Right == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasDPadRightButton,
+                gamePadState.DPad.Right == ButtonState.Pressed);
+
+            descriptionPosition.Y += dataSpacing;
+            valuePosition.Y += dataSpacing;
+
+            // draw the vibration data
+            if (gamePadCapabilities.HasLeftVibrationMotor)
+            {
+                if (gamePadCapabilities.HasRightVibrationMotor)
+                {
+                    spriteBatch.DrawString(dataFont, 
+                        InputReporterResources.BothVibrationMotors, descriptionPosition,
+                        descriptionColor);
+                }
+                else
+                {
+                    spriteBatch.DrawString(dataFont, 
+                        InputReporterResources.LeftVibrationMotor, descriptionPosition,
+                        descriptionColor);
+                }
+            }
+            else if (gamePadCapabilities.HasRightVibrationMotor)
+            {
+                spriteBatch.DrawString(dataFont, 
+                    InputReporterResources.RightVibrationMotor, descriptionPosition,
+                    descriptionColor);
+            }
+            else
+            {
+                spriteBatch.DrawString(dataFont, InputReporterResources.NoVibration, 
+                    descriptionPosition, descriptionColor);
+            }
+
+            //
+            // Draw the second column of data
+            //
+            descriptionPosition = descriptionColumn2Position;
+            valuePosition = valueColumn2Position;
+
+            // draw the button data
+            DrawValue(InputReporterResources.A, ref descriptionPosition,
+                (gamePadState.Buttons.A == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasAButton,
+                gamePadState.Buttons.A == ButtonState.Pressed);
+            DrawValue(InputReporterResources.B, ref descriptionPosition,
+                (gamePadState.Buttons.B == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasBButton,
+                gamePadState.Buttons.B == ButtonState.Pressed);
+            DrawValue(InputReporterResources.X, ref descriptionPosition,
+                (gamePadState.Buttons.X == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasXButton,
+                gamePadState.Buttons.X == ButtonState.Pressed);
+            DrawValue(InputReporterResources.Y, ref descriptionPosition,
+                (gamePadState.Buttons.Y == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasYButton,
+                gamePadState.Buttons.Y == ButtonState.Pressed);
+            DrawValue(InputReporterResources.LeftShoulder, ref descriptionPosition,
+                (gamePadState.Buttons.LeftShoulder == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasLeftShoulderButton,
+                gamePadState.Buttons.LeftShoulder == ButtonState.Pressed);
+            DrawValue(InputReporterResources.RightShoulder, ref descriptionPosition,
+                (gamePadState.Buttons.RightShoulder == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasRightShoulderButton,
+                gamePadState.Buttons.RightShoulder == ButtonState.Pressed);
+            DrawValue(InputReporterResources.LeftStick, ref descriptionPosition,
+                (gamePadState.Buttons.LeftStick == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasLeftStickButton,
+                gamePadState.Buttons.LeftStick == ButtonState.Pressed);
+            DrawValue(InputReporterResources.RightStick, ref descriptionPosition,
+                (gamePadState.Buttons.RightStick == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed : 
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasRightStickButton, 
+                gamePadState.Buttons.RightStick == ButtonState.Pressed);
+            DrawValue(InputReporterResources.Start, ref descriptionPosition,
+                (gamePadState.Buttons.Start == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed :
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasStartButton,
+                gamePadState.Buttons.Start == ButtonState.Pressed);
+            DrawValue(InputReporterResources.Back, ref descriptionPosition,
+                (gamePadState.Buttons.Back == ButtonState.Pressed ? 
+                InputReporterResources.ButtonPressed :
+                InputReporterResources.ButtonReleased), ref valuePosition,
+                gamePadCapabilities.HasBackButton,
+                gamePadState.Buttons.Back == ButtonState.Pressed);
+
+            descriptionPosition.Y += dataSpacing;
+            valuePosition.Y += dataSpacing;
+
+            // draw the packet number data
+            DrawValue(InputReporterResources.PacketNumber, ref descriptionPosition,
+                gamePadState.PacketNumber.ToString(), ref valuePosition, 
+                gamePadCapabilities.IsConnected, false);
+        }
+
+
+        /// <summary>
+        /// Draw a single description/value pair.
+        /// </summary>
+        /// <param name="description">The description of the value.</param>
+        /// <param name="descriptionPosition">The position of the description.</param>
+        /// <param name="value">The value itself.</param>
+        /// <param name="valuePosition">The position of the value.</param>
+        /// <param name="enabled">If true, the value type is supported.</param>
+        /// <param name="active">If true, the value type is active right now.</param>
+        /// <remarks>
+        /// The positions are modified by this function, moving down one line.
+        /// </remarks>
+        private void DrawValue(string description, ref Vector2 descriptionPosition, 
+            string value, ref Vector2 valuePosition, bool enabled, bool active)
+        {
+            spriteBatch.DrawString(dataFont, description, descriptionPosition, 
+                enabled ? descriptionColor : disabledColor);
+            descriptionPosition.Y += dataSpacing;
+            spriteBatch.DrawString(active ? dataActiveFont : dataFont,
+                value, valuePosition, enabled ? valueColor : disabledColor);
+            valuePosition.Y += dataSpacing;
+        }
+        #endregion
+
+
+        #region ChargeSwitch Event Handlers
+        /// <summary>
+        /// Handles the dead-zone ChargeSwitch fire event.  Toggles dead zone types.
+        /// </summary>
+        private void ToggleDeadZone()
+        {
+            switch (DeadZone)
+            {
+                case GamePadDeadZone.IndependentAxes:
+                    DeadZone = GamePadDeadZone.Circular;
+                    break;
+                case GamePadDeadZone.Circular:
+                    DeadZone = GamePadDeadZone.None;
+                    break;
+                case GamePadDeadZone.None:
+                    DeadZone = GamePadDeadZone.IndependentAxes;
+                    break;
+            }
+        }
+
+
+        /// <summary>
+        /// Handles the exit ChargeSwitch fire event.  Exits the application.
+        /// </summary>
+        private void exitSwitch_Fire()
+        {
+            this.Exit();
+        }
+        #endregion
+
+
+//        #region Entry Point
+//        /// <summary>
+//        /// The main entry point for the application.
+//        /// </summary>
+//        static void Main()
+//        {
+//            using (InputReporterGame game = new InputReporterGame())
+//            {
+//                game.Run();
+//            }
+//        }
+//        #endregion
+    }
+}

+ 342 - 0
Samples/MacOS/InputReporter/InputReporterResources.Designer.cs

@@ -0,0 +1,342 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.1
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace InputReporter {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class InputReporterResources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal InputReporterResources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("InputReporter.InputReporterResources", typeof(InputReporterResources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.A:.
+        /// </summary>
+        internal static string A {
+            get {
+                return ResourceManager.GetString("A", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.B:.
+        /// </summary>
+        internal static string B {
+            get {
+                return ResourceManager.GetString("B", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.Back:.
+        /// </summary>
+        internal static string Back {
+            get {
+                return ResourceManager.GetString("Back", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Supports Left and Right Vibration Motors.
+        /// </summary>
+        internal static string BothVibrationMotors {
+            get {
+                return ResourceManager.GetString("BothVibrationMotors", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Pressed.
+        /// </summary>
+        internal static string ButtonPressed {
+            get {
+                return ResourceManager.GetString("ButtonPressed", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Released.
+        /// </summary>
+        internal static string ButtonReleased {
+            get {
+                return ResourceManager.GetString("ButtonReleased", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Hold START to Change Dead Zone.
+        /// </summary>
+        internal static string DeadZoneInstructions {
+            get {
+                return ResourceManager.GetString("DeadZoneInstructions", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to (Disconnected).
+        /// </summary>
+        internal static string Disconnected {
+            get {
+                return ResourceManager.GetString("Disconnected", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DPad.Down:.
+        /// </summary>
+        internal static string DPadDown {
+            get {
+                return ResourceManager.GetString("DPadDown", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DPad.Left:.
+        /// </summary>
+        internal static string DPadLeft {
+            get {
+                return ResourceManager.GetString("DPadLeft", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DPad.Right:.
+        /// </summary>
+        internal static string DPadRight {
+            get {
+                return ResourceManager.GetString("DPadRight", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to DPad.Up:.
+        /// </summary>
+        internal static string DPadUp {
+            get {
+                return ResourceManager.GetString("DPadUp", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Hold BACK to Exit.
+        /// </summary>
+        internal static string ExitInstructions {
+            get {
+                return ResourceManager.GetString("ExitInstructions", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.LeftShoulder:.
+        /// </summary>
+        internal static string LeftShoulder {
+            get {
+                return ResourceManager.GetString("LeftShoulder", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.LeftStick:.
+        /// </summary>
+        internal static string LeftStick {
+            get {
+                return ResourceManager.GetString("LeftStick", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Thumbsticks.Left.X:.
+        /// </summary>
+        internal static string LeftThumbstickX {
+            get {
+                return ResourceManager.GetString("LeftThumbstickX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Thumbsticks.Left.Y:.
+        /// </summary>
+        internal static string LeftThumbstickY {
+            get {
+                return ResourceManager.GetString("LeftThumbstickY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Triggers.Left:.
+        /// </summary>
+        internal static string LeftTrigger {
+            get {
+                return ResourceManager.GetString("LeftTrigger", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Supports Left Vibration Motor Only.
+        /// </summary>
+        internal static string LeftVibrationMotor {
+            get {
+                return ResourceManager.GetString("LeftVibrationMotor", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to No Vibration Support.
+        /// </summary>
+        internal static string NoVibration {
+            get {
+                return ResourceManager.GetString("NoVibration", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to PacketNumber:.
+        /// </summary>
+        internal static string PacketNumber {
+            get {
+                return ResourceManager.GetString("PacketNumber", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.RightShoulder:.
+        /// </summary>
+        internal static string RightShoulder {
+            get {
+                return ResourceManager.GetString("RightShoulder", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.RightStick:.
+        /// </summary>
+        internal static string RightStick {
+            get {
+                return ResourceManager.GetString("RightStick", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Thumbsticks.Right.X:.
+        /// </summary>
+        internal static string RightThumbstickX {
+            get {
+                return ResourceManager.GetString("RightThumbstickX", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Thumbsticks.Right.Y:.
+        /// </summary>
+        internal static string RightThumbstickY {
+            get {
+                return ResourceManager.GetString("RightThumbstickY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Triggers.Right:.
+        /// </summary>
+        internal static string RightTrigger {
+            get {
+                return ResourceManager.GetString("RightTrigger", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Supports Right Vibration Motor Only.
+        /// </summary>
+        internal static string RightVibrationMotor {
+            get {
+                return ResourceManager.GetString("RightVibrationMotor", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.Start:.
+        /// </summary>
+        internal static string Start {
+            get {
+                return ResourceManager.GetString("Start", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Controller .
+        /// </summary>
+        internal static string Title {
+            get {
+                return ResourceManager.GetString("Title", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.X:.
+        /// </summary>
+        internal static string X {
+            get {
+                return ResourceManager.GetString("X", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to Buttons.Y:.
+        /// </summary>
+        internal static string Y {
+            get {
+                return ResourceManager.GetString("Y", resourceCulture);
+            }
+        }
+    }
+}

BIN
Samples/MacOS/InputReporter/InputReporterResources.resources


+ 214 - 0
Samples/MacOS/InputReporter/InputReporterResources.resx

@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="A" xml:space="preserve">
+    <value>Buttons.A:</value>
+  </data>
+  <data name="B" xml:space="preserve">
+    <value>Buttons.B:</value>
+  </data>
+  <data name="Back" xml:space="preserve">
+    <value>Buttons.Back:</value>
+  </data>
+  <data name="BothVibrationMotors" xml:space="preserve">
+    <value>Supports Left and Right Vibration Motors</value>
+  </data>
+  <data name="ButtonPressed" xml:space="preserve">
+    <value>Pressed</value>
+  </data>
+  <data name="ButtonReleased" xml:space="preserve">
+    <value>Released</value>
+  </data>
+  <data name="DeadZoneInstructions" xml:space="preserve">
+    <value>Hold START to Change Dead Zone</value>
+  </data>
+  <data name="Disconnected" xml:space="preserve">
+    <value>(Disconnected)</value>
+  </data>
+  <data name="DPadDown" xml:space="preserve">
+    <value>DPad.Down:</value>
+  </data>
+  <data name="DPadLeft" xml:space="preserve">
+    <value>DPad.Left:</value>
+  </data>
+  <data name="DPadRight" xml:space="preserve">
+    <value>DPad.Right:</value>
+  </data>
+  <data name="DPadUp" xml:space="preserve">
+    <value>DPad.Up:</value>
+  </data>
+  <data name="ExitInstructions" xml:space="preserve">
+    <value>Hold BACK to Exit</value>
+  </data>
+  <data name="LeftShoulder" xml:space="preserve">
+    <value>Buttons.LeftShoulder:</value>
+  </data>
+  <data name="LeftStick" xml:space="preserve">
+    <value>Buttons.LeftStick:</value>
+  </data>
+  <data name="LeftThumbstickX" xml:space="preserve">
+    <value>Thumbsticks.Left.X:</value>
+  </data>
+  <data name="LeftThumbstickY" xml:space="preserve">
+    <value>Thumbsticks.Left.Y:</value>
+  </data>
+  <data name="LeftTrigger" xml:space="preserve">
+    <value>Triggers.Left:</value>
+  </data>
+  <data name="LeftVibrationMotor" xml:space="preserve">
+    <value>Supports Left Vibration Motor Only</value>
+  </data>
+  <data name="NoVibration" xml:space="preserve">
+    <value>No Vibration Support</value>
+  </data>
+  <data name="PacketNumber" xml:space="preserve">
+    <value>PacketNumber:</value>
+  </data>
+  <data name="RightShoulder" xml:space="preserve">
+    <value>Buttons.RightShoulder:</value>
+  </data>
+  <data name="RightStick" xml:space="preserve">
+    <value>Buttons.RightStick:</value>
+  </data>
+  <data name="RightThumbstickX" xml:space="preserve">
+    <value>Thumbsticks.Right.X:</value>
+  </data>
+  <data name="RightThumbstickY" xml:space="preserve">
+    <value>Thumbsticks.Right.Y:</value>
+  </data>
+  <data name="RightTrigger" xml:space="preserve">
+    <value>Triggers.Right:</value>
+  </data>
+  <data name="RightVibrationMotor" xml:space="preserve">
+    <value>Supports Right Vibration Motor Only</value>
+  </data>
+  <data name="Start" xml:space="preserve">
+    <value>Buttons.Start:</value>
+  </data>
+  <data name="Title" xml:space="preserve">
+    <value>Controller </value>
+    <comment>Prefix on the data title.</comment>
+  </data>
+  <data name="X" xml:space="preserve">
+    <value>Buttons.X:</value>
+  </data>
+  <data name="Y" xml:space="preserve">
+    <value>Buttons.Y:</value>
+  </data>
+</root>

+ 36 - 0
Samples/MacOS/InputReporter/Program.cs

@@ -0,0 +1,36 @@
+using System;
+namespace InputReporter
+{
+	static class Program
+	{	
+		/// <summary>
+		/// The main entry point for the application.
+		/// </summary>
+		static void Main (string[] args)
+		{
+			MonoMac.AppKit.NSApplication.Init ();
+			
+			using (var p = new MonoMac.Foundation.NSAutoreleasePool ()) {
+				MonoMac.AppKit.NSApplication.SharedApplication.Delegate = new AppDelegate();
+				MonoMac.AppKit.NSApplication.Main(args);
+			}
+		}
+	}
+	
+	class AppDelegate : MonoMac.AppKit.NSApplicationDelegate
+	{
+		
+		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
+		{
+			using (InputReporterGame game = new InputReporterGame()) {
+				game.Run ();
+			}
+		}
+		
+		public override bool ApplicationShouldTerminateAfterLastWindowClosed (MonoMac.AppKit.NSApplication sender)
+		{
+			return true;
+		}
+	}
+}
+

+ 150 - 0
Samples/MacOS/InputReporter/Settings.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <Player1>
+    <JoystickName>PS3/USB Corded Gamepad</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>0</ID>
+        <Type>None</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>0</ID>
+        <Type>None</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>0</ID>
+      <Type>None</Type>
+      <Negative>false</Negative>
+    </LeftTrigger>
+    <RightTrigger>
+      <ID>0</ID>
+      <Type>None</Type>
+      <Negative>false</Negative>
+    </RightTrigger>
+  </Player1>
+  <Player2>
+    <ID>-1</ID>
+  </Player2>
+  <Player3>
+    <ID>-1</ID>
+  </Player3>
+  <Player4>
+    <ID>-1</ID>
+  </Player4>
+</Settings>

+ 22 - 0
Samples/MonoGame.Samples.Linux.sln

@@ -43,6 +43,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Samples.FloodContr
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StarWarrior", "Linux\StarWarrior\StarWarrior.csproj", "{2012F252-E53A-4900-A2C5-9550D008DF8B}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InputReporter", "Linux\InputReporter\InputReporter.csproj", "{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -457,6 +459,26 @@ Global
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Release|Mixed Platforms.Build.0 = Release|Any CPU
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Release|x86.ActiveCfg = Release|Any CPU
 		{EB1F36EC-5DB8-41AC-AB99-E9337239A9F9}.Release|x86.Build.0 = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Debug|x86.Build.0 = Debug|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|iPhone.Build.0 = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|x86.ActiveCfg = Release|Any CPU
+		{EC1FA46A-41D3-4F6E-8712-70133CCB3C6A}.Release|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(NestedProjects) = preSolution
 		{9522776F-02BA-4BED-B8BB-6BAE580F4068} = {A28FF8DB-5350-4D08-A94D-93C3C67FCB63}

+ 20 - 0
Samples/MonoGame.Samples.MacOS.sln

@@ -71,6 +71,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Primitives", "MacOS\Primiti
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BackgroundThreadTester", "MacOS\BackgroundThreadTester\BackgroundThreadTester.csproj", "{8592FA21-37B6-41C8-BC7F-17EB4930B96A}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InputReporter", "MacOS\InputReporter\InputReporter.csproj", "{A0669F3D-AB7C-43BB-9423-506E24629EF0}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -374,6 +376,24 @@ Global
 		{973C423F-0CC0-4230-9E67-D944ED70ED19}.Release|Any CPU.Build.0 = Release|Any CPU
 		{973C423F-0CC0-4230-9E67-D944ED70ED19}.Release|x86.ActiveCfg = Release|Any CPU
 		{973C423F-0CC0-4230-9E67-D944ED70ED19}.Release|x86.Build.0 = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|iPhone.Build.0 = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Debug|x86.Build.0 = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Distribution|Any CPU.ActiveCfg = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Distribution|Any CPU.Build.0 = Debug|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|Any CPU.Build.0 = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|iPhone.ActiveCfg = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|iPhone.Build.0 = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|x86.ActiveCfg = Release|Any CPU
+		{A0669F3D-AB7C-43BB-9423-506E24629EF0}.Release|x86.Build.0 = Release|Any CPU
 		{A82EAD58-40D7-49BE-8F24-09FEA34F9E55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
 		{A82EAD58-40D7-49BE-8F24-09FEA34F9E55}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{A82EAD58-40D7-49BE-8F24-09FEA34F9E55}.Debug|x86.ActiveCfg = Debug|Any CPU