mirror of https://github.com/jetkvm/kvm.git
Compare commits
No commits in common. "16815a71b1972f5ee0392d4391dee8c6ee79375f" and "4c0bc7e6dbb68eb894c9e83e60ef45dd41a50ac1" have entirely different histories.
16815a71b1
...
4c0bc7e6db
|
@ -113,7 +113,7 @@ func (u *UsbGadget) AbsMouseWheelReport(wheelY int8) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
err := u.absMouseWriteHidFile([]byte{
|
err := u.absMouseWriteHidFile([]byte{
|
||||||
2, // Report ID 2
|
2, // Report ID 2
|
||||||
byte(wheelY), // Wheel Y (signed)
|
byte(wheelY), // Wheel Y (signed)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,14 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Helper function to get absolute value of float64
|
||||||
|
func abs(x float64) float64 {
|
||||||
|
if x < 0 {
|
||||||
|
return -x
|
||||||
|
}
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
|
||||||
func joinPath(basePath string, paths []string) string {
|
func joinPath(basePath string, paths []string) string {
|
||||||
pathArr := append([]string{basePath}, paths...)
|
pathArr := append([]string{basePath}, paths...)
|
||||||
return filepath.Join(pathArr...)
|
return filepath.Join(pathArr...)
|
||||||
|
|
Loading…
Reference in New Issue