2026-09-26 11:58:24

Signed-off-by: lizzie <lizzie@eden-emu.dev>
This commit is contained in:
lizzie
2026-09-26 11:58:24 +00:00
committed by crueter
parent 3050a2027b
commit 560be57685
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -47,9 +47,9 @@ ServiceFrameworkBase::~ServiceFrameworkBase() {
const auto guard = ServiceFrameworkBase::LockService();
}
void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, std::optional<FunctionInfoBase> info) {
void ServiceFrameworkBase::ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info) {
auto cmd_buf = ctx.CommandBuffer();
std::string function_name = info.has_value() ? info->name : "<unknown>";
std::string function_name = bool(info) ? info->name : "<unknown>";
fmt::memory_buffer buf;
fmt::format_to(std::back_inserter(buf), "function '{}({})': port='{}' cmd_buf={{[0]={:#x}", ctx.GetCommand(), function_name, service_name, cmd_buf[0]);
@@ -70,7 +70,7 @@ void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) {
const bool is_cmd_read = ctx.GetCommand() == 0;
auto const info = FindRequest(ctx.GetCommand());
if (!info.has_value() || info->handler_callback == nullptr)
return ReportUnimplementedFunction(ctx, info);
return ReportUnimplementedFunction(ctx, &*info);
LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer()));
handler_invoker(this, info->handler_callback, ctx);
@@ -85,7 +85,7 @@ void ServiceFrameworkBase::InvokeRequest(HLERequestContext& ctx) {
void ServiceFrameworkBase::InvokeRequestTipc(HLERequestContext& ctx) {
auto const info = FindRequestTipc(ctx.GetCommand());
if (!info.has_value() || info->handler_callback == nullptr)
return ReportUnimplementedFunction(ctx, info);
return ReportUnimplementedFunction(ctx, &*info);
LOG_TRACE(Service, "{}", MakeFunctionString(info->name, GetServiceName(), ctx.CommandBuffer()));
handler_invoker(this, info->handler_callback, ctx);
+2 -2
View File
@@ -160,7 +160,7 @@ protected:
using FunctionInfo = FunctionInfoTyped<Self>;
template<typename ...Ts>
requires (std::same_as<Ts, FunctionInfo> && ...)
//requires (std::same_as<Ts, FunctionInfo> && ...)
[[nodiscard]] static consteval frozen::map<u32, HandlerFnP<ServiceFrameworkBase>, sizeof...(Ts)> CreateStaticMap(Ts... args) {
return frozen::map<u32, HandlerFnP<ServiceFrameworkBase>, sizeof...(args)>{
{args.expected_header, HandlerFnP<ServiceFrameworkBase>(args.handler_callback)}...
@@ -169,7 +169,7 @@ protected:
// Used exclusively by NFC
template<typename T, typename ...Ts>
requires (std::same_as<Ts, FunctionInfoTyped<T>> && ...)
//requires (std::same_as<Ts, FunctionInfoTyped<T>> && ...)
[[nodiscard]] static consteval frozen::map<u32, HandlerFnP<ServiceFrameworkBase>, sizeof...(Ts)> CreateStaticMapWithClass(Ts... args) {
return frozen::map<u32, HandlerFnP<ServiceFrameworkBase>, sizeof...(args)>{
{args.expected_header, HandlerFnP<ServiceFrameworkBase>(args.handler_callback)}...