See https://github.com/PistonDevelopers/sdl2_window/pull/150 This could be made more readable by refactoring it to a function that creates the window.