From 0daa7c04f99a698b79a6dc6dd7ec0b5f4ffcd2ef Mon Sep 17 00:00:00 2001 From: Glatzemann Date: Tue, 4 Dec 2012 09:40:37 +0000 Subject: [PATCH] - applied patch #13368 of clcrutch (fixes XInput's Keyboard.GetState(PlayerIndex) to match XNA's functionality) - added build support for "Visual Studio 2012 Express for Windows Desktop" using the MakeAnxFramework command - marked patches in source files --- ANX.Framework/DrawableGameComponent.cs | 8 ++++++++ ANX.Framework/Game.cs | 7 +++++++ .../Keyboard.cs | 19 +++++++++++++++++-- build/ANX.Framework.build | 4 ++++ build/MakeAnxFramework.cmd | 11 ++++++++++- 5 files changed, 46 insertions(+), 3 deletions(-) diff --git a/ANX.Framework/DrawableGameComponent.cs b/ANX.Framework/DrawableGameComponent.cs index 1a703cfd..5c288d34 100644 --- a/ANX.Framework/DrawableGameComponent.cs +++ b/ANX.Framework/DrawableGameComponent.cs @@ -9,6 +9,14 @@ using ANX.Framework.NonXNA.Development; // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license +#region Patch-Log +/* + + * 12/03/2012 #13365 clcrutch + +*/ +#endregion + namespace ANX.Framework { [PercentageComplete(100)] diff --git a/ANX.Framework/Game.cs b/ANX.Framework/Game.cs index f2c428d2..6fbbda49 100644 --- a/ANX.Framework/Game.cs +++ b/ANX.Framework/Game.cs @@ -14,6 +14,13 @@ using ANX.Framework.NonXNA.SoundSystem; // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license +#region Patch-Log +/* + + * 12/03/2012 #13365 clcrutch + +*/ +#endregion namespace ANX.Framework { diff --git a/InputSystems/ANX.InputDevices.Windows.XInput/Keyboard.cs b/InputSystems/ANX.InputDevices.Windows.XInput/Keyboard.cs index ad7d6e87..cb7a3cf4 100644 --- a/InputSystems/ANX.InputDevices.Windows.XInput/Keyboard.cs +++ b/InputSystems/ANX.InputDevices.Windows.XInput/Keyboard.cs @@ -9,6 +9,14 @@ using ANX.Framework.NonXNA.Development; // "ANX.Framework developer group" and released under the Ms-PL license. // For details see: http://anxframework.codeplex.com/license +#region Patch-Log +/* + + * 12/03/2012 #13365 clcrutch + +*/ +#endregion + namespace ANX.InputDevices.Windows.XInput { [PercentageComplete(100)] @@ -51,11 +59,18 @@ namespace ANX.InputDevices.Windows.XInput } /// - /// Only available on XBox, behaviour regarding MSDN: empty keystate + /// Although MSDN states this method returns an emtpy state on Windows, + /// Xna functionality has it returning Keyboard.GetState() for PlayerIndex.One. /// public KeyboardState GetState(PlayerIndex playerIndex) { - return emptyState; + switch (playerIndex) + { + case PlayerIndex.One: + return GetState(); + default: + return emptyState; + } } public KeyboardState GetState() diff --git a/build/ANX.Framework.build b/build/ANX.Framework.build index 2ec2273f..7e9ce6dc 100644 --- a/build/ANX.Framework.build +++ b/build/ANX.Framework.build @@ -73,6 +73,8 @@ + + @@ -93,6 +95,8 @@ + + diff --git a/build/MakeAnxFramework.cmd b/build/MakeAnxFramework.cmd index ba1fa776..50a1ad6e 100644 --- a/build/MakeAnxFramework.cmd +++ b/build/MakeAnxFramework.cmd @@ -4,6 +4,7 @@ set ProgRoot=%ProgramFiles% if not "%ProgramFiles(x86)%" == "" set ProgRoot=%ProgramFiles(x86)% FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\11.0_Config" /v ShellFolder') DO SET vs11dir=%%B +FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_USERS\.DEFAULT\Software\Microsoft\WDExpress\11.0_Config" /v ShellFolder') DO SET vs11dir=%%B FOR /F "tokens=2* delims= " %%A IN ('REG QUERY "HKEY_USERS\.DEFAULT\Software\Microsoft\VisualStudio\10.0_Config" /v ShellFolder') DO SET vs10dir=%%B if EXIST "%vs11dir%\vc\vcvarsall.bat" goto vs2011 @@ -20,7 +21,7 @@ goto error_msg SET ENV=VS2012 goto start_nant -:vs2011pf +:vs2010pf SET vs10dir = %ProgRoot%\Microsoft Visual Studio 10.0\ :vs2010 echo Visual Studio 2010 build environment @@ -28,6 +29,14 @@ goto error_msg SET ENV=VS2010 goto start_nant +:vs2008pf + SET vs9dir = %ProgRoot%\Microsoft Visual Studio 9.0\ +:vs2010 + echo Visual Studio 2008 build environment + call "%vs9dir%\vc\vcvarsall.bat" x86 + SET ENV=VS2008 + goto start_nant + :start_nant if NOT EXIST "../build" goto error_msg_working_dir set PATH=../lib/nant-0.91/bin;../Tools/bin;%PATH%