mirror of
https://github.com/Luzifer/streamdeck.git
synced 2024-12-20 17:51:21 +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{}
|
tmpCol := color.RGBA{}
|
||||||
|
|
||||||
for idx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} {
|
for cidx, vp := range []*uint8{&tmpCol.R, &tmpCol.G, &tmpCol.B, &tmpCol.A} {
|
||||||
switch rgba[idx].(type) {
|
switch rgba[cidx].(type) {
|
||||||
case int:
|
case int:
|
||||||
*vp = uint8(rgba[idx].(int))
|
*vp = uint8(rgba[cidx].(int))
|
||||||
case float64:
|
case float64:
|
||||||
*vp = uint8(rgba[idx].(float64))
|
*vp = uint8(rgba[cidx].(float64))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue