diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-07 20:27:31 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-07 20:27:31 +0100 |
| commit | a80c73906772d992d96d281e50104b836aaa80e4 (patch) | |
| tree | 1b197c3c37f0df75f8a07cb78be170b7640b557c /src | |
| parent | 73b2eb4a726b91ff3544c4a71457579feea115db (diff) | |
| download | box64-a80c73906772d992d96d281e50104b836aaa80e4.tar.gz box64-a80c73906772d992d96d281e50104b836aaa80e4.zip | |
Disabled va_list wrapped function in SDL2, wrapping is not done yet
Diffstat (limited to 'src')
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.c | 4 | ||||
| -rw-r--r-- | src/wrapped/generated/wrapper.h | 2 | ||||
| -rwxr-xr-x | src/wrapped/wrappedsdl2.c | 52 | ||||
| -rwxr-xr-x | src/wrapped/wrappedsdl2_private.h | 6 |
5 files changed, 29 insertions, 37 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 7a5d1563..b9230bbe 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -174,7 +174,6 @@ #() iFppu #() iFppL #() iFppp -#() iFppV #() IFpIi #() IFppi #() uFEpW @@ -441,7 +440,6 @@ #() vFppupii #() vFpppppp #() iFEpippi -#() iFEpupVV #() iFiiiiii #() iFiiiiip #() iFuppppp diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c index 3b3711ee..3a70fbac 100644 --- a/src/wrapped/generated/wrapper.c +++ b/src/wrapped/generated/wrapper.c @@ -207,7 +207,6 @@ typedef int32_t (*iFppi_t)(void*, void*, int32_t); typedef int32_t (*iFppu_t)(void*, void*, uint32_t); typedef int32_t (*iFppL_t)(void*, void*, uintptr_t); typedef int32_t (*iFppp_t)(void*, void*, void*); -typedef int32_t (*iFppV_t)(void*, void*, void*); typedef int64_t (*IFpIi_t)(void*, int64_t, int32_t); typedef int64_t (*IFppi_t)(void*, void*, int32_t); typedef uint32_t (*uFEpW_t)(x64emu_t*, void*, uint16_t); @@ -474,7 +473,6 @@ typedef void (*vFppiiii_t)(void*, void*, int32_t, int32_t, int32_t, int32_t); typedef void (*vFppupii_t)(void*, void*, uint32_t, void*, int32_t, int32_t); typedef void (*vFpppppp_t)(void*, void*, void*, void*, void*, void*); typedef int32_t (*iFEpippi_t)(x64emu_t*, void*, int32_t, void*, void*, int32_t); -typedef int32_t (*iFEpupVV_t)(x64emu_t*, void*, uint32_t, void*, void*, void*); typedef int32_t (*iFiiiiii_t)(int32_t, int32_t, int32_t, int32_t, int32_t, int32_t); typedef int32_t (*iFiiiiip_t)(int32_t, int32_t, int32_t, int32_t, int32_t, void*); typedef int32_t (*iFuppppp_t)(uint32_t, void*, void*, void*, void*, void*); @@ -806,7 +804,6 @@ void iFppi(x64emu_t *emu, uintptr_t fcn) { iFppi_t fn = (iFppi_t)fcn; R_RAX=fn(( void iFppu(x64emu_t *emu, uintptr_t fcn) { iFppu_t fn = (iFppu_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX); } void iFppL(x64emu_t *emu, uintptr_t fcn) { iFppL_t fn = (iFppL_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (uintptr_t)R_RDX); } void iFppp(x64emu_t *emu, uintptr_t fcn) { iFppp_t fn = (iFppp_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX); } -void iFppV(x64emu_t *emu, uintptr_t fcn) { iFppV_t fn = (iFppV_t)fcn; R_RAX=fn((void*)R_RDI, (void*)R_RSI, (void*)(R_RSP + 8)); } void IFpIi(x64emu_t *emu, uintptr_t fcn) { IFpIi_t fn = (IFpIi_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (int64_t)R_RSI, (int32_t)R_RDX); } void IFppi(x64emu_t *emu, uintptr_t fcn) { IFppi_t fn = (IFppi_t)fcn; R_RAX=(uint64_t)fn((void*)R_RDI, (void*)R_RSI, (int32_t)R_RDX); } void uFEpW(x64emu_t *emu, uintptr_t fcn) { uFEpW_t fn = (uFEpW_t)fcn; R_RAX=(uint32_t)fn(emu, (void*)R_RDI, (uint16_t)R_RSI); } @@ -1073,7 +1070,6 @@ void vFppiiii(x64emu_t *emu, uintptr_t fcn) { vFppiiii_t fn = (vFppiiii_t)fcn; f void vFppupii(x64emu_t *emu, uintptr_t fcn) { vFppupii_t fn = (vFppupii_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (uint32_t)R_RDX, (void*)R_RCX, (int32_t)R_R8, (int32_t)R_R9); } void vFpppppp(x64emu_t *emu, uintptr_t fcn) { vFpppppp_t fn = (vFpppppp_t)fcn; fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } void iFEpippi(x64emu_t *emu, uintptr_t fcn) { iFEpippi_t fn = (iFEpippi_t)fcn; R_RAX=fn(emu, (void*)R_RDI, (int32_t)R_RSI, (void*)R_RDX, (void*)R_RCX, (int32_t)R_R8); } -void iFEpupVV(x64emu_t *emu, uintptr_t fcn) { iFEpupVV_t fn = (iFEpupVV_t)fcn; R_RAX=fn(emu, (void*)R_RDI, (uint32_t)R_RSI, (void*)R_RDX, (void*)(R_RSP + 8), (void*)(R_RSP + 8)); } void iFiiiiii(x64emu_t *emu, uintptr_t fcn) { iFiiiiii_t fn = (iFiiiiii_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (int32_t)R_R9); } void iFiiiiip(x64emu_t *emu, uintptr_t fcn) { iFiiiiip_t fn = (iFiiiiip_t)fcn; R_RAX=fn((int32_t)R_RDI, (int32_t)R_RSI, (int32_t)R_RDX, (int32_t)R_RCX, (int32_t)R_R8, (void*)R_R9); } void iFuppppp(x64emu_t *emu, uintptr_t fcn) { iFuppppp_t fn = (iFuppppp_t)fcn; R_RAX=fn((uint32_t)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (void*)R_R9); } diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h index da8843de..f9a81519 100644 --- a/src/wrapped/generated/wrapper.h +++ b/src/wrapped/generated/wrapper.h @@ -204,7 +204,6 @@ void iFppi(x64emu_t *emu, uintptr_t fnc); void iFppu(x64emu_t *emu, uintptr_t fnc); void iFppL(x64emu_t *emu, uintptr_t fnc); void iFppp(x64emu_t *emu, uintptr_t fnc); -void iFppV(x64emu_t *emu, uintptr_t fnc); void IFpIi(x64emu_t *emu, uintptr_t fnc); void IFppi(x64emu_t *emu, uintptr_t fnc); void uFEpW(x64emu_t *emu, uintptr_t fnc); @@ -471,7 +470,6 @@ void vFppiiii(x64emu_t *emu, uintptr_t fnc); void vFppupii(x64emu_t *emu, uintptr_t fnc); void vFpppppp(x64emu_t *emu, uintptr_t fnc); void iFEpippi(x64emu_t *emu, uintptr_t fnc); -void iFEpupVV(x64emu_t *emu, uintptr_t fnc); void iFiiiiii(x64emu_t *emu, uintptr_t fnc); void iFiiiiip(x64emu_t *emu, uintptr_t fnc); void iFuppppp(x64emu_t *emu, uintptr_t fnc); diff --git a/src/wrapped/wrappedsdl2.c b/src/wrapped/wrappedsdl2.c index 3dda257e..a335eabd 100755 --- a/src/wrapped/wrappedsdl2.c +++ b/src/wrapped/wrappedsdl2.c @@ -621,21 +621,21 @@ EXPORT void my2_SDL_LogSetOutputFunction(x64emu_t* emu, void* f, void* arg) my->SDL_LogSetOutputFunction(find_LogOutput_Fct(f), arg); } -EXPORT int my2_SDL_vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) -{ - #ifndef NOALIGN - // need to align on arm - myStackAlign((const char*)fmt, *(uint32_t**)b, emu->scratch); - PREPARE_VALIST; - void* f = vsnprintf; - int r = ((iFpupp_t)f)(buff, s, fmt, VARARGS); - return r; - #else - void* f = vsnprintf; - int r = ((iFpupp_t)f)(buff, s, fmt, *(uint32_t**)b); - return r; - #endif -} +//EXPORT int my2_SDL_vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) +//{ +// #ifndef NOALIGN +// // need to align on arm +// myStackAlign((const char*)fmt, *(uint32_t**)b, emu->scratch); +// PREPARE_VALIST; +// void* f = vsnprintf; +// int r = ((iFpupp_t)f)(buff, s, fmt, VARARGS); +// return r; +// #else +// void* f = vsnprintf; +// int r = ((iFpupp_t)f)(buff, s, fmt, *(uint32_t**)b); +// return r; +// #endif +//} EXPORT void* my2_SDL_CreateThread(x64emu_t* emu, void* f, void* n, void* p) { @@ -645,17 +645,17 @@ EXPORT void* my2_SDL_CreateThread(x64emu_t* emu, void* f, void* n, void* p) return my->SDL_CreateThread(my_prepare_thread(emu, f, p, 0, &et), n, et); } -EXPORT int my2_SDL_snprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) { - #ifndef NOALIGN - // need to align on arm - myStackAlign((const char*)fmt, b, emu->scratch); - PREPARE_VALIST; - void* f = vsnprintf; - return ((iFpupp_t)f)(buff, s, fmt, VARARGS); - #else - return vsnprintf((char*)buff, s, (char*)fmt, V); - #endif -} +//EXPORT int my2_SDL_snprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) { +// #ifndef NOALIGN +// // need to align on arm +// myStackAlign((const char*)fmt, b, emu->scratch); +// PREPARE_VALIST; +// void* f = vsnprintf; +// return ((iFpupp_t)f)(buff, s, fmt, VARARGS); +// #else +// return vsnprintf((char*)buff, s, (char*)fmt, V); +// #endif +//} char EXPORT *my2_SDL_GetBasePath(x64emu_t* emu) { char* p = strdup(emu->context->fullpath); diff --git a/src/wrapped/wrappedsdl2_private.h b/src/wrapped/wrappedsdl2_private.h index e93699c2..a2cfbdb4 100755 --- a/src/wrapped/wrappedsdl2_private.h +++ b/src/wrapped/wrappedsdl2_private.h @@ -586,11 +586,11 @@ GO(SDL_ShowSimpleMessageBox, iFuppp) GO(SDL_ShowWindow, vFp) GO(SDL_sin, dFd) GO(SDL_sinf, fFf) -GOM(SDL_snprintf, iFEpupVV) +//GOM(SDL_snprintf, iFEpupVV) GO(SDL_SoftStretch, iFpppp) GO(SDL_sqrt, dFd) GO(SDL_sqrtf, fFf) -GO2(SDL_sscanf, iFppV, SDL_vsscanf) +//GO2(SDL_sscanf, iFppV, SDL_vsscanf) GO(SDL_StartTextInput, vFv) GO(SDL_StopTextInput, vFv) GO(SDL_strcasecmp, iFpp) @@ -642,7 +642,7 @@ GO(SDL_utf8strlcpy, uFppu) // SDL_utf8strlen GO(SDL_VideoInit, iFp) GO(SDL_VideoQuit, vFv) -GOM(SDL_vsnprintf, iFEpupVV) +//GOM(SDL_vsnprintf, iFEpupVV) // SDL_vsscanf GO(SDL_Vulkan_CreateSurface, iFppp) GO(SDL_Vulkan_GetDrawableSize, vFppp) |