rpcsx/ps3fw/cellSysconf.cpp

64 lines
1.3 KiB
C++
Raw Normal View History

2020-12-05 13:08:24 +01:00
#include "stdafx.h"
2016-03-21 20:43:03 +01:00
#include "Emu/Cell/PPUModule.h"
2018-02-03 09:51:57 +01:00
#include "cellSysutil.h"
2015-07-31 00:53:52 +02:00
2017-04-06 22:48:01 +02:00
#include "cellSysconf.h"
LOG_CHANNEL(cellSysconf);
2015-07-31 00:53:52 +02:00
template <>
2020-07-16 12:14:57 +02:00
void fmt_class_string<CellSysConfError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_SYSCONF_ERROR_PARAM);
}
2020-07-16 12:14:57 +02:00
return unknown;
});
2020-07-16 12:14:57 +02:00
}
error_code cellSysconfAbort()
{
2017-04-06 22:48:01 +02:00
cellSysconf.todo("cellSysconfAbort()");
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code cellSysconfOpen(u32 type, vm::ptr<CellSysconfCallback> func, vm::ptr<void> userdata, vm::ptr<void> extparam, u32 id)
{
2017-04-06 22:48:01 +02:00
cellSysconf.todo("cellSysconfOpen(type=%d, func=*0x%x, userdata=*0x%x, extparam=*0x%x, id=%d)", type, func, userdata, extparam, id);
2018-02-03 09:51:57 +01:00
sysutil_register_cb([=](ppu_thread& ppu) -> s32
{
func(ppu, CELL_OK, userdata);
return CELL_OK;
});
2018-02-03 09:51:57 +01:00
2017-04-06 22:48:01 +02:00
return CELL_OK;
}
2020-07-16 12:14:57 +02:00
error_code cellSysconfBtGetDeviceList(vm::ptr<CellSysconfBtDeviceList> deviceList)
2015-07-31 00:53:52 +02:00
{
2017-04-06 22:48:01 +02:00
cellSysconf.todo("cellSysconfBtGetDeviceList(deviceList=*0x%x)", deviceList);
2022-06-21 22:13:51 +02:00
if (!deviceList)
{
return CELL_SYSCONF_ERROR_PARAM;
}
2017-04-06 22:48:01 +02:00
return CELL_OK;
2015-07-31 00:53:52 +02:00
}
void cellSysutil_Sysconf_init()
{
REG_FUNC(cellSysutil, cellSysconfAbort);
REG_FUNC(cellSysutil, cellSysconfOpen);
}
2016-03-21 20:43:03 +01:00
DECLARE(ppu_module_manager::cellSysconf)("cellSysconfExtUtility", []()
{
REG_FUNC(cellSysconfExtUtility, cellSysconfBtGetDeviceList);
});