Try restore the recently used state after device-list refresh

This takes into account if the device is present, and picks
the most recently used state for the available devices.
This commit is contained in:
Robin Gareus 2020-05-18 15:11:36 +02:00
parent c8cf84b7f9
commit cbc6bccc36
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
2 changed files with 45 additions and 31 deletions

View file

@ -272,7 +272,8 @@ private:
StateList states;
State get_matching_state (const std::string& backend);
bool set_state_for_backend (const std::string& backend);
State get_matching_state (const std::string& backend,
const std::string& driver,
const std::string& device);