Skip to content

Commit ad20764

Browse files
author
Stephen Hodgson
committed
proper handling of None mapping getter and setter
1 parent 374d419 commit ad20764

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Assets/HoloToolkit/Input/Scripts/GamePad/XboxControllerMapping.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static string GetMapping(XboxControllerMappingTypes type)
3434
{
3535
switch (type)
3636
{
37+
case XboxControllerMappingTypes.None:
38+
return string.Empty;
3739
case XboxControllerMappingTypes.XboxLeftStickHorizontal:
3840
return XboxLeftStickHorizontal;
3941
case XboxControllerMappingTypes.XboxLeftStickVertical:
@@ -81,6 +83,8 @@ public static void SetMapping(XboxControllerMappingTypes type, string value)
8183
{
8284
switch (type)
8385
{
86+
case XboxControllerMappingTypes.None:
87+
return;
8488
case XboxControllerMappingTypes.XboxLeftStickHorizontal:
8589
XboxLeftStickHorizontal = string.IsNullOrEmpty(value) ? "CONTROLLER_LEFT_STICK_HORIZONTAL" : value;
8690
break;

0 commit comments

Comments
 (0)