PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

changing screen orientation just before Update();

Hello.
My game works in landscape orientation.
I have to turn the screen upside - down.

How can I do it?
Can I override PHAL::Swap() function?
Petya_ wrote:Hello.
I have to turn the screen upside - down.


To turn or to mirror? (If you talking about mirror)You use landscape so you mean "upside-down landscape"-swap from left to right or "upside-down portrait"???-swap from top to bottom

You are talking about PocketHal or you make your game in PocketFrog(on top of PHal)?

The name of your topic "...before Update()" - does that mean that you want to change orientation during the game?
So.
We wrote the game that run only in landscape orientation (buttons are at right).
We want to make out game usable for lefthanders,
keep landscape orientation, but turn it 180', so buttons will be at left...
We do not want to change our drawing code, it is very sofisticated.

So, can we turn the screen upside-down just before or durind Display::Update()?
if you're using ORIENTATION_ROTATE90CCW, then use ORIENTATION_ROTATE90CW in game init. You don't need to do anything with overriding update.
thanks.
I was using ORIENTATION_ROTATE90CW;
and I replaced it with ORIENTATION_ROTATE90CCW,
(put m_config.orientation = ORIENTATION_ROTATE90CCW; in game constructor and Init()).

But nothing changed.
hp 2210, pocket frog 0.8.1
there were some issues with rotation on 2210
http://www.pocketmatrix.com/forums/view ... hp?t=18980
there are some suggestions how to fix this.

but if you have the same problem-that mean that you can't use even CW90(but you said that it is working fine :?:) -so maybe it's not your case.

P.S. Last time I sent you two PM's but you read only 1 of them :wink:
Petya_ wrote:
(put m_config.orientation = ORIENTATION_ROTATE90CCW; in game constructor and Init()).


You changed it in two places? It's supposed to be set in the constructor of the game class and you can't change it once the game starts.
I have solved this problem.
Orientation changing did not work on my pocketfrog.lib, I build it using evc 4.0 and sp 4.0.
When I replaced my library with library from installation, the bug disappeared.
So now I can change screen orientation with m_config.orientation