Stub ldr:ro IRoInterface

Some games initialise this service on startup however don't actually use it. Add a simple stub to allow such games to boot.
This commit is contained in:
Billy Laws 2022-09-29 20:22:00 +01:00
parent 1fc2641746
commit e571066409
4 changed files with 28 additions and 0 deletions

View File

@ -288,6 +288,7 @@ add_library(skyline SHARED
${source_DIR}/skyline/services/bt/IBluetoothUser.cpp
${source_DIR}/skyline/services/btm/IBtmUser.cpp
${source_DIR}/skyline/services/btm/IBtmUserCore.cpp
${source_DIR}/skyline/services/ro/IRoInterface.cpp
${source_DIR}/skyline/applet/applet_creator.cpp
${source_DIR}/skyline/applet/controller_applet.cpp
${source_DIR}/skyline/applet/error_applet.cpp

View File

@ -0,0 +1,8 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#include "IRoInterface.h"
namespace skyline::service::ro {
IRoInterface::IRoInterface(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
}

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/serviceman.h>
namespace skyline::service::ro {
/**
* @brief IRoInterface or ldr:ro is used by applications to dynamically load nros
* @url https://switchbrew.org/wiki/RO_services#LoadModule
*/
class IRoInterface : public BaseService {
public:
IRoInterface(const DeviceState &state, ServiceManager &manager);
};
}

View File

@ -47,6 +47,7 @@
#include "mmnv/IRequest.h"
#include "bt/IBluetoothUser.h"
#include "btm/IBtmUser.h"
#include "ro/IRoInterface.h"
#include "serviceman.h"
#define SERVICE_CASE(class, name, ...) \
@ -121,6 +122,7 @@ namespace skyline::service {
SERVICE_CASE(bt::IBluetoothUser, "bt")
SERVICE_CASE(btm::IBtmUser, "btm:u")
SERVICE_CASE(nim::IShopServiceAccessServerInterface, "nim:eca")
SERVICE_CASE(ro::IRoInterface, "ldr:ro")
default:
std::string_view nameString(span(reinterpret_cast<char *>(&name), sizeof(name)).as_string(true));
throw std::out_of_range(fmt::format("CreateService called with an unknown service name: {}", nameString));