Don't choke if getFrequency() returns 0. We may want to check for that
specifically as this doesn't do the right thing for something like 50fps, but does anyone actually use less than 60? git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4097 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -93,8 +93,10 @@ public class JmeApp
|
||||
// create an appropriate timer
|
||||
_timer = Timer.getTimer(_api);
|
||||
|
||||
// start with the target FPS equal to the refresh rate
|
||||
setTargetFPS(_display.getFrequency());
|
||||
// start with the target FPS equal to the refresh rate (but
|
||||
// sometimes the refresh rate is reported as zero so don't let that
|
||||
// freak us out)
|
||||
setTargetFPS(Math.max(_display.getFrequency(), 60));
|
||||
|
||||
// initialize our main camera controls and user input handling
|
||||
initInput();
|
||||
|
||||
Reference in New Issue
Block a user