+ def fetchDBInfo(self, db):
+ if self.externalConnector and self.externalConnector.edid:
+ self.previousSetup = db.getConfig(self.externalConnector.edid) # may also return None
+ else:
+ self.previousSetup = None
+ if self.previousSetup:
+ print("Known screen, previous setup:", self.previousSetup)
+ self.externalConnector.previousResolution = self.previousSetup.extResolution
+ self.internalConnector.previousResolution = self.previousSetup.intResolution
+
+ def putDBInfo(self, db, setup):
+ if not self.externalConnector or not self.externalConnector.edid:
+ return
+ db.putConfig(self.externalConnector.edid, setup)