set screen size using struct.

This commit is contained in:
Miroslav Šedivý
2021-01-15 17:30:19 +01:00
parent 0e09609c67
commit 3bbe3781c8
8 changed files with 30 additions and 21 deletions

View File

@ -11,7 +11,7 @@ import (
type Desktop struct {
ScreenWidth int
ScreenHeight int
ScreenRate int
ScreenRate int16
}
func (Desktop) Init(cmd *cobra.Command) error {
@ -39,7 +39,7 @@ func (s *Desktop) Set() {
if err1 == nil && err2 == nil && err3 == nil {
s.ScreenWidth = int(width)
s.ScreenHeight = int(height)
s.ScreenRate = int(rate)
s.ScreenRate = int16(rate)
}
}
}