feat(Controller): Added error logging in update loop

This commit is contained in:
2025-08-04 15:42:19 +02:00
parent 945a78c463
commit cc7f355629
2 changed files with 15 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ import (
type Mapping interface {
Is(midi.Message) bool
TriggerIfMatch(midi.Message, uinput.Gamepad) error
Comment() string
}
type ButtonMapping struct {
@@ -45,6 +46,10 @@ func (m ButtonMapping) TriggerIfMatch(msg midi.Message, virtGamepad uinput.Gamep
return nil
}
func (m ButtonMapping) Comment() string {
return m.comment
}
type ControllerAxis int
const (
@@ -102,3 +107,7 @@ func (m ControlMapping) TriggerIfMatch(msg midi.Message, virtGamepad uinput.Game
return nil
}
func (m ControlMapping) Comment() string {
return m.comment
}