瀏覽代碼

Fixed on_stop

Ander 10 年之前
父節點
當前提交
10ce0177c4
共有 1 個文件被更改,包括 2 次插入3 次删除
  1. 2 3
      mopidy_touchscreen/touch_screen.py

+ 2 - 3
mopidy_touchscreen/touch_screen.py

@@ -77,16 +77,15 @@ class TouchScreen(pykka.ThreadingActor, core.CoreListener):
             pygame.display.flip()
             for event in pygame.event.get():
                 if event.type == pygame.QUIT:
-                    self.running = False
+                    utils.process.exit_process()
                 elif event.type == pygame.KEYUP and event.key == pygame.K_q:
-                    self.running = False
+                    utils.process.exit_process()
                 elif event.type == pygame.VIDEORESIZE:
                     self.get_display_surface(event.size)
                     self.screen_manager.resize(event)
                 else:
                     self.screen_manager.event(event)
         pygame.quit()
-        utils.process.exit_process()
 
     def on_start(self):
         try: