From 646e5e9283380c34a9637de63f4606d26861f2b1 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 12 Jul 2022 17:57:37 -0700 Subject: [PATCH] empty virtual button --- src/Input/Gamepad.cs | 5 ----- src/Input/VirtualButtons/EmptyButton.cs | 10 ++++++++++ 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 src/Input/VirtualButtons/EmptyButton.cs diff --git a/src/Input/Gamepad.cs b/src/Input/Gamepad.cs index 4e432e7e..ec01761e 100644 --- a/src/Input/Gamepad.cs +++ b/src/Input/Gamepad.cs @@ -274,10 +274,5 @@ namespace MoonWorks.Input { return EnumToTrigger[(SDL.SDL_GameControllerAxis) triggerCode].Value; } - - private bool CheckPressed(SDL.SDL_GameControllerButton button) - { - return MoonWorks.Conversions.ByteToBool(SDL.SDL_GameControllerGetButton(Handle, button)); - } } } diff --git a/src/Input/VirtualButtons/EmptyButton.cs b/src/Input/VirtualButtons/EmptyButton.cs new file mode 100644 index 00000000..0c290357 --- /dev/null +++ b/src/Input/VirtualButtons/EmptyButton.cs @@ -0,0 +1,10 @@ +namespace MoonWorks.Input +{ + public class EmptyButton : VirtualButton + { + internal override bool CheckPressed() + { + return false; + } + } +}