mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
xorg: filter out all irrelevant screen rates.
This commit is contained in:
parent
c0c14b3ac2
commit
e8286dec96
@ -284,6 +284,13 @@ func goCreateScreenSize(index C.int, width C.int, height C.int, mwidth C.int, mh
|
|||||||
}
|
}
|
||||||
|
|
||||||
//export goSetScreenRates
|
//export goSetScreenRates
|
||||||
func goSetScreenRates(index C.int, rate_index C.int, rate C.short) {
|
func goSetScreenRates(index C.int, rate_index C.int, rateC C.short) {
|
||||||
ScreenConfigurations[int(index)].Rates[int(rate_index)] = int16(rate)
|
rate := int16(rateC)
|
||||||
|
|
||||||
|
// filter out all irrelevant rates
|
||||||
|
if rate > 60 || (rate > 30 && rate % 10 != 0){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
ScreenConfigurations[int(index)].Rates[int(rate_index)] = rate
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user