file: apply SDL dialog result on main thread - #296
Merged
Conversation
Owner
Author
|
Fix conflicts |
RobLoach
marked this pull request as draft
July 20, 2026 03:16
RobLoach
force-pushed
the
fix-sdl-dialog-thread
branch
from
July 21, 2026 02:25
c512a75 to
38892b4
Compare
RobLoach
marked this pull request as ready for review
July 21, 2026 02:25
RobLoach
commented
Jul 29, 2026
| NK_MEMCPY(data->file_path_buffer, filelist[0], (nk_size)(len + 1)); | ||
| nk_console_trigger_event(file, NK_CONSOLE_EVENT_CHANGED); | ||
|
|
||
| nk_console_file_sdl_dialog_result* result = (nk_console_file_sdl_dialog_result*)SDL_malloc(sizeof(nk_console_file_sdl_dialog_result)); |
Owner
Author
There was a problem hiding this comment.
Is there a better way to handle this via SDL_LockMutex() or the like? or have the path variable from nk_console_file_sdl_dialog_result to be part of the nk_console file data to save having to re-implement another struct?
RobLoach
marked this pull request as draft
July 29, 2026 18:46
RobLoach
marked this pull request as ready for review
July 31, 2026 03:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDL may invoke the dialog callback off the main thread, so stage the selected path and apply it via SDL_RunOnMainThread. Fixes #290