From 65ee79158f3c75b2ddfe504f9b426a8d617b3b1c Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 20 Feb 2022 16:54:15 +0100 Subject: [PATCH] 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 --- direct/src/showbase/ShowBase.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 5002ddd824..eae8383387 100644 --- a/direct/src/showbase/ShowBase.py +++ b/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): """