Skip to content

Commit 717a614

Browse files
committed
Fix AutomationEventList for raylib >= 5.1
1 parent e6547e9 commit 717a614

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

include/AutomationEventList.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,14 @@ class AutomationEventList : public ::AutomationEventList {
8181
/**
8282
* Update audio stream buffers with data
8383
*/
84-
AutomationEventList& Unload() {
84+
void Unload() {
85+
#if RAYLIB_VERSION_MAJOR >= 5
86+
#if RAYLIB_VERSION_MINOR == 0
8587
::UnloadAutomationEventList(this);
86-
return *this;
88+
#elif RAYLIB_VERSION_MINOR >= 1
89+
::UnloadAutomationEventList(*this);
90+
#endif
91+
#endif
8792
}
8893

8994
bool IsReady() {

0 commit comments

Comments
 (0)