about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-10-08 20:29:40 +0200
committerptitSeb <sebastien.chev@gmail.com>2024-10-08 20:29:40 +0200
commit8850a1107219024d5540c18d2dda18cdfaeaf73c (patch)
treed555e40d81874e210202de09c3edf8f25bb53ca6 /src
parent499338e80dc1576eb98f1bd881367530ff7a9a3e (diff)
downloadbox64-8850a1107219024d5540c18d2dda18cdfaeaf73c.tar.gz
box64-8850a1107219024d5540c18d2dda18cdfaeaf73c.zip
[BOX32] Added some more libSDL2 wrapped function (now linux limbo works, with gamepad)
Diffstat (limited to 'src')
-rw-r--r--src/wrapped32/generated/functions_list.txt1
-rw-r--r--src/wrapped32/generated/wrapper32.c2
-rw-r--r--src/wrapped32/generated/wrapper32.h1
-rw-r--r--src/wrapped32/wrappedsdl2_private.h46
4 files changed, 27 insertions, 23 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index 3eeee705..e868a93b 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -50,6 +50,7 @@
 #() uFp -> uFp
 #() uFS -> uFS
 #() uFX -> uFX
+#() UFv -> UFv
 #() UFi -> UFi
 #() UFu -> UFu
 #() UFp -> UFp
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 0a4dbe75..bd27807a 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -140,6 +140,7 @@ typedef uint32_t (*uFU_t)(uint64_t);
 typedef uint32_t (*uFp_t)(void*);
 typedef uint32_t (*uFS_t)(void*);
 typedef uint32_t (*uFX_t)(void*);
+typedef uint64_t (*UFv_t)(void);
 typedef uint64_t (*UFi_t)(int32_t);
 typedef uint64_t (*UFu_t)(uint32_t);
 typedef uint64_t (*UFp_t)(void*);
