瀏覽代碼

showbase: Start recording right away when opening PStats connection

Don't wait until the next frame - makes it harder to diagnose long load times in the new Timeline view
rdb 3 年之前
父節點
當前提交
65ee79158f
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      direct/src/showbase/ShowBase.py

+ 5 - 1
direct/src/showbase/ShowBase.py

@@ -1930,7 +1930,11 @@ class ShowBase(DirectObject.DirectObject):
         if port is None:
             port = -1
         PStatClient.connect(hostname, port)
-        return PStatClient.isConnected()
+        if PStatClient.isConnected():
+            PStatClient.mainTick()
+            return True
+        else:
+            return False
 
     def addSfxManager(self, extraSfxManager):
         """