def main(): try: server = GameDroidServer() server.run() finally: if inhibitor.is_inhibited(): inhibitor.stop()
def on_device_disconnected(self): with self.lock as lock: self.devices -= 1 if self.devices == 0: print("Screensaver released") inhibitor.stop()