Closed JupiterRider closed 7 months ago
@TotallyGamerJet What do you think?
It what case does the original not work? Isn't the go implementation of bools just a byte where 0 is false and other values true?
I am working on a purego version of raylib. I figured out, that some functions didn't work. They always returned true.
Here is an example:
var isFileDropped func() uintptr
purego.RegisterLibFunc(&isFileDropped, raylib, "IsFileDropped")
fmt.Println(isFileDropped())
returns 140021448219136
https://github.com/raysan5/raylib/blob/master/src/rcore.c#L2205
I don't know, why this behavior affects only some functions.
Please make an issue and then answer these questions: Well that number is indeed not zero. Do u expect it to return false? what number does the C version return? What other functions always return true?
Sometimes C functions don't return 0 when false, but instead this conversion works.