mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-12-28 09:15:28 +03: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
|
||||
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
||||
|
||||
#include <kernel/types/KProcess.h>
|
||||
#include "IAddOnContentManager.h"
|
||||
|
||||
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) {
|
||||
response.Push<u32>(0);
|
||||
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
|
||||
|
||||
#include <kernel/types/KEvent.h>
|
||||
#include <services/base_service.h>
|
||||
|
||||
namespace skyline::service::aocsrv {
|
||||
@ -11,13 +12,22 @@ namespace skyline::service::aocsrv {
|
||||
* @url https://switchbrew.org/wiki/NS_Services#aoc:u
|
||||
*/
|
||||
class IAddOnContentManager : public BaseService {
|
||||
private:
|
||||
std::shared_ptr<kernel::type::KEvent> addOnContentListChangedEvent; //!< This KEvent is triggered when the add-on content list changes
|
||||
|
||||
public:
|
||||
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 GetAddOnContentListChangedEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
|
||||
|
||||
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