From 822edff5bd055238b173da4fb4b0a4ea87392751 Mon Sep 17 00:00:00 2001 From: Chloe Marcec Date: Sat, 23 Jan 2021 22:12:05 +1100 Subject: Simplify condition --- src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp index 73cd5a889..060599bab 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl.cpp @@ -156,8 +156,7 @@ NvResult nvhost_ctrl::IocCtrlEventRegister(const std::vector& input, std::ve } if (events_interface.registered[event_id]) { const auto event_state = events_interface.status[event_id]; - if (event_state == EventState::Registered || event_state == EventState::Waiting || - event_state == EventState::Busy) { + if (event_state != EventState::Free) { LOG_WARNING(Service_NVDRV, "Event already registered! Unregistering previous event"); events_interface.UnregisterEvent(event_id); } else { -- cgit v1.2.3