Go-SDL
Go-SDL copied to clipboard
Fix event handling on Windows
Hey,
Windows event handling seems to be seriously broken. Using a separate goroutine doesn't work, because the main UI thread needs to run the message pump. This change fixes this. If compiled under windows, it does not start the pollEvents() goroutine, and it does not expose the Events channel. Instead, it makes PollEvents() public.
I don't like that it still creates the Events channel automatically on non-Windows OSes, but it the safest option.
Cheers,
Andreas