Force portrait mode on Windows 8 Desktop

Hi everybody,

I’m developing a game in portrait mode, and i want to avoid the landscape, this is quite easy en Windows phone and Android platforms, but what about Windows 8? How can i force the portrait mode in a desktop PC with Windows 8?

Actually i have only checked the portrait mode in the app manifest, but it still trying to show the landscape in Windows 8 (see the attached images)

Is there any workaround to force Windows 8 to portrait mode?

Thanks folks!

Windows 8 will display what the user chooses, i.e. the current screen orientation. I am pretty sure that all apps must support fullscreen landscape mode, so you probably can’t force it to display in portrait at all times (it would fail certification). But I’m not 100% certain.

Don’t forget that most desktop PCs will not have a portrait screen, and Windows tablets are generally designed to be used in landscape primarily.

The best approach would be to have it act like your screens: thin with empty space around the edges (or use the space for ads or UI), and then fullscreen in portrait mode.

If you set supported orientations to portrait only (whether in manifest or via Unity API), application will run only in portrait. Not sure about desktop, but it does work on tablet.

Thanks for the replies,

Aurimas, that’s right, setting supported orientations to portrait works perfectly on tablets and phones, but doesn’t work in desktop devices… i’m thinking that the approach that says pumpkinszwan is the only good one…

Why would you want to force portrait mode on a desktop anyway? It’s very rare for people to use their monitors in portrait on a desktop or laptop PC, and it’s not at all convenient for a user to be forced to rotate their monitor.

Windows ‘knows’ what hardware it’s running on, and behaves accordingly. It knows a tablet is portable, and that’s probably why it lets you force portrait mode. Likewise it knows PCs have fixed screens (generally).

To be honest, if I installed a game on my desktop or laptop and it forced itself to portrait mode, I’d uninstall it immediately.