MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / ProcessDialogEvent

Function ProcessDialogEvent

src/Window_SDL3.c:351–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349static SDL_DialogFileFilter* save_filters;
350
351static void ProcessDialogEvent(SDL_Event* e) {
352 char* result = e->user.data1;
353 int length = e->user.code;
354
355 cc_string path; char pathBuffer[1024];
356 String_InitArray(path, pathBuffer);
357 String_AppendUtf8(&path, result, length);
358
359 dlgCallback(&path);
360 dlgCallback = NULL;
361 Mem_Free(result);
362}
363
364static void DialogCallback(void *userdata, const char* const* filelist, int filter) {
365 if (!filelist) return; /* Error occurred */

Callers 1

Window_ProcessEventsFunction · 0.85

Calls 2

String_AppendUtf8Function · 0.85
Mem_FreeFunction · 0.70

Tested by

no test coverage detected