added atexit() HLE function , sceVideoOutOpen appears to get invalid parameters

This commit is contained in:
georgemoralis 2023-07-20 17:53:51 +03:00
parent 1474e9d87d
commit d8140ca016
3 changed files with 29 additions and 6 deletions

View File

@ -37,10 +37,12 @@ namespace HLE::Libs::LibC {
} }
static int atexit(void (*func)()) static int atexit(void (*func)())
{ {
for (;;) { int rt = ::atexit(func);
printf("we reached here too!\n"); if (rt != 0)
{
__debugbreak();
} }
return 0; return rt;
} }
void LibC_Register(SymbolsResolver* sym) void LibC_Register(SymbolsResolver* sym)

View File

@ -29,7 +29,26 @@ namespace HLE::Libs::LibSceVideoOut {
int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/) int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/)
{ return 0; { return 0;
} }
int32_t sceVideoOutOpen(/* SceUserServiceUserId userId,*/ int32_t busType, int32_t index, const void* param) { return 0;
int32_t sceVideoOutOpen(SceUserServiceUserId userId, int32_t busType, int32_t index, const void* param)
{
if (busType != 0)
{
__debugbreak();
}
if (index != 0)
{
__debugbreak();
}
if (param != nullptr)
{
__debugbreak();
}
for (;;) {
printf("videoopen\n");
}
return 0;
} }
int32_t sceVideoOutIsFlipPending(int32_t handle) { return 0; int32_t sceVideoOutIsFlipPending(int32_t handle) { return 0;
} }

View File

@ -3,6 +3,8 @@
namespace HLE::Libs::LibSceVideoOut { namespace HLE::Libs::LibSceVideoOut {
typedef int32_t SceUserServiceUserId; //TODO move it to proper place
void LibSceVideoOut_Register(SymbolsResolver* sym); void LibSceVideoOut_Register(SymbolsResolver* sym);
//functions //functions
int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/); int32_t sceVideoOutGetFlipStatus(int32_t handle /*, SceVideoOutFlipStatus* status*/);
@ -13,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, void sceVideoOutSetBufferAttribute(/* SceVideoOutBufferAttribute* attribute,*/ uint32_t pixelFormat, uint32_t tilingMode, uint32_t aspectRatio,
uint32_t width, uint32_t height, uint32_t pitchInPixel); uint32_t width, uint32_t height, uint32_t pitchInPixel);
int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/); int32_t sceVideoOutGetResolutionStatus(int32_t handle /*, SceVideoOutResolutionStatus* status*/);
int32_t sceVideoOutOpen(/* SceUserServiceUserId userId,*/ int32_t busType, int32_t index, const void* param); int32_t sceVideoOutOpen(SceUserServiceUserId userId,int32_t busType, int32_t index, const void* param);
int32_t sceVideoOutIsFlipPending(int32_t handle); int32_t sceVideoOutIsFlipPending(int32_t handle);
}; // namespace HLE::Libs::LibSceVideoOut }; // namespace HLE::Libs::LibSceVideoOut