Get middle of screen


#21

Yes, of course !
What we are talking about is a bug. So it will be fixed later, but I can propose the best workaround I can give you. Sorry the first one didn’t work as expected. It’s tricky when things are not logical :slight_smile:

//ofApp.h : 
        bool once = true;
        float appWidth;
        float appHeight;
//ofApp.cpp : 
// in the setup() function:
    appWidth = ofGetWidth();
    appHeight = ofGetHeight();
// in the beginning of the draw() function (wouldn't work either in update) : 
    if (once){
        switch (ofGetWindowMode()){
        case 0:
            ofLog() << "App is in OF_WINDOW mode";
            break;
        case 1:
            ofLog() << "App is in OF_FULLSCREEN mode";
            break;
        case 2:
            ofLog() << "App is in OF_GAME_MODE... mode";
            break;
        }
    ofLog() << "App size was set to : " << appWidth << "x" << appHeight;
    ofLog() << "App is running at : " << ofGetWidth() << "x" << ofGetHeight();
    once = false;
    // <You can make your size dependent setup here !>
    }

On the terminal, you should get :

[notice ] App is in OF_FULLSCREEN mode
[notice ] App size was set to : 640x480
[notice ] App is running at : 1920x1080

#22

This solution works, thank you so much!!