mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-25 20:46:55 +01:00
Stub mii:e/mii:u
Needed for SSBU
This commit is contained in:
parent
69ee3cfc66
commit
68253fe995
@ -379,6 +379,8 @@ add_library(skyline SHARED
|
||||
${source_DIR}/skyline/services/ssl/ISslContext.cpp
|
||||
${source_DIR}/skyline/services/prepo/IPrepoService.cpp
|
||||
${source_DIR}/skyline/services/mmnv/IRequest.cpp
|
||||
${source_DIR}/skyline/services/mii/IStaticService.cpp
|
||||
${source_DIR}/skyline/services/mii/IDatabaseService.cpp
|
||||
)
|
||||
target_include_directories(skyline PRIVATE ${source_DIR}/skyline)
|
||||
# target_precompile_headers(skyline PRIVATE ${source_DIR}/skyline/common.h) # PCH will currently break Intellisense
|
||||
|
37
app/src/main/cpp/skyline/services/mii/IDatabaseService.cpp
Normal file
37
app/src/main/cpp/skyline/services/mii/IDatabaseService.cpp
Normal file
@ -0,0 +1,37 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IDatabaseService.h"
|
||||
|
||||
namespace skyline::service::mii {
|
||||
IDatabaseService::IDatabaseService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result IDatabaseService::IsUpdated(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
response.Push<u8>(0);
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::Get(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::Get1(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::BuildRandom(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::BuildDefault(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::SetInterfaceVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Result IDatabaseService::DeleteFile(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
return {};
|
||||
}
|
||||
}
|
40
app/src/main/cpp/skyline/services/mii/IDatabaseService.h
Normal file
40
app/src/main/cpp/skyline/services/mii/IDatabaseService.h
Normal file
@ -0,0 +1,40 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <services/serviceman.h>
|
||||
|
||||
namespace skyline::service::mii {
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/Shared_Database_services#IDatabaseService
|
||||
*/
|
||||
class IDatabaseService : public BaseService {
|
||||
public:
|
||||
IDatabaseService(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
Result IsUpdated(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result Get(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result Get1(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result BuildRandom(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result BuildDefault(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result SetInterfaceVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
Result DeleteFile(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x0, IDatabaseService, IsUpdated),
|
||||
SFUNC(0x3, IDatabaseService, Get),
|
||||
SFUNC(0x4, IDatabaseService, Get1),
|
||||
SFUNC(0x6, IDatabaseService, BuildRandom),
|
||||
SFUNC(0x7, IDatabaseService, BuildDefault),
|
||||
SFUNC(0x16, IDatabaseService, SetInterfaceVersion),
|
||||
SFUNC(0x17, IDatabaseService, DeleteFile)
|
||||
)
|
||||
};
|
||||
}
|
14
app/src/main/cpp/skyline/services/mii/IStaticService.cpp
Normal file
14
app/src/main/cpp/skyline/services/mii/IStaticService.cpp
Normal file
@ -0,0 +1,14 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include "IStaticService.h"
|
||||
#include "IDatabaseService.h"
|
||||
|
||||
namespace skyline::service::mii {
|
||||
IStaticService::IStaticService(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
||||
|
||||
Result IStaticService::GetDatabaseService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||
manager.RegisterService(SRVREG(IDatabaseService), session, response);
|
||||
return {};
|
||||
}
|
||||
}
|
22
app/src/main/cpp/skyline/services/mii/IStaticService.h
Normal file
22
app/src/main/cpp/skyline/services/mii/IStaticService.h
Normal file
@ -0,0 +1,22 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
// Copyright © 2022 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <services/serviceman.h>
|
||||
|
||||
namespace skyline::service::mii {
|
||||
/**
|
||||
* @url https://switchbrew.org/wiki/Shared_Database_services#mii:u.2C_mii:e
|
||||
*/
|
||||
class IStaticService : public BaseService {
|
||||
public:
|
||||
IStaticService(const DeviceState &state, ServiceManager &manager);
|
||||
|
||||
Result GetDatabaseService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
SERVICE_DECL(
|
||||
SFUNC(0x0, IStaticService, GetDatabaseService)
|
||||
)
|
||||
};
|
||||
}
|
@ -54,6 +54,7 @@
|
||||
#include "capsrv/IAlbumApplicationService.h"
|
||||
#include "capsrv/IScreenShotApplicationService.h"
|
||||
#include "ro/IRoInterface.h"
|
||||
#include "mii/IStaticService.h"
|
||||
#include "serviceman.h"
|
||||
|
||||
#define SERVICE_CASE(class, name, ...) \
|
||||
@ -137,6 +138,8 @@ namespace skyline::service {
|
||||
SERVICE_CASE(capsrv::IScreenShotApplicationService, "caps:su")
|
||||
SERVICE_CASE(nim::IShopServiceAccessServerInterface, "nim:eca")
|
||||
SERVICE_CASE(ro::IRoInterface, "ldr:ro")
|
||||
SERVICE_CASE(mii::IStaticService, "mii:e")
|
||||
SERVICE_CASE(mii::IStaticService, "mii:u")
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user