Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK2 T1 - SetOrientationAllowed question

Author
Message
Grook
AGK Backer
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: Lancashire, England
Posted: 28th Nov 2014 13:15 Edited at: 28th Nov 2014 13:16
My app works in both portrait and landscape mode but I don't want to allow the orientation of the device to be changed when you are running it. I.e. The orientation is set at the point of running to whatever it currently is.
I thought the correct way to deal with this was to use SetOrientationAllowed(0,0,0,0) but this has no effect on the built APK.
Am I doing something wrong or is there a way to achieve what I want?

"It is said that your life flashes before your eyes just before you die. That is true, it's called Life.”
janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 28th Nov 2014 16:30 Edited at: 28th Nov 2014 16:32
Hi,

How about:

at the beginning of your code, so you enable the current orientation and disable the others.
Bitwise compare may be shorter ^^

janbo
16
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 28th Nov 2014 16:31 Edited at: 28th Nov 2014 16:32
Ops double post

Grook
AGK Backer
12
Years of Service
User Offline
Joined: 22nd Jun 2012
Location: Lancashire, England
Posted: 28th Nov 2014 19:58 Edited at: 28th Nov 2014 19:58
Nice one janbo, I'll give that a try. Thanks.

"It is said that your life flashes before your eyes just before you die. That is true, it's called Life.”

Login to post a reply

Server time is: 2024-11-25 11:38:35
Your offset time is: 2024-11-25 11:38:35