Fixing the "ScreenShot" method.
parent
59e4b137c5
commit
d84ad7763c
|
@ -413,8 +413,13 @@ func (c *Cli) ScreenSize() (ret []int, err error) {
|
|||
return ret, err
|
||||
}
|
||||
|
||||
func (c *Cli) ScreenShot(fmt string) (ret interface{}, err error) {
|
||||
err = c.HttpCli().JsonGet("/ipc/wingui/screen/shot?fmt="+fmt, &ret)
|
||||
func (c *Cli) ScreenShot(frmt string) (ret []byte, err error) {
|
||||
url := fmt.Sprintf("/ipc/wingui/screen/shot?fmt=%s", frmt)
|
||||
|
||||
ret, err = c.HttpCli().RawGet(url)
|
||||
if err != nil {
|
||||
fmt.Print(err.Error())
|
||||
}
|
||||
return ret, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue