MCPcopy Create free account
hub / github.com/RPCSX/rpcsx / check_service

Method check_service

kernel/cellos/src/sys_config.cpp:143–165  ·  view source on GitHub ↗

LV2 Config Service Listener

Source from the content-addressed store, hash-verified

141
142// LV2 Config Service Listener
143bool lv2_config_service_listener::check_service(
144 const lv2_config_service &service) const {
145 // Filter by type
146 if (type == SYS_CONFIG_SERVICE_LISTENER_ONCE && !service_events.empty()) {
147 return false;
148 }
149
150 // Filter by service ID or verbosity
151 if (service_id != service.id || min_verbosity > service.verbosity) {
152 return false;
153 }
154
155 // realhw only seems to send the pad connected events to the listeners that
156 // provided 0x01 as the first byte of their data buffer
157 // TODO: Figure out how this filter works more properly
158 if (service_id == SYS_CONFIG_SERVICE_PADMANAGER &&
159 (data.empty() || data[0] != 0x01)) {
160 return false;
161 }
162
163 // Event applies to this listener!
164 return true;
165}
166
167bool lv2_config_service_listener::notify(
168 const shared_ptr<lv2_config_service_event> &event) {

Callers 1

notifyMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected