Browse Source

Review UnloadAutomationEventList (#3658)

* Review UnloadAutomationEventList

* Update raylib.h

* Update rcore.c

* Update core_automation_events.c

* Fix mistake
pull/3667/head
Antonis Geralis 1 year ago
committed by GitHub
parent
commit
7ca95512d8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 7 deletions
  1. +1
    -1
      examples/core/core_automation_events.c
  2. +1
    -1
      src/raylib.h
  3. +2
    -5
      src/rcore.c

+ 1
- 1
examples/core/core_automation_events.c View File

@ -98,7 +98,7 @@ int main(void)
// Supports loading .rgs style files (text or binary) and .png style palette images // Supports loading .rgs style files (text or binary) and .png style palette images
if (IsFileExtension(droppedFiles.paths[0], ".txt;.rae")) if (IsFileExtension(droppedFiles.paths[0], ".txt;.rae"))
{ {
UnloadAutomationEventList(o">&aelist);
UnloadAutomationEventList(aelist);
aelist = LoadAutomationEventList(droppedFiles.paths[0]); aelist = LoadAutomationEventList(droppedFiles.paths[0]);
eventRecording = false; eventRecording = false;

+ 1
- 1
src/raylib.h View File

@ -1138,7 +1138,7 @@ RLAPI unsigned char *DecodeDataBase64(const unsigned char *data, int *outputSize
// Automation events functionality // Automation events functionality
RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS RLAPI AutomationEventList LoadAutomationEventList(const char *fileName); // Load automation events list from file, NULL for empty list, capacity = MAX_AUTOMATION_EVENTS
RLAPI void UnloadAutomationEventList(AutomationEventList o">*list); // Unload automation events list from file
RLAPI void UnloadAutomationEventList(AutomationEventList list); // Unload automation events list from file
RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file RLAPI bool ExportAutomationEventList(AutomationEventList list, const char *fileName); // Export automation events list as text file
RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to RLAPI void SetAutomationEventList(AutomationEventList *list); // Set automation event list to record to
RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording RLAPI void SetAutomationEventBaseFrame(int frame); // Set automation event internal base frame to start recording

+ 2
- 5
src/rcore.c View File

@ -2480,13 +2480,10 @@ AutomationEventList LoadAutomationEventList(const char *fileName)
} }
// Unload automation events list from file // Unload automation events list from file
void UnloadAutomationEventList(AutomationEventList o">*list)
void UnloadAutomationEventList(AutomationEventList list)
{ {
#if defined(SUPPORT_AUTOMATION_EVENTS) #if defined(SUPPORT_AUTOMATION_EVENTS)
RL_FREE(list->events);
list->events = NULL;
list->count = 0;
list->capacity = 0;
RL_FREE(list.events);
#endif #endif
} }

Loading…
Cancel
Save