DEV_CheckItemChanges:  support REventPoll and REventAwake
@@ -65,9 +65,25 @@ void DEV_InitStateHandler(Device *device, const Event &event)
}
void DEV_CheckItemChanges(Device *device, const Event &event)
+{
+ std::vector<Resource*> subDevices;
+
+ if (event.what() == REventAwake || event.what() == REventPoll)
+ {
+ subDevices = device->subDevices();
+ }
+ else
{
auto *sub = DEV_GetSubDevice(device, event.resource(), event.id());
+ if (sub)
+ {
+ subDevices.push_back(sub);
+ }
+ }
+
+ for (auto *sub : subDevices)
+ {
if (sub && !sub->stateChanges().empty())
{
auto *item = sub->item(event.what());
@@ -83,6 +99,7 @@ void DEV_CheckItemChanges(Device *device, const Event &event)
sub->cleanupStateChanges();
}
}
+}
void DEV_IdleStateHandler(Device *device, const Event &event)
{
