remove xorg ValidScreenSize double checking.

This commit is contained in:
Miroslav Šedivý
2020-10-30 19:32:52 +01:00
parent dc32e64190
commit b4a233ef2e
2 changed files with 6 additions and 29 deletions

View File

@ -165,20 +165,6 @@ func CheckKeys(duration time.Duration) {
}
}
func ValidScreenSize(width int, height int, rate int) bool {
for _, size := range ScreenConfigurations {
if size.Width == width && size.Height == height {
for _, fps := range size.Rates {
if int16(rate) == fps {
return true
}
}
}
}
return false
}
func ChangeScreenSize(width int, height int, rate int) error {
mu.Lock()
defer mu.Unlock()
@ -194,7 +180,7 @@ func ChangeScreenSize(width int, height int, rate int) error {
}
}
return fmt.Errorf("unknown configuration")
return fmt.Errorf("Unknown screen configuration %dx%d@%d.", width, height, rate)
}
func GetScreenSize() *types.ScreenSize {