Go-SDL icon indicating copy to clipboard operation
Go-SDL copied to clipboard

Fix event handling on Windows

Open asig opened this issue 11 years ago • 3 comments

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

asig avatar Jun 26 '13 08:06 asig