Function Display.orientation

Wraps SDL_GetDisplayOrientation (from SDL 2.0.9) which gets the display's orientation

DisplayOrientation orientation() @property @trusted const;

Returns

dsdl2.DisplayOrientation of the display