|
@@ -32,6 +32,7 @@ import EventManager
|
|
|
import math,sys,os
|
|
import math,sys,os
|
|
|
import Loader
|
|
import Loader
|
|
|
import time
|
|
import time
|
|
|
|
|
+import profile, pstats
|
|
|
from direct.fsm import ClassicFSM
|
|
from direct.fsm import ClassicFSM
|
|
|
from direct.fsm import State
|
|
from direct.fsm import State
|
|
|
import DirectObject
|
|
import DirectObject
|
|
@@ -115,6 +116,14 @@ class ShowBase(DirectObject.DirectObject):
|
|
|
# has to run before libpanda is even loaded).
|
|
# has to run before libpanda is even loaded).
|
|
|
taskMgr.resumeFunc = PStatClient.resumeAfterPause
|
|
taskMgr.resumeFunc = PStatClient.resumeAfterPause
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ profile.Profile.bias = float(self.config.GetString("profile-bias"))
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ def f8(x):
|
|
|
|
|
+ return ("%"+"8.%df"%base.config.GetInt("profile-decimals",3)) % x
|
|
|
|
|
+ pstats.f8=f8
|
|
|
|
|
+
|
|
|
# If the aspect ratio is 0 or None, it means to infer the
|
|
# If the aspect ratio is 0 or None, it means to infer the
|
|
|
# aspect ratio from the window size.
|
|
# aspect ratio from the window size.
|
|
|
# If you need to know the actual aspect ratio call base.getAspectRatio()
|
|
# If you need to know the actual aspect ratio call base.getAspectRatio()
|