systemRequestedQuit


#1

Hi,

Is there any way in Juce to know when systemRequestedQuit() is called directly by the OS? For example, when the user shutdown the computer while the app is running.
It’d be very useful to know it.

Maybe something like this?:

code
void systemRequestedQuit(bool os_closing=false);
(…)

(…)
case WM_QUERYENDSESSION:
if (JUCEApplication::getInstance() != nullptr)
{
JUCEApplication::getInstance()->systemRequestedQuit(true);
return MessageManager::getInstance()->hasStopMessageBeenSent();
}
return TRUE;
(…) [/code]