Merge pull request #159 from igor725/syms-b

Missing symbols and minor fixes
This commit is contained in:
SysRay 2024-05-17 19:37:14 +02:00 committed by GitHub
commit bea5f0621d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 131 additions and 4 deletions

View File

@ -238,6 +238,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutInit(void) {
} }
EXPORT SYSV_ABI int32_t sceAudioOutOpen(int32_t userId, SceAudioOutPortType type, int32_t index, uint32_t len, uint32_t freq, uint32_t param) { EXPORT SYSV_ABI int32_t sceAudioOutOpen(int32_t userId, SceAudioOutPortType type, int32_t index, uint32_t len, uint32_t freq, uint32_t param) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
LOG_USE_MODULE(libSceAudioOut); LOG_USE_MODULE(libSceAudioOut);
LOG_TRACE(L"%S", __FUNCTION__); LOG_TRACE(L"%S", __FUNCTION__);
auto pimpl = getData(); auto pimpl = getData();
@ -400,6 +401,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutOpen(int32_t userId, SceAudioOutPortType type
} }
EXPORT SYSV_ABI int32_t sceAudioOutClose(int32_t handle) { EXPORT SYSV_ABI int32_t sceAudioOutClose(int32_t handle) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
LOG_USE_MODULE(libSceAudioOut); LOG_USE_MODULE(libSceAudioOut);
LOG_TRACE(L"%S", __FUNCTION__); LOG_TRACE(L"%S", __FUNCTION__);
auto pimpl = getData(); auto pimpl = getData();
@ -409,6 +411,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutClose(int32_t handle) {
} }
EXPORT SYSV_ABI int32_t sceAudioOutOutput(int32_t handle, const void* ptr) { EXPORT SYSV_ABI int32_t sceAudioOutOutput(int32_t handle, const void* ptr) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
auto pimpl = getData(); auto pimpl = getData();
// boost::unique_lock const lock(pimpl->mutexInt); // boost::unique_lock const lock(pimpl->mutexInt);
@ -416,6 +419,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutOutput(int32_t handle, const void* ptr) {
} }
EXPORT SYSV_ABI int32_t sceAudioOutSetVolume(int32_t handle, int32_t flag, int32_t* vol) { EXPORT SYSV_ABI int32_t sceAudioOutSetVolume(int32_t handle, int32_t flag, int32_t* vol) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
LOG_USE_MODULE(libSceAudioOut); LOG_USE_MODULE(libSceAudioOut);
auto pimpl = getData(); auto pimpl = getData();
@ -446,6 +450,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutSetVolume(int32_t handle, int32_t flag, int32
} }
EXPORT SYSV_ABI int32_t sceAudioOutOutputs(SceAudioOutOutputParam* param, uint32_t num) { EXPORT SYSV_ABI int32_t sceAudioOutOutputs(SceAudioOutOutputParam* param, uint32_t num) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
if (param == nullptr) return Err::AudioOut::INVALID_POINTER; if (param == nullptr) return Err::AudioOut::INVALID_POINTER;
if (num == 0) return Err::AudioOut::PORT_FULL; if (num == 0) return Err::AudioOut::PORT_FULL;
auto pimpl = getData(); auto pimpl = getData();
@ -477,6 +482,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutOutputs(SceAudioOutOutputParam* param, uint32
} }
EXPORT SYSV_ABI int32_t sceAudioOutGetLastOutputTime(int32_t handle, uint64_t* outputTime) { EXPORT SYSV_ABI int32_t sceAudioOutGetLastOutputTime(int32_t handle, uint64_t* outputTime) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
auto pimpl = getData(); auto pimpl = getData();
boost::unique_lock const lock(pimpl->mutexInt); boost::unique_lock const lock(pimpl->mutexInt);
@ -490,6 +496,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutGetLastOutputTime(int32_t handle, uint64_t* o
} }
EXPORT SYSV_ABI int32_t sceAudioOutSetMixLevelPadSpk(int32_t handle, int32_t mixLevel) { EXPORT SYSV_ABI int32_t sceAudioOutSetMixLevelPadSpk(int32_t handle, int32_t mixLevel) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
auto pimpl = getData(); auto pimpl = getData();
boost::unique_lock const lock(pimpl->mutexInt); boost::unique_lock const lock(pimpl->mutexInt);
@ -504,6 +511,7 @@ EXPORT SYSV_ABI int32_t sceAudioOutSetMixLevelPadSpk(int32_t handle, int32_t mix
} }
EXPORT SYSV_ABI int32_t sceAudioOutGetPortState(int32_t handle, SceAudioOutPortState* state) { EXPORT SYSV_ABI int32_t sceAudioOutGetPortState(int32_t handle, SceAudioOutPortState* state) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
auto pimpl = getData(); auto pimpl = getData();
boost::unique_lock const lock(pimpl->mutexInt); boost::unique_lock const lock(pimpl->mutexInt);
@ -519,16 +527,19 @@ EXPORT SYSV_ABI int32_t sceAudioOutGetPortState(int32_t handle, SceAudioOutPortS
} }
EXPORT SYSV_ABI int32_t sceAudioOutGetSystemState(SceAudioOutSystemState* state) { EXPORT SYSV_ABI int32_t sceAudioOutGetSystemState(SceAudioOutSystemState* state) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
state->loudness = -70.0f; state->loudness = -70.0f;
return Ok; return Ok;
} }
EXPORT SYSV_ABI int32_t sceAudioOutSetSystemDebugState(SceAudioOutSystemDebugStateElement elem, SceAudioOutSystemDebugStateParam* param) { EXPORT SYSV_ABI int32_t sceAudioOutSetSystemDebugState(SceAudioOutSystemDebugStateElement elem, SceAudioOutSystemDebugStateParam* param) {
if (!audioInited) return Err::AudioOut::NOT_INIT;
return Ok; return Ok;
} }
EXPORT SYSV_ABI int32_t sceAudioOutMasteringTerm() { EXPORT SYSV_ABI int32_t sceAudioOutMasteringTerm() {
if (!audioInited) return Err::AudioOut::NOT_INIT;
return Ok; return Ok;
} }
} }

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.24)
include(../setupModule.cmake)
set(libName libSceCes)
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,19 @@
#include "codes.h"
#include "common.h"
#include "logging.h"
#include "types.h"
LOG_DEFINE_MODULE(libSceCes);
namespace {} // namespace
extern "C" {
EXPORT const char* MODULE_NAME = "libSceCes";
EXPORT SYSV_ABI int32_t sceCesUcsProfileInitSJis1997Cp932() {
LOG_USE_MODULE(libSceCes);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
}

View File

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

View File

@ -113,6 +113,16 @@ EXPORT SYSV_ABI void __NID(_ZN3sce4Json5ValueC1Ev)(sce::Json::Value* _this) {
::memset((void*)_this, 0, sizeof(sce::Json::Value)); ::memset((void*)_this, 0, sizeof(sce::Json::Value));
} }
/**
* @brief sce::Json::Value::Value()
*
*/
EXPORT SYSV_ABI void __NID(_ZN3sce4Json5ValueC1ENS0_9ValueTypeE)(sce::Json::Value* _this, sce::Json::ValueType type) {
LOG_USE_MODULE(libSceJson2);
LOG_ERR(L"todo %S", __FUNCTION__);
::memset((void*)_this, 0, sizeof(sce::Json::Value));
}
/** /**
* @brief sce::Json::Value::set(bool) * @brief sce::Json::Value::set(bool)
* *

View File

@ -334,4 +334,10 @@ EXPORT SYSV_ABI int sceNpNotifyPlusFeature(const SceNpNotifyPlusFeatureParameter
LOG_ERR(L"todo %S", __FUNCTION__); LOG_ERR(L"todo %S", __FUNCTION__);
return Ok; return Ok;
} }
}
EXPORT SYSV_ABI int sceNpInGameMessageInitialize(size_t poolSize, void* option) {
LOG_USE_MODULE(libSceNpManager);
LOG_ERR(L"todo %S", __FUNCTION__);
return Ok;
}
}

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.24)
include(../setupModule.cmake)
set(libName libSceNpSnsFacebookDialog)
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,45 @@
#include "codes.h"
#include "common.h"
#include "logging.h"
#include "types.h"
LOG_DEFINE_MODULE(libSceNpSnsFacebookDialog);
namespace {
static SceCommonDialogStatus g_curStatus = SceCommonDialogStatus::NONE;
} // namespace
extern "C" {
EXPORT const char* MODULE_NAME = "libSceNpSnsFacebookDialog";
EXPORT SYSV_ABI int32_t sceNpSnsFacebookDialogInitialize() {
g_curStatus = SceCommonDialogStatus::INITIALIZED;
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpSnsFacebookDialogTerminate() {
g_curStatus = SceCommonDialogStatus::NONE;
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpSnsFacebookDialogOpen() {
return Ok;
}
EXPORT SYSV_ABI SceCommonDialogStatus sceNpSnsFacebookDialogGetStatus() {
return g_curStatus;
}
EXPORT SYSV_ABI SceCommonDialogStatus sceNpSnsFacebookDialogUpdateStatus() {
return g_curStatus;
}
EXPORT SYSV_ABI int32_t sceNpSnsFacebookDialogGetResult() {
return Ok;
}
EXPORT SYSV_ABI int32_t sceNpSnsFacebookDialogClose() {
return Ok;
}
}

View File

@ -0,0 +1,3 @@
#pragma once
#include "..\libSceCommonDialog\types.h"
#include "codes.h"

View File

@ -1,3 +1,2 @@
#pragma once #pragma once
#include "..\libSceCommonDialog\types.h"
#include "codes.h" #include "codes.h"

View File

@ -26,9 +26,15 @@ EXPORT SYSV_ABI void sceUsbdFreeDeviceList(SceUsbdDevice** list, int unrefDevice
LOG_ERR(L"todo %S", __FUNCTION__); LOG_ERR(L"todo %S", __FUNCTION__);
} }
EXPORT SYSV_ABI int32_t sceUsbdHandleEvents() {
LOG_USE_MODULE(libSceUsbd);
LOG_TRACE(L"todo %S", __FUNCTION__);
return Ok;
}
EXPORT SYSV_ABI int32_t sceUsbdHandleEventsTimeout(struct timeval* tv) { EXPORT SYSV_ABI int32_t sceUsbdHandleEventsTimeout(struct timeval* tv) {
LOG_USE_MODULE(libSceUsbd); LOG_USE_MODULE(libSceUsbd);
LOG_ERR(L"todo %S", __FUNCTION__); LOG_TRACE(L"todo %S", __FUNCTION__);
return Ok; return Ok;
} }
@ -37,4 +43,4 @@ EXPORT SYSV_ABI int32_t sceUsbdOpenDeviceWithVidPid(uint16_t vendorId, uint16_t
LOG_ERR(L"todo %S", __FUNCTION__); LOG_ERR(L"todo %S", __FUNCTION__);
return Ok; return Ok;
} }
} }