mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
give immediate feedback if pstats can't connect
This commit is contained in:
parent
f58b6879d1
commit
5b03026049
@ -1348,7 +1348,9 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
def createStats(self, hostname=None, port=None):
|
def createStats(self, hostname=None, port=None):
|
||||||
# You can specify pstats-host in your Config.prc or use ~pstats/~aipstats
|
# You can specify pstats-host in your Config.prc or use ~pstats/~aipstats
|
||||||
# The default is localhost
|
# The default is localhost
|
||||||
if self.wantStats:
|
if not self.wantStats:
|
||||||
|
return False
|
||||||
|
|
||||||
if PStatClient.isConnected():
|
if PStatClient.isConnected():
|
||||||
PStatClient.disconnect()
|
PStatClient.disconnect()
|
||||||
# these default values match the C++ default values
|
# these default values match the C++ default values
|
||||||
@ -1357,6 +1359,8 @@ class ShowBase(DirectObject.DirectObject):
|
|||||||
if port is None:
|
if port is None:
|
||||||
port = -1
|
port = -1
|
||||||
PStatClient.connect(hostname, port)
|
PStatClient.connect(hostname, port)
|
||||||
|
return PStatClient.isConnected()
|
||||||
|
|
||||||
|
|
||||||
def addSfxManager(self, extraSfxManager):
|
def addSfxManager(self, extraSfxManager):
|
||||||
# keep a list of sfx manager objects to apply settings to,
|
# keep a list of sfx manager objects to apply settings to,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user