Frequent crashes on orientation function - anyone

edited March 2014 in Android Mode

Hello,

I'm using orientation function in my sketch. So far seemed like working fine, until I've tried it on other phones... It seems that app crashes, if phone is not in LANDSCAPE mode already... It doens't crash if I hold phone in LANDSCAPE position... When I try to run it in Emulator, it crashes all the time because emulators are all in PORTRAIT orientation by default...

Any advice what am I doing wrong ?

Thanks in advance,

Bulek.

void setup() {


  orientation(LANDSCAPE);

  size(displayWidth, displayHeight);
  if (DEBUG>0) println(millis()/1000.0 + " GUI: displayWidth:" + displayWidth + " displayHeight:" + displayHeight );

Answers

  • This is a common issue. See this post for a solution.

  • It works. Thanks for help... It seems that audio is a problem on Emulator, but that's another story...

    Regards, Bulek.

Sign In or Register to comment.