I am trying to find a way to trigger certain events (saving etc) when the user is closing the application through the X button not by pressing ESC.
As far as I know the exit function is not triggered in this case so I am trying to find if there is a way to do that through openframeworks directly or if there is an easy way to do it through glut.
I tried registering a function to trigger with the exit event of the ofMainLoop but it is crashing with a read access violation error on ofToDataPath.
I would like to ask if there an easy way to trigger events when a window closes? Can it be done through Openframeworks directly or should I start looking into the glut and windows callbacks.