|
SDL3pp
A slim C++ wrapper for SDL3
|
Base class for SDL3PP_MAIN_USE_CLASS_CALLBACKS main callback classes. More...
Public Member Functions | |
| virtual SDL::AppResult | Init () |
| Called to initialize the app. | |
| virtual SDL::AppResult | Iterate () |
| Called to iterate the app. | |
| virtual SDL::AppResult | Event (const SDL::Event &ev) |
| Called to handle an event. | |
| virtual void | quit (SDL::AppResult result) |
| Called to quit the app. | |
Base class for SDL3PP_MAIN_USE_CLASS_CALLBACKS main callback classes.
This is an alternative that already includes exception handling and logging, so you have sensible behavior for C++.
Also, you can just override the functions you need, and rely on the default behavior of the others, which is to continue iterating until a quit event is received, at which point it will exit with success.