diff options
Diffstat (limited to 'src/core/hle/service/nvdrv/nvdrv.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index ff8c7c13c..208de0b75 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -29,7 +29,7 @@ namespace Service::Nvidia { -EventInterface::EventInterface(Module& module_) : module{module_} {} +EventInterface::EventInterface(Module& module_) : module{module_}, guard{}, on_signal{} {} EventInterface::~EventInterface() = default; @@ -40,10 +40,7 @@ void EventInterface::RegisterForSignal(Devices::nvhost_ctrl* device) { void EventInterface::UnregisterForSignal(Devices::nvhost_ctrl* device) { std::unique_lock<std::mutex> lk(guard); - auto it = std::find(on_signal.begin(), on_signal.end(), device); - if (it != on_signal.end()) { - on_signal.erase(it); - } + on_signal.remove(device); } void EventInterface::Signal(u32 syncpoint_id, u32 value) { |