about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-06-02 14:21:19 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-06-02 14:21:19 +0200
commit067e84eb05906b48995ef9a986537f0e742a98c2 (patch)
tree294a83593ed18c1a8022e7a8779d16193b894661 /src
parentfaffa2a4d0a5a86414efa44ee924aedd8962a44b (diff)
downloadbox64-067e84eb05906b48995ef9a986537f0e742a98c2.tar.gz
box64-067e84eb05906b48995ef9a986537f0e742a98c2.zip
[BOX32][WRAPPER] Added/Fixed some more wrapped function to libsdl2
Diffstat (limited to 'src')
-rw-r--r--src/wrapped32/generated/functions_list.txt1
-rw-r--r--src/wrapped32/generated/wrappedsdl2types32.h1
-rw-r--r--src/wrapped32/wrappedsdl2.c8
-rw-r--r--src/wrapped32/wrappedsdl2_private.h10
4 files changed, 15 insertions, 5 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index c190dd45..097c8aa9 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -3401,6 +3401,7 @@ wrappedsdl2:
   - SDL_WriteLE64
 - pFpi:
   - SDL_LoadBMP_RW
+  - SDL_RWFromMem
   - SDL_notreal
 - pFpp:
   - SDL_CreateTextureFromSurface
diff --git a/src/wrapped32/generated/wrappedsdl2types32.h b/src/wrapped32/generated/wrappedsdl2types32.h
index 083578ee..800218d0 100644
--- a/src/wrapped32/generated/wrappedsdl2types32.h
+++ b/src/wrapped32/generated/wrappedsdl2types32.h
@@ -93,6 +93,7 @@ typedef void* (*pFpiiiiuuuu_t)(void*, int32_t, int32_t, int32_t, int32_t, uint32
 	GO(SDL_WriteBE64, uFpU_t) \
 	GO(SDL_WriteLE64, uFpU_t) \
 	GO(SDL_LoadBMP_RW, pFpi_t) \
+	GO(SDL_RWFromMem, pFpi_t) \
 	GO(SDL_notreal, pFpi_t) \
 	GO(SDL_CreateTextureFromSurface, pFpp_t) \
 	GO(SDL_RWFromFile, pFpp_t) \
diff --git a/src/wrapped32/wrappedsdl2.c b/src/wrapped32/wrappedsdl2.c
index 9046b634..e96dedae 100644
--- a/src/wrapped32/wrappedsdl2.c
+++ b/src/wrapped32/wrappedsdl2.c
@@ -462,6 +462,14 @@ EXPORT void* my32_2_SDL_RWFromFile(x64emu_t* emu, void* a, void* b)
     return ret;
 }
 
+EXPORT void* my32_2_SDL_RWFromMem(x64emu_t* emu, void* a, int b)
+{
+    SDL2_RWops_t* r = (SDL2_RWops_t*)my->SDL_RWFromMem(a, b);
+    void* ret = AddNativeRW2(emu, r);
+    inplace_SDL2_RWops_to_32(ret);
+    return ret;
+}
+
 EXPORT void *my32_2_SDL_LoadBMP_RW(x64emu_t* emu, void* a, int b)
 {
     inplace_SDL2_RWops_to_64(a);
diff --git a/src/wrapped32/wrappedsdl2_private.h b/src/wrapped32/wrappedsdl2_private.h
index 6ba5533f..0594ef17 100644
--- a/src/wrapped32/wrappedsdl2_private.h
+++ b/src/wrapped32/wrappedsdl2_private.h
@@ -122,7 +122,7 @@ GO(SDL_FreeAudioStream, vFp)
 GO(SDL_FreeCursor, vFp)
 //GO(SDL_FreeFormat, vFp)
 //GO(SDL_FreePalette, vFp)
-//GO(SDL_FreeRW, vFp)
+GO(SDL_FreeRW, vFp)
 GOM(SDL_FreeSurface, vFEp)
 //GO(SDL_FreeWAV, vFp)
 GO(SDL_GameControllerAddMapping, iFp)
@@ -197,7 +197,7 @@ GO(SDL_GetCurrentVideoDriver, pFv)
 // SDL_GetDefaultAssertionHandler
 //GO(SDL_GetDefaultAudioInfo, iFppi)
 //GO(SDL_GetDefaultCursor, pFv)
-GOM(SDL_GetDesktopDisplayMode, iFEip)
+GOM(SDL_GetDesktopDisplayMode, iFip)    //%noE
 GO(SDL_GetDisplayBounds, iFip)
 GO(SDL_GetDisplayDPI, iFippp)
 GOM(SDL_GetDisplayMode, iFiip)  //%noE
@@ -233,7 +233,7 @@ GO(SDL_GetNumVideoDrivers, iFv)
 //GOM(SDL_GetOriginalMemoryFunctions,
 GO(SDL_GetPerformanceCounter, UFv)
 GO(SDL_GetPerformanceFrequency, UFv)
-//GO(SDL_GetPixelFormatName, pFu)
+GO(SDL_GetPixelFormatName, pFu)
 //GO(SDL_GetPlatform, pFv)
 //GO(SDL_GetPointDisplayIndex, iFp)
 //GO(SDL_GetPowerInfo, uFpp)
@@ -273,7 +273,7 @@ GO(SDL_GetTicks, uFv)
 //GO(SDL_GetTouchDevice, lFi)
 //GO(SDL_GetTouchDeviceType, iFl)
 //GO(SDL_GetTouchFinger, pFli)
-//GO(SDL_GetVersion, vFp)
+GO(SDL_GetVersion, vFp)
 GO(SDL_GetVideoDriver, pFi)
 //GO(SDL_GetWindowBordersSize, iFppppp)
 //GO(SDL_GetWindowBrightness, fFp)
@@ -559,7 +559,7 @@ GO(SDL_RestoreWindow, vFp)
 //GOM(SDL_RWFromConstMem, pFEpi)
 //GOM(SDL_RWFromFP, pFEpi)
 GOM(SDL_RWFromFile, pFEpp)
-//GOM(SDL_RWFromMem, pFEpi)
+GOM(SDL_RWFromMem, pFEpi)
 //GOM(SDL_SaveAllDollarTemplates, iFEp)
 //GOM(SDL_SaveBMP_RW, iFEppi)
 //GOM(SDL_SaveDollarTemplate, iFEip)