From a02884f89f27b06f305562a457a34ce47c7c2814 Mon Sep 17 00:00:00 2001 From: Poliwrath Date: Thu, 7 Mar 2019 20:38:18 -0500 Subject: [PATCH] Implement GetUserData --- Opensegaapi/src/opensegaapi.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Opensegaapi/src/opensegaapi.cpp b/Opensegaapi/src/opensegaapi.cpp index 06e4780..c5c06d2 100644 --- a/Opensegaapi/src/opensegaapi.cpp +++ b/Opensegaapi/src/opensegaapi.cpp @@ -535,6 +535,17 @@ extern "C" { return OPEN_SEGA_SUCCESS; } + + __declspec(dllexport) void* SEGAAPI_GetUserData(void* hHandle) + { + if (hHandle == NULL) + { + return nullptr; + } + OPEN_segaapiBuffer_t* buffer = (OPEN_segaapiBuffer_t*)hHandle; + return buffer->userData; + } + __declspec(dllexport) OPENSEGASTATUS SEGAAPI_UpdateBuffer(void* hHandle, unsigned int dwStartOffset, unsigned int dwLength) {