mirror of
https://github.com/Lime3DS/Lime3DS
synced 2025-01-09 13:43:27 +00:00
4812e98e05
also fix the wrong header in Shutdown
44 lines
978 B
C++
44 lines
978 B
C++
// Copyright 2015 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <memory>
|
|
#include "core/hle/service/ir/ir.h"
|
|
#include "core/hle/service/ir/ir_rst.h"
|
|
#include "core/hle/service/ir/ir_u.h"
|
|
#include "core/hle/service/ir/ir_user.h"
|
|
#include "core/hle/service/service.h"
|
|
|
|
namespace Service {
|
|
namespace IR {
|
|
|
|
static std::weak_ptr<IR_RST> current_ir_rst;
|
|
|
|
void Init() {
|
|
AddService(new IR_User_Interface);
|
|
|
|
InitUser();
|
|
}
|
|
|
|
void Shutdown() {
|
|
ShutdownUser();
|
|
}
|
|
|
|
void ReloadInputDevices() {
|
|
ReloadInputDevicesUser();
|
|
|
|
if (auto ir_rst = current_ir_rst.lock())
|
|
ir_rst->ReloadInputDevices();
|
|
}
|
|
|
|
void InstallInterfaces(SM::ServiceManager& service_manager) {
|
|
std::make_shared<IR_U>()->InstallAsService(service_manager);
|
|
|
|
auto ir_rst = std::make_shared<IR_RST>();
|
|
ir_rst->InstallAsService(service_manager);
|
|
current_ir_rst = ir_rst;
|
|
}
|
|
|
|
} // namespace IR
|
|
|
|
} // namespace Service
|