remove GetCurrentModule() functions in HLE Services

This commit is contained in:
B3n30 2018-10-11 11:12:07 +02:00
parent 4ee914c7a8
commit 9d53136f20
14 changed files with 99 additions and 69 deletions

View file

@ -12,28 +12,15 @@
namespace Service::IR {
static std::weak_ptr<IR_RST> current_ir_rst;
static std::weak_ptr<IR_USER> current_ir_user;
void ReloadInputDevices() {
if (auto ir_user = current_ir_user.lock())
ir_user->ReloadInputDevices();
if (auto ir_rst = current_ir_rst.lock())
ir_rst->ReloadInputDevices();
}
void InstallInterfaces(Core::System& system) {
auto& service_manager = system.ServiceManager();
std::make_shared<IR_U>()->InstallAsService(service_manager);
auto ir_user = std::make_shared<IR_USER>();
ir_user->InstallAsService(service_manager);
current_ir_user = ir_user;
auto ir_rst = std::make_shared<IR_RST>();
ir_rst->InstallAsService(service_manager);
current_ir_rst = ir_rst;
}
} // namespace Service::IR

View file

@ -14,9 +14,6 @@ class ServiceManager;
namespace Service::IR {
/// Reload input devices. Used when input configuration changed
void ReloadInputDevices();
void InstallInterfaces(Core::System& system);
} // namespace Service::IR