sdl2: restore joystick code

remarkably it still works even though the API has changed.