Skip to content

Commit 4aff9c7

Browse files
sh1l0hRobLoach
andauthored
demo/sdl3_renderer/main.c: call nk_input_begin at the end of SDL_AppInit (#865)
* demo/sdl3_renderer/main.c: call nk_input_begin at the end of SDL_AppInit * Fix shutdown sequence for nk_sdl_app --------- Co-authored-by: Rob Loach <RobLoach@users.noreply.github.com>
1 parent 7295164 commit 4aff9c7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

demo/sdl3_renderer/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ SDL_AppInit(void** appstate, int argc, char* argv[])
287287
}
288288
#endif
289289

290+
nk_input_begin(ctx);
291+
290292
return SDL_APP_CONTINUE;
291293
}
292294

@@ -406,6 +408,7 @@ SDL_AppQuit(void* appstate, SDL_AppResult result)
406408
NK_UNUSED(result);
407409

408410
if (app) {
411+
nk_input_end(app->ctx);
409412
nk_sdl_shutdown(app->ctx);
410413
SDL_DestroyRenderer(app->renderer);
411414
SDL_DestroyWindow(app->window);

0 commit comments

Comments
 (0)