refactor mouse wheel handling code to be shared across SDL, glfw, glut