GabrielFrigo4 / SDL-Sharp

SDL2 for C#
Other
17 stars 3 forks source link

WindowEvent 18 (SDL_WINDOWEVENT_DISPLAY_CHANGED) not in WindowEventID Enum #45

Closed DoogeJ closed 6 months ago

DoogeJ commented 6 months ago

When I move a window to another monitor, a WindowEvent is raised and e.Window.Evt is 18. I assume this is SDL_WINDOWEVENT_DISPLAY_CHANGED when I look at https://wiki.libsdl.org/SDL2/SDL_WindowEventID

That also means that SDL_WINDOWEVENT_ICCPROF_CHANGED should be 17 and is currently also not in the WindowEventID Enum.

https://github.com/GabrielFrigo4/SDL-Sharp/blob/master/SDL-Sharp/SDL/SDL.Video.cs#L46

I could of course make a pull request if you prefer that :)

GabrielFrigo4 commented 6 months ago

Really is missing those 2 lines

SDL_WINDOWEVENT_ICCPROF_CHANGED,/**< The ICC profile of the window's display has changed. */
SDL_WINDOWEVENT_DISPLAY_CHANGED /**< Window has been moved to display data1. */

I made a Commit, test it to see if it's working

DoogeJ commented 6 months ago

Thanks a lot, this works great!