Update LoadImageAnim to match purego signature
This commit is contained in:
parent
4da4ec54eb
commit
23f1ab19b7
1 changed files with 2 additions and 2 deletions
|
@ -104,10 +104,10 @@ func LoadImageRaw(fileName string, width, height int32, format PixelFormat, head
|
||||||
}
|
}
|
||||||
|
|
||||||
// LoadImageAnim - Load image sequence from file (frames appended to image.data)
|
// LoadImageAnim - Load image sequence from file (frames appended to image.data)
|
||||||
func LoadImageAnim(fileName string, frames *int32) *Image {
|
func LoadImageAnim(fileName string, frames []int32) *Image {
|
||||||
cfileName := C.CString(fileName)
|
cfileName := C.CString(fileName)
|
||||||
defer C.free(unsafe.Pointer(cfileName))
|
defer C.free(unsafe.Pointer(cfileName))
|
||||||
cframes := (*C.int)(frames)
|
cframes := (*C.int)(unsafe.Pointer(&frames[0]))
|
||||||
ret := C.LoadImageAnim(cfileName, cframes)
|
ret := C.LoadImageAnim(cfileName, cframes)
|
||||||
v := newImageFromPointer(unsafe.Pointer(&ret))
|
v := newImageFromPointer(unsafe.Pointer(&ret))
|
||||||
return v
|
return v
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue