Got the autorotation working.