support for screen rotation (fixes #12)