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

Add HDC & hInstance to windows SysWMinfo struct #494

Closed CannibalVox closed 2 years ago

CannibalVox commented 2 years ago

https://github.com/libsdl-org/SDL/blob/main/include/SDL_syswm.h#L231 SDL includes HWND, HDC, and HINSTANCE in the windows-related SysWMinfo structure. These are useful values if you have occasion to open up the guts and do something inadvisable & it would be nice if they were available

CannibalVox commented 2 years ago

The original code was HWND-only because information was drawn from a stackoverflow answer that predated HDC & HINSTANCE in SDL: https://github.com/veandco/go-sdl2/issues/1#issuecomment-31317054

veeableful commented 2 years ago

Thank you @CannibalVox! I will merge this now.