Added sysv_abi , now parameters in sceVideoOutOpen is correct

This commit is contained in:
georgemoralis 2023-07-21 08:03:36 +03:00
parent d8140ca016
commit 28aad0a5dc
7 changed files with 49 additions and 36 deletions

View file

@ -1,27 +1,38 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ],
"variables": []
}
]
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": ""
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "msvc_x64_x64" ]
},
{
"name": "x64-Clang-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"inheritEnvironments": [ "clang_cl_x64_x64" ],
"variables": []
}
]
}

View file

@ -6,7 +6,7 @@ namespace HLE::Libs::LibC {
static u32 g_need_sceLibc = 1;
static void init_env() //every game/demo should probably
static PS4_SYSV_ABI void init_env() // every game/demo should probably
{
//dummy no need atm
}
@ -35,7 +35,7 @@ namespace HLE::Libs::LibC {
{
}
static int atexit(void (*func)())
static PS4_SYSV_ABI int atexit(void (*func)())
{
int rt = ::atexit(func);
if (rt != 0)

View file

@ -5,8 +5,8 @@ namespace HLE::Libs::LibC {
void LibC_Register(SymbolsResolver* sym);
//functions
static void init_env();
static void exit(int code);
static PS4_SYSV_ABI void init_env();
static PS4_SYSV_ABI void exit(int code);
static void catchReturnFromMain(int status);
int __cxa_guard_acquire(u64* guard_object);
int memcmp(const void* s1, const void* s2, size_t n);

View file

@ -31,7 +31,7 @@ namespace HLE::Libs::LibSceVideoOut {
}
int32_t sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param)
int32_t PS4_SYSV_ABI sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param)
{
if (busType != 0)
{

View file

@ -15,6 +15,6 @@ int32_t sceVideoOutSetFlipRate(int32_t handle, int32_t rate);
void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio,
uint32_t width, uint32_t height, uint32_t pitchInPixel);
int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/);
int32_t sceVideoOutOpen(SceUserServiceUserId userId,int32_t busType, int32_t index, const void* param);
int32_t PS4_SYSV_ABI sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param);
int32_t sceVideoOutIsFlipPending(int32_t handle);
}; // namespace HLE::Libs::LibSceVideoOut

View file

@ -631,15 +631,15 @@ void Linker::Resolve(const std::string& name, int Symtype, Module* m, SymbolReco
}
using exit_func_t = void (*)();
using entry_func_t = void (*)(EntryParams* params, exit_func_t atexit_func);
using exit_func_t = PS4_SYSV_ABI void (*)();
using entry_func_t = PS4_SYSV_ABI void (*)(EntryParams* params, exit_func_t atexit_func);
static void ProgramExitFunc() {
static PS4_SYSV_ABI void ProgramExitFunc() {
printf("exit function called\n");
}
static void run_main_entry(u64 addr, EntryParams* params, exit_func_t exit_func) {
static PS4_SYSV_ABI void run_main_entry(u64 addr, EntryParams* params, exit_func_t exit_func) {
reinterpret_cast<entry_func_t>(addr)(params, exit_func);
}

View file

@ -11,4 +11,6 @@ using u32 = unsigned int;
using u64 = unsigned long long;
using f32 = float;
using f64 = double;
using f64 = double;
#define PS4_SYSV_ABI __attribute__((sysv_abi))