From 6434928f2d70c240f4cf766cbc2aa6dec989e2e3 Mon Sep 17 00:00:00 2001 From: vcaesar Date: Sat, 30 Dec 2017 17:49:15 +0800 Subject: [PATCH] fix some range and update c name --- bitmap/goBitmap.h | 2 +- robotgo.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bitmap/goBitmap.h b/bitmap/goBitmap.h index 30907d9..98efc3c 100644 --- a/bitmap/goBitmap.h +++ b/bitmap/goBitmap.h @@ -162,7 +162,7 @@ char *bitmap_save(MMBitmapRef bitmap, char *path, uint16_t type){ return "ok"; } -char *tostring_Bitmap(MMBitmapRef bitmap){ +char *tostring_bitmap(MMBitmapRef bitmap){ char *buf = NULL; MMBMPStringError err; diff --git a/robotgo.go b/robotgo.go index 60640f4..01be98f 100644 --- a/robotgo.go +++ b/robotgo.go @@ -62,7 +62,7 @@ import ( ) const ( - version string = "v0.47.0.466, Mount Cook!" + version string = "v0.47.0.471, Mount Cook!" ) type ( @@ -381,7 +381,7 @@ func MoveMouseSmooth(x, y int, args ...interface{}) { mouseDelay = args[2].(int) } - if len(args) > 0 { + if len(args) > 1 { low = C.double(args[0].(float64)) high = C.double(args[1].(float64)) } else { @@ -407,7 +407,7 @@ func MoveSmooth(x, y int, args ...interface{}) { mouseDelay = args[2].(int) } - if len(args) > 0 { + if len(args) > 1 { low = C.double(args[0].(float64)) high = C.double(args[1].(float64)) } else { @@ -873,13 +873,13 @@ func SaveBitmap(args ...interface{}) string { // TostringBitmap tostring bitmap to string func TostringBitmap(bit C.MMBitmapRef) string { - strBit := C.tostring_Bitmap(bit) + strBit := C.tostring_bitmap(bit) return C.GoString(strBit) } // TocharBitmap tostring bitmap to C.char func TocharBitmap(bit C.MMBitmapRef) *C.char { - strBit := C.tostring_Bitmap(bit) + strBit := C.tostring_bitmap(bit) return strBit }