@@ -1623,6 +1624,7 @@ void uFU_32(x64emu_t *emu, uintptr_t fcn) { uFU_t fn = (uFU_t)fcn; R_EAX = (uint
 void uFp_32(x64emu_t *emu, uintptr_t fcn) { uFp_t fn = (uFp_t)fcn; R_EAX = (uint32_t)fn(from_ptriv(R_ESP + 4)); }
 void uFS_32(x64emu_t *emu, uintptr_t fcn) { uFS_t fn = (uFS_t)fcn; R_EAX = (uint32_t)fn(io_convert32(from_ptriv(R_ESP + 4))); }
 void uFX_32(x64emu_t *emu, uintptr_t fcn) { uFX_t fn = (uFX_t)fcn; R_EAX = (uint32_t)fn(getDisplay(from_ptriv(R_ESP + 4))); }
+void UFv_32(x64emu_t *emu, uintptr_t fcn) { UFv_t fn = (UFv_t)fcn; ui64_t r; r.u = (uint64_t)fn(); R_EAX = r.d[0]; R_EDX = r.d[1]; }
 void UFi_32(x64emu_t *emu, uintptr_t fcn) { UFi_t fn = (UFi_t)fcn; ui64_t r; r.u = (uint64_t)fn(from_ptri(int32_t, R_ESP + 4)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
 void UFu_32(x64emu_t *emu, uintptr_t fcn) { UFu_t fn = (UFu_t)fcn; ui64_t r; r.u = (uint64_t)fn(from_ptri(uint32_t, R_ESP + 4)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
 void UFp_32(x64emu_t *emu, uintptr_t fcn) { UFp_t fn = (UFp_t)fcn; ui64_t r; r.u = (uint64_t)fn(from_ptriv(R_ESP + 4)); R_EAX = r.d[0]; R_EDX = r.d[1]; }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index 9412ca8b..966924bd 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -91,6 +91,7 @@ void uFU_32(x64emu_t *emu, uintptr_t fnc);
 void uFp_32(x64emu_t *emu, uintptr_t fnc);
 void uFS_32(x64emu_t *emu, uintptr_t fnc);
 void uFX_32(x64emu_t *emu, uintptr_t fnc);
+void UFv_32(x64emu_t *emu, uintptr_t fnc);
 void UFi_32(x64emu_t *emu, uintptr_t fnc);
 void UFu_32(x64emu_t *emu, uintptr_t fnc);
 void UFp_32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedsdl2_private.h b/src/wrapped32/wrappedsdl2_private.h
index 5049c7f6..5445f22a 100644
--- a/src/wrapped32/wrappedsdl2_private.h
+++ b/src/wrapped32/wrappedsdl2_private.h
@@ -230,8 +230,8 @@ GO(SDL_GetNumTouchFingers, iFu)
 GO(SDL_GetNumVideoDisplays, iFv)
 GO(SDL_GetNumVideoDrivers, iFv)
 //GOM(SDL_GetOriginalMemoryFunctions,
-//GO(SDL_GetPerformanceCounter, UFv)
-//GO(SDL_GetPerformanceFrequency, LFv)
+GO(SDL_GetPerformanceCounter, UFv)
+GO(SDL_GetPerformanceFrequency, UFv)
 //GO(SDL_GetPixelFormatName, pFu)
 //GO(SDL_GetPlatform, pFv)
 //GO(SDL_GetPointDisplayIndex, iFp)
@@ -316,32 +316,32 @@ GO(SDL_GL_UnbindTexture, iFp)
 GO(SDL_GL_UnloadLibrary, vFv)
 //GO(SDL_GUIDToString, vFUUpi)
 GO(SDL_HapticClose, vFp)
-//GO(SDL_HapticDestroyEffect, vFpi)
-//GO(SDL_HapticEffectSupported, iFpp)
-//GO(SDL_HapticGetEffectStatus, iFpi)
-//GO(SDL_HapticIndex, iFp)
-//GO(SDL_HapticName, pFi)
-//GO(SDL_HapticNewEffect, iFpp)
-//GO(SDL_HapticNumAxes, iFp)
-//GO(SDL_HapticNumEffects, iFp)
-//GO(SDL_HapticNumEffectsPlaying, iFp)
-//GO(SDL_HapticOpen, pFi)
-//GO(SDL_HapticOpened, iFi)
+GO(SDL_HapticDestroyEffect, vFpi)
+GO(SDL_HapticEffectSupported, iFpp)
+GO(SDL_HapticGetEffectStatus, iFpi)
+GO(SDL_HapticIndex, iFp)
+GO(SDL_HapticName, pFi)
+GO(SDL_HapticNewEffect, iFpp)
+GO(SDL_HapticNumAxes, iFp)
+GO(SDL_HapticNumEffects, iFp)
+GO(SDL_HapticNumEffectsPlaying, iFp)
+GO(SDL_HapticOpen, pFi)
+GO(SDL_HapticOpened, iFi)
 GO(SDL_HapticOpenFromJoystick, pFp)
-//GO(SDL_HapticOpenFromMouse, pFv)
+GO(SDL_HapticOpenFromMouse, pFv)
 GO(SDL_HapticPause, iFp)
 GO(SDL_HapticQuery, uFp)
 GO(SDL_HapticRumbleInit, iFp)
 GO(SDL_HapticRumblePlay, iFpfu)
- GO(SDL_HapticRumbleStop, iFp)
- GO(SDL_HapticRumbleSupported, iFp)
-//GO(SDL_HapticRunEffect, iFpiu)
-//GO(SDL_HapticSetAutocenter, iFpi)
-//GO(SDL_HapticSetGain, iFpi)
-//GO(SDL_HapticStopAll, iFp)
-//GO(SDL_HapticStopEffect, iFpi)
-//GO(SDL_HapticUnpause, iFp)
-//GO(SDL_HapticUpdateEffect, iFpip)
+GO(SDL_HapticRumbleStop, iFp)
+GO(SDL_HapticRumbleSupported, iFp)
+GO(SDL_HapticRunEffect, iFpiu)
+GO(SDL_HapticSetAutocenter, iFpi)
+GO(SDL_HapticSetGain, iFpi)
+GO(SDL_HapticStopAll, iFp)
+GO(SDL_HapticStopEffect, iFpi)
+GO(SDL_HapticUnpause, iFp)
+GO(SDL_HapticUpdateEffect, iFpip)
 //GOM(SDL_Has3DNow, iFv)
 //GOM(SDL_HasAltiVec, iFv)
 //GOM(SDL_HasAVX, iFv)