From bb2a19a2ba3bc430751dbd3520f9d0eadb9a0d1a Mon Sep 17 00:00:00 2001 From: Alex <48759429+Aurumaker72@users.noreply.github.com> Date: Tue, 9 Jan 2024 21:52:56 +0100 Subject: [PATCH] Add DllCrtFree implementation --- src/ZilmarGFX_1_3.h | 8 ++++++++ src/ZilmarPluginAPI.cpp | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/ZilmarGFX_1_3.h b/src/ZilmarGFX_1_3.h index f1cde0f17..12ca9febc 100644 --- a/src/ZilmarGFX_1_3.h +++ b/src/ZilmarGFX_1_3.h @@ -277,6 +277,14 @@ EXPORT void CALL ViWidthChanged (void); ******************************************************************/ EXPORT void CALL ReadScreen (void **dest, long *width, long *height); +/****************************************************************** + Function: DllCrtFree + Purpose: Frees the memory at the specified address with the dll's standard library + Input: none + Output: none + ******************************************************************/ +EXPORT void CALL DllCrtFree(void* addr); + #if defined(__cplusplus) } #endif diff --git a/src/ZilmarPluginAPI.cpp b/src/ZilmarPluginAPI.cpp index 89bd0284f..f79aa1a68 100644 --- a/src/ZilmarPluginAPI.cpp +++ b/src/ZilmarPluginAPI.cpp @@ -55,4 +55,9 @@ EXPORT void CALL ReadScreen (void **dest, long *width, long *height) api().ReadScreen(dest, width, height); } +EXPORT void CALL DllCrtFree(void* addr) +{ + free(addr); +} + }