Hello everyone,
I hope I did not miss an earlier post with the same question: I ran into a problem trying to use displayWidth/displayHeight within the iPhone app. The code is:
void settings() {
fullScreen();
cwh = min(displayWidth,displayHeight);
mainXoff= (displayWidth - cwh)/2;
mainYoff= (displayHeight - cwh)/2;
}
cwh, mainXoff and mainYoff are all declared as interegs. The latter two are added as offset-values to x/y-coordinates.
I am intending to center a square canvas on a horizontally and vertically screen likewise. This works fine within the developping environment, but meets problems within the iphone processing app. “Reference Error: Can’t find the variable ‘displayWidth’. Suggestion for solution: comment out.”
Would be grateful for any suggestion for a a solution or work-around…!