From 5268babfe01db32e80949f7df63ad609e07d635e Mon Sep 17 00:00:00 2001 From: JupiterRider <60042618+JupiterRider@users.noreply.github.com> Date: Wed, 23 Oct 2024 20:48:36 +0200 Subject: [PATCH] #431 AutomationEventList.GetEvents method added --- raylib/raylib.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/raylib/raylib.go b/raylib/raylib.go index 661d691..d8ecb5f 100644 --- a/raylib/raylib.go +++ b/raylib/raylib.go @@ -176,7 +176,14 @@ type AutomationEvent struct { type AutomationEventList struct { Capacity uint32 Count uint32 - Events *AutomationEvent + // Events array (c array) + // + // Use AutomationEventList.GetEvents instead (go slice) + Events *AutomationEvent +} + +func (a *AutomationEventList) GetEvents() []AutomationEvent { + return unsafe.Slice(a.Events, a.Count) } // CameraMode type