Skip to content

Conversation

@sh1l0h
Copy link

@sh1l0h sh1l0h commented Dec 14, 2025

The very first nk_input_end call in SDL_AppIterate occurs without a preceding nk_input_begin call. While not critical, this violates the expected pairing of these functions.

@sleeptightAnsiC
Copy link
Contributor

sleeptightAnsiC commented Dec 14, 2025

Hi,

While not critical, this violates the expected pairing of these functions.

Does the lack of first nk_input_begin cause any observable issue? or is there any documentation that mentions this being invalid? We intentionally made it this way and never had any issues since.

The nk_input_end only memzero'es few values in the nk_input, there is nothing wrong if you call it without preceding call to nk_input_begin. In fact, the first input cycle will do nothing, if you don't have any UI state created.

Also, if you're already adding nk_input_begin to SDL_AppInit, you should probably also add nk_input_end to SDL_AppQuit, just for the sake of consistency.

@sh1l0h
Copy link
Author

sh1l0h commented Dec 15, 2025

Hey,

Fair enough. The input documentation does describe the pairing as the expected pattern, but if it's intentional and working as designed, that's fine.

You can close this if you'd prefer to keep it as-is.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants