修改截图调用方式,加入可选的尺寸参数

This commit is contained in:
2025-03-22 10:19:54 +08:00
parent d8b3c87347
commit b5fcc72f63
5 changed files with 103 additions and 10 deletions

View File

@@ -10,8 +10,8 @@ import (
)
//export GetScreen
func GetScreen(host *C.char, data **C.char, length *C.int) *C.char {
imgBytes, err := client.RealGetScreen(C.GoString(host))
func GetScreen(host *C.char, data **C.char, length *C.int, width C.int, height C.int) *C.char {
imgBytes, err := client.RealGetScreen(C.GoString(host), int(width), int(height))
if err != nil {
return C.CString(err.Error())
}