diff cagou/core/cagou_main.py @ 262:825e8c91b703

core: (de)activate sync flag when the frontend is being paused or resumed
author Goffi <goffi@goffi.org>
date Mon, 11 Mar 2019 08:39:43 +0100
parents 145c29b5f2b5
children 3e11b5d923e2
line wrap: on
line diff
--- a/cagou/core/cagou_main.py	Mon Mar 11 08:39:43 2019 +0100
+++ b/cagou/core/cagou_main.py	Mon Mar 11 08:39:43 2019 +0100
@@ -334,11 +334,13 @@
             s.sendall(STATE_RUNNING)
 
     def on_pause(self):
+        self.host.sync = False
         self._frontend_status_socket.sendall(STATE_PAUSED)
         return True
 
     def on_resume(self):
         self._frontend_status_socket.sendall(STATE_RUNNING)
+        self.host.sync = True
 
     def on_stop(self):
         if sys.platform == "android":