From 717a614489e2bccd169526737aa7a8f431824031 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sat, 10 Feb 2024 02:11:28 -0500 Subject: [PATCH] Fix AutomationEventList for raylib >= 5.1 --- include/AutomationEventList.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/AutomationEventList.hpp b/include/AutomationEventList.hpp index 77001989..9c56185f 100644 --- a/include/AutomationEventList.hpp +++ b/include/AutomationEventList.hpp @@ -81,9 +81,14 @@ class AutomationEventList : public ::AutomationEventList { /** * Update audio stream buffers with data */ - AutomationEventList& Unload() { + void Unload() { + #if RAYLIB_VERSION_MAJOR >= 5 + #if RAYLIB_VERSION_MINOR == 0 ::UnloadAutomationEventList(this); - return *this; + #elif RAYLIB_VERSION_MINOR >= 1 + ::UnloadAutomationEventList(*this); + #endif + #endif } bool IsReady() {