Skip to content

Commit

Permalink
ci: use build tags to support legacy + new device
Browse files Browse the repository at this point in the history
  • Loading branch information
Lewiscowles1986 committed Oct 6, 2024
1 parent 3154e07 commit d1a7948
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ renews.arm:

renews.arm64:
go get ./...
env GOOS=linux GOARCH=arm64 go build -o renews.arm64
env GOOS=linux GOARCH=arm64 go build -tags "rmpp" -o renews.arm64

renews.x86:
go get ./...
Expand Down
8 changes: 8 additions & 0 deletions screen.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build !rmpp
// +build !rmpp

package main

func GetScreenSize() (int, int) {
return 1404, 1872
}
8 changes: 8 additions & 0 deletions screen_rmpp.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build rmpp
// +build rmpp

package main

func GetScreenSize() (int, int) {
return 1620, 2160
}
3 changes: 1 addition & 2 deletions sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ func adjust(img image.Image, mode string, scale float64) image.Image {

debug("Adjusting image")

re_width := 1620
re_height := 2160
re_width, re_height := GetScreenSize()

if mode == "fill" {
// scale image to remarkable width
Expand Down

0 comments on commit d1a7948

Please sign in to comment.