I'm not sure why you'd need an App to change the Display Orientation, and call that from within AGK.
IF your Display Hardware is using a different Display Orientation., then either change it in your Graphics Drivers (Linux) or via the Display Settings from Landscape to Portrate (Mac / Windows).
That way the Display will ALWAYS be that Orientation on System Boot, and AppGameKit won't know the difference as it's MaxDisplayWidth/Height will echo whatever it's told by the OS.
If you're on Windows: go to Settings > System > Display
Display Orientation is an option on there, and switch it... you'll see what I mean.
One of my Displays rotates and whenever I turn it 90 Degrees it will automatically apply said Orientation Switch; but I know some don't.
If you're doing this AFTER AppGameKit has started (for some reason) then call
UpdateDeviceSize( GetMaxDeviceWidth(), GetMaxDeviceHeight() )