Skip to content

Commit 3a7fa1b

Browse files
author
techpoet
committed
merge checks in a single case statement
This PR merges the checks for originalv2 and XL devince in one case statement Issue: None
1 parent 8981023 commit 3a7fa1b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

image.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func resizeAndRotate(img image.Image, width, height int, devname string) image.I
2525

2626
func deviceSpecifics(devName string, width, height int) (*gift.GIFT, error) {
2727
switch devName {
28-
case "Streamdeck XL":
28+
case "Streamdeck XL", "Streamdeck (original v2)":
2929
return gift.New(
3030
gift.Resize(width, height, gift.LanczosResampling),
3131
gift.Rotate180(),
@@ -36,11 +36,6 @@ func deviceSpecifics(devName string, width, height int) (*gift.GIFT, error) {
3636
gift.Rotate90(),
3737
gift.FlipVertical(),
3838
), nil
39-
case "Streamdeck (original v2)":
40-
return gift.New(
41-
gift.Resize(width, height, gift.LanczosResampling),
42-
gift.Rotate180(),
43-
), nil
4439
default:
4540
return nil, errors.New(fmt.Sprintf("Unsupported Device: %s", devName))
4641
}

0 commit comments

Comments
 (0)