Archive 17/01/2023.

Proper way to exit the application

shifttab

I have a subsystem that listens to E_EXITREQUESTED which is called when quitting the application by clicking on the x close button of the window but it is not called when quitting with GetSubsystem<Engine>()->Exit();

How can I gurantee that E_EXITREQUESTED is triggered?

throwawayerino

The event is intended as a way to call Engine::Exit(), not the other way around.
Have you considered sending the E_EXITREQUESTED event yourself? Engine subsystem listens to it.