mirror of
https://github.com/Luzifer/streamdeck.git
synced 2024-12-20 09:41:19 +00:00
Fix: Do not shadow key index
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4c86bf4811
commit
862c9ec7c4
1 changed files with 4 additions and 4 deletions
|
@ -102,12 +102,12 @@ func (d displayElementExec) Display(ctx context.Context, idx int, attributes map
|
|||
|
||||
tmpCol := color.RGBA{}
|
||||
|
||||
for idx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} {
|
||||
switch rgba[idx].(type) {
|
||||
for cidx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} {
|
||||
switch rgba[cidx].(type) {
|
||||
case int:
|
||||
*vp = uint8(rgba[idx].(int))
|
||||
*vp = uint8(rgba[cidx].(int))
|
||||
case float64:
|
||||
*vp = uint8(rgba[idx].(float64))
|
||||
*vp = uint8(rgba[cidx].(float64))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue