Handle window resizing in screen

Only the screen knows what to do when the window is resized.

This paves the way to do other actions on window resizing.
This commit is contained in:
Romain Vimont
2019-10-20 15:32:33 +02:00
parent 683f7ca848
commit 39ff8d9900
3 changed files with 12 additions and 1 deletions

View File

@@ -278,6 +278,11 @@ screen_update_frame(struct screen *screen, struct video_buffer *vb) {
return true;
}
void
screen_window_resized(struct screen *screen) {
screen_render(screen);
}
void
screen_render(struct screen *screen) {
SDL_RenderClear(screen->renderer);