How to call setRequestedOrientation() from ofApp.cpp?

Hi, I’m trying to limit available orientation in Android.
It works well by setting the below flag on manifest file.


But I would like to set it by coding.
I found this question from the link below.

And it says I can set it with the following code.


But I have no idea how to call this method from ofApp.cpp file.
Can someone please teach me how to do it?

    ofSetOrientation(OF_ORIENTATION_90_LEFT); // or OF_ORIENTATION_90_RIGHT
1 Like

Thank you @Hennio.
I didn’t know ofSetOrientation() calls setRequestedOrientation() internally.