Core: pass down Core::System reference to all services (#4272)
* Core: pass down Core::System reference to all services This has to be done at once due to unified interface used by HLE/LLE switcher * apt: eliminate Core::System::GetInstance * gpu_gsp: eliminate Core::System::GetInstance in service * hid: eliminate Core::System::GetInstance * nwm: eliminate Core::System::GetInstance * err_f: eliminate Core::System::GetInstance
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include "common/alignment.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/ipc_helpers.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/csnd/csnd_snd.h"
|
||||
@@ -193,7 +194,8 @@ CSND_SND::CSND_SND() : ServiceFramework("csnd:SND", 4) {
|
||||
RegisterHandlers(functions);
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
||||
void InstallInterfaces(Core::System& system) {
|
||||
auto& service_manager = system.ServiceManager();
|
||||
std::make_shared<CSND_SND>()->InstallAsService(service_manager);
|
||||
}
|
||||
|
||||
|
@@ -8,6 +8,10 @@
|
||||
#include "core/hle/kernel/shared_memory.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::CSND {
|
||||
|
||||
class CSND_SND final : public ServiceFramework<CSND_SND> {
|
||||
@@ -178,6 +182,6 @@ private:
|
||||
};
|
||||
|
||||
/// Initializes the CSND_SND Service
|
||||
void InstallInterfaces(SM::ServiceManager& service_manager);
|
||||
void InstallInterfaces(Core::System& system);
|
||||
|
||||
} // namespace Service::CSND
|
||||
|
Reference in New Issue
Block a user