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
This commit is contained in:
rdb 2022-02-20 16:54:15 +01:00
parent 739ad1ebd6
commit 65ee79158f

View File

@ -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):
"""