window creation
This commit is contained in:
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user