mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-30 05:04:15 +01:00
Stub additional IAddOnContentManager functions
Used mainly by UE4 games
This commit is contained in:
parent
486a835d0a
commit
6c5f9941ad
@ -1,13 +1,29 @@
|
|||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||||
|
|
||||||
|
#include <kernel/types/KProcess.h>
|
||||||
#include "IAddOnContentManager.h"
|
#include "IAddOnContentManager.h"
|
||||||
|
|
||||||
namespace skyline::service::aocsrv {
|
namespace skyline::service::aocsrv {
|
||||||
IAddOnContentManager::IAddOnContentManager(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager) {}
|
IAddOnContentManager::IAddOnContentManager(const DeviceState &state, ServiceManager &manager)
|
||||||
|
: BaseService(state, manager),
|
||||||
|
addOnContentListChangedEvent(std::make_shared<type::KEvent>(state, false)) {}
|
||||||
|
|
||||||
|
Result IAddOnContentManager::CountAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
response.Push<u32>(0);
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
Result IAddOnContentManager::ListAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
Result IAddOnContentManager::ListAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
response.Push<u32>(0);
|
response.Push<u32>(0);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result IAddOnContentManager::GetAddOnContentListChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
|
||||||
|
KHandle handle{state.process->InsertItem(addOnContentListChangedEvent)};
|
||||||
|
Logger::Debug("Add On Content List Changed Event Handle: 0x{:X}", handle);
|
||||||
|
|
||||||
|
response.copyHandles.push_back(handle);
|
||||||
|
return {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <kernel/types/KEvent.h>
|
||||||
#include <services/base_service.h>
|
#include <services/base_service.h>
|
||||||
|
|
||||||
namespace skyline::service::aocsrv {
|
namespace skyline::service::aocsrv {
|
||||||
@ -11,13 +12,22 @@ namespace skyline::service::aocsrv {
|
|||||||
* @url https://switchbrew.org/wiki/NS_Services#aoc:u
|
* @url https://switchbrew.org/wiki/NS_Services#aoc:u
|
||||||
*/
|
*/
|
||||||
class IAddOnContentManager : public BaseService {
|
class IAddOnContentManager : public BaseService {
|
||||||
|
private:
|
||||||
|
std::shared_ptr<kernel::type::KEvent> addOnContentListChangedEvent; //!< This KEvent is triggered when the add-on content list changes
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IAddOnContentManager(const DeviceState &state, ServiceManager &manager);
|
IAddOnContentManager(const DeviceState &state, ServiceManager &manager);
|
||||||
|
|
||||||
|
Result CountAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
Result ListAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
Result ListAddOnContent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
|
Result GetAddOnContentListChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||||
|
|
||||||
SERVICE_DECL(
|
SERVICE_DECL(
|
||||||
SFUNC(0x3, IAddOnContentManager, ListAddOnContent)
|
SFUNC(0x2, IAddOnContentManager, CountAddOnContent),
|
||||||
|
SFUNC(0x3, IAddOnContentManager, ListAddOnContent),
|
||||||
|
SFUNC(0x8, IAddOnContentManager, GetAddOnContentListChangedEvent)
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user