diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 17 | 
1 files changed, 6 insertions, 11 deletions
@@ -35,18 +35,18 @@ int main(int argc, char* argv[]) {    (void)argc;    (void)argv; -  struct AUTO(DecodeContext)* decode_context = DecodeContextCreate(); -  if (!decode_context) { -    LOG("Failed to create decode context"); -    return EXIT_FAILURE; -  } -    struct AUTO(Window)* window = WindowCreate();    if (!window) {      LOG("Failed to create window");      return EXIT_FAILURE;    } +  struct AUTO(DecodeContext)* decode_context = DecodeContextCreate(window); +  if (!decode_context) { +    LOG("Failed to create decode context"); +    return EXIT_FAILURE; +  } +    int events_fd = WindowGetEventsFd(window);    if (events_fd == -1) {      LOG("Failed to get events fd"); @@ -84,11 +84,6 @@ int main(int argc, char* argv[]) {        LOG("Failed to process window events");        return EXIT_FAILURE;      } -    const struct Frame* frame = DecodeContextGetFrame(decode_context); -    if (frame && !WindowRenderFrame(window, frame)) { -      LOG("Failed to render frame"); -      return EXIT_FAILURE; -    }    }    return EXIT_SUCCESS;  | 
