Added SDL_CleanupEvent()

This is used to free any dynamically allocated memory in events.
This commit is contained in:
Sam Lantinga committed 2023-11-04 06:47:24 -07:00
1 parent c4bf05fd9d
commit 7e445da569
20 files changed
+146 -232

No files matched your search

+3 -3
View File
@@ -1178,9 +1178,9 @@ int SDL_AppEvent(const SDL_Event *event)
break;
case SDL_EVENT_DROP_FILE:
SDL_Log("Drop file! '%s'", event->drop.file);
LoadWavThing(event->drop.file, event->drop.x, event->drop.y);
/* SDL frees event->drop.file for you when you use SDL_AppEvent(). */
SDL_Log("Drop file! '%s'", event->drop.data);
LoadWavThing(event->drop.data, event->drop.x, event->drop.y);
/* SDL frees event->drop.data for you when you use SDL_AppEvent(). */
break;
case SDL_EVENT_WINDOW_RESIZED: