diff --git a/src/OpenTK/Input/GamePadConfiguration.cs b/src/OpenTK/Input/GamePadConfiguration.cs
index b82bcdfc..799776df 100644
--- a/src/OpenTK/Input/GamePadConfiguration.cs
+++ b/src/OpenTK/Input/GamePadConfiguration.cs
@@ -167,10 +167,10 @@ namespace OpenTK.Input
switch (item[0])
{
case 'a':
- return new GamePadConfigurationSource(isAxis:true, index:ParseAxis(item));
+ return new GamePadConfigurationSource(isAxis:true, index:ParseIndex(item));
case 'b':
- return new GamePadConfigurationSource(isAxis:false, index:ParseButton(item));
+ return new GamePadConfigurationSource(isAxis:false, index:ParseIndex(item));
case 'h':
{
@@ -189,25 +189,11 @@ namespace OpenTK.Input
/// - # is a zero-based integer number
///
/// The string to parse
- /// The index of the axis
- static int ParseAxis(string item)
+ /// The index of the axis or button
+ static int ParseIndex(string item)
{
// item is in the format "a#" where # a zero-based integer number
- int axis = 0;
- int id = Int32.Parse(item.Substring(1));
- return axis + id;
- }
-
- ///
- /// Parses a string in the format "b#" where:
- /// - # is a zero-based integer number
- ///
- /// The string to parse
- /// The index of the button
- static int ParseButton(string item)
- {
- // item is in the format "b#" where # a zero-based integer number
- return Int32.Parse(item.Substring(1));
+ return Int32.Parse(item.Substring(1)); ;
}
///