Simplify screen initialization

Use a single function to initialize the screen instance.
This commit is contained in:
Romain Vimont
2021-02-25 22:06:33 +01:00
parent 597c54f049
commit cc48b24324
3 changed files with 22 additions and 31 deletions

View File

@@ -54,15 +54,11 @@ struct screen_params {
bool mipmaps;
};
// initialize default values
void
screen_init(struct screen *screen, struct video_buffer *vb,
struct fps_counter *fps_counter);
// initialize screen, create window, renderer and texture (window is hidden)
bool
screen_init_rendering(struct screen *screen,
const struct screen_params *params);
screen_init(struct screen *screen, struct video_buffer *vb,
struct fps_counter *fps_counter,
const struct screen_params *params);
// show the window
void