diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayclock.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/wayclock.cc b/src/wayclock.cc index 84a188e..e8879f4 100644 --- a/src/wayclock.cc +++ b/src/wayclock.cc @@ -73,12 +73,6 @@ int main() { wayc_defer(wayc_font_deinit(&font)); - struct atlas_s atlas; - if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT)) - wayc_panic("Failed to initialize atlas"); - - wayc_defer(wayc_atlas_deinit(&atlas)); - struct eventloop_s loop; if (wayc_eventloop_init(&loop, wayc_handle) != EVENTLOOP_ERROR_NONE) wayc_panic("Failed to initialize event loop"); @@ -109,8 +103,14 @@ int main() { wayc_panic("Failed to initialize renderer"); wayc_defer(wayc_renderer_deinit(&renderer)); - wayc_renderer_use(&renderer); + + struct atlas_s atlas; + if (!wayc_atlas_init(&atlas, WAYC_ATLAS_WIDTH, WAYC_ATLAS_HEIGHT)) + wayc_panic("Failed to initialize atlas"); + + wayc_defer(wayc_atlas_deinit(&atlas)); + wayc_window_redraw(&window, &loop); struct app_s app = {&renderer, &fctx, &font, &atlas}; |
