Changed orientation api to be more cross platform