Fixes and stubs

This commit is contained in:
igor725 2024-04-26 02:59:48 +03:00
parent 9ce2ca6d3c
commit d1433f1028
No known key found for this signature in database
GPG Key ID: 46F13BBE46F8569D
6 changed files with 36 additions and 1 deletions

View File

@ -474,7 +474,7 @@ int mutexDestroy(ScePthreadMutex* mutex) {
auto mutexInit_intern(const ScePthreadMutexattr* attr) {
auto mutex = std::make_unique<PthreadMutexPrivate>().release();
if (attr != nullptr) mutex->type = (*attr)->type;
if (attr != nullptr && *attr != nullptr) mutex->type = (*attr)->type;
mutex->id = mutexCounter();
LOG_USE_MODULE(pthread);
// LOG_DEBUG(L"mutex ini| id:%llu type:%d", mutex->id, (int)mutex->type);

View File

@ -296,4 +296,8 @@ EXPORT SYSV_ABI int32_t sceAudioOutGetSystemState(SceAudioOutSystemState* state)
EXPORT SYSV_ABI int32_t sceAudioOutSetSystemDebugState(SceAudioOutSystemDebugStateElement elem, SceAudioOutSystemDebugStateParam* param) {
return Ok;
}
EXPORT SYSV_ABI int32_t sceAudioOutMasteringTerm() {
return Ok;
}
}

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.24)
include(../setupModule.cmake)
set(libName libkernel_cpumode_platform)
project(${libName})
add_library(${libName} SHARED entry.cpp)
setupModule(${libName})

View File

@ -0,0 +1,4 @@
#pragma once
#include <stdint.h>
namespace Err {} // namespace Err

View File

@ -0,0 +1,16 @@
#include "common.h"
#include "logging.h"
#include "types.h"
LOG_DEFINE_MODULE(libkernel_cpumode_platform);
namespace {} // namespace
extern "C" {
EXPORT const char* MODULE_NAME = "libkernel";
EXPORT SYSV_ABI int32_t sceKernelIsProspero() {
return 0; // PS5
}
}

View File

@ -0,0 +1,2 @@
#pragma once
#include "codes.h"