Remove app::on_quit(), use app::stop() instead

This commit is contained in:
Nikita Lisitsa 2022-12-13 22:40:22 +03:00
parent 30c35fd768
commit 9f045c18a8
2 changed files with 1 additions and 7 deletions

View file

@ -43,7 +43,6 @@ namespace psemek::app
virtual bool running() const; virtual bool running() const;
virtual void stop(); virtual void stop();
virtual void on_quit();
void on_resize(int width, int height) override; void on_resize(int width, int height) override;

View file

@ -137,11 +137,6 @@ namespace psemek::app
gl::Viewport(0, 0, width, height); gl::Viewport(0, 0, width, height);
} }
void app::on_quit()
{
impl().running = false;
}
void app::poll_events() void app::poll_events()
{ {
auto handler = [this]{ return impl().get_scene(); }; auto handler = [this]{ return impl().get_scene(); };
@ -149,7 +144,7 @@ namespace psemek::app
for (SDL_Event e; SDL_PollEvent(&e);) switch (e.type) for (SDL_Event e; SDL_PollEvent(&e);) switch (e.type)
{ {
case SDL_QUIT: case SDL_QUIT:
on_quit(); stop();
break; break;
case SDL_WINDOWEVENT: switch (e.window.event) case SDL_WINDOWEVENT: switch (e.window.event)
{ {