window creation

This commit is contained in:
2026-04-11 01:10:34 -05:00
parent 9c98964588
commit f03f521141
7 changed files with 43 additions and 10 deletions

View File

@@ -15,12 +15,27 @@ void App::init() {
utils::debugPrint(__FUNCTION__, __LINE__, "Init app.");
window_ = new Window();
}
int App::run() {
utils::debugPrint(__FUNCTION__, __LINE__, "Run app.");
bool quit = false;
while (!quit) {
// app loop for as long as the window is open
// poll events here
// other threads might be able to change quit to true to auto close
while( SDL_PollEvent( &e ) != 0 ) {
if( e.type == SDL_QUIT ) {
// Ctrl + C in console !
}
}
}
return 0;
}