From b2e4d58259d8e4ca744d40ad53bb3ca5e3d0ed3d Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 12 Jun 2017 21:33:35 +0100 Subject: avoid crash with too few items --- menuApp/src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'menuApp/src/main.cpp') diff --git a/menuApp/src/main.cpp b/menuApp/src/main.cpp index e0837f0..3c31279 100644 --- a/menuApp/src/main.cpp +++ b/menuApp/src/main.cpp @@ -3,11 +3,12 @@ //======================================================================== int main( ){ - + int width=(1920*FACTOR*sin(ROTATION))+(1080*FACTOR*cos(ROTATION)); + int height=(1920*FACTOR*cos(ROTATION))+(1080*FACTOR*sin(ROTATION)); #ifdef FULLSCREEN - ofSetupOpenGL(1080*FACTOR, 1920*FACTOR,OF_FULLSCREEN); + ofSetupOpenGL(width,height,OF_FULLSCREEN); #else - ofSetupOpenGL(1080*FACTOR, 1920*FACTOR,OF_WINDOW); // <-------- setup the GL context + ofSetupOpenGL(width,height,OF_WINDOW); #endif // this kicks off the running of my app // can be OF_WINDOW or OF_FULLSCREEN -- cgit v1.2.3