From 4e419fa74f3849c04103db3d113f316631f4d2af Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Mon, 17 Jul 2023 14:13:39 +0100 Subject: [PATCH] fixes bug setting button states getters now return boolean values. --- lib/voicemeeter/button.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/voicemeeter/button.rb b/lib/voicemeeter/button.rb index 4b289c4..5d257c8 100644 --- a/lib/voicemeeter/button.rb +++ b/lib/voicemeeter/button.rb @@ -10,16 +10,16 @@ module Voicemeeter end class Button < IRemote - def getter(type_) - @remote.get_buttonstatus(@index, type_) + def getter(mode) + @remote.get_buttonstatus(@index, mode) end - def setter(type_, val) - @remote.set_buttonstatus(@index, type_, val) + def setter(mode, val) + @remote.set_buttonstatus(@index, mode, val) end def state - getter(ButtonEnum::STATE) + getter(ButtonEnum::STATE) == 1 end def state=(value) @@ -27,7 +27,7 @@ module Voicemeeter end def stateonly - getter(ButtonEnum::STATEONLY) + getter(ButtonEnum::STATEONLY) == 1 end def stateonly=(value) @@ -35,7 +35,7 @@ module Voicemeeter end def trigger - getter(ButtonEnum::TRIGGER) + getter(ButtonEnum::TRIGGER) == 1 end def trigger=(value)