veandco / go-sdl2

SDL2 binding for Go
https://godoc.org/github.com/veandco/go-sdl2
BSD 3-Clause "New" or "Revised" License
2.17k stars 219 forks source link

Using depracated function SDL_GetRevisionNumber() #490

Closed MightyPancake closed 2 years ago

MightyPancake commented 2 years ago

Please correct me if I'm wrong, but I think SDL_GetRevisionNumber() is being used and SDL2 outputs a warning about it being a deprecated thing. Although the binding still works, it outputs this nasty warning # github.com/veandco/go-sdl2/sdl cgo-gcc-prolog: In function '_cgo_a4414542972c_Cfunc_SDL_GetRevisionNumber': From what I found replacing the call with SDL_GetRevision() should do the trick, I'm just having a hard time finding it.

Thanks in advance!

veeableful commented 2 years ago

Hi @MightyPancake, thanks for reporting this issue! I pushed a commit that should show the deprecation warning on staticcheck (also on VS Code using the plugin) only when users use sdl.GetRevisionNumber().

MightyPancake commented 2 years ago

Hi @MightyPancake, thanks for reporting this issue! I pushed a commit that should show the deprecation warning on staticcheck (also on VS Code using the plugin) only when users use sdl.GetRevisionNumber().

Everything works after this commit got released! Thanks for the great response time. Cheers!