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:
Michael Bayne
2006-05-08 20:58:48 +00:00
parent f59fbac2f4
commit 05fe7f8679
+4 -2
View File
@@ -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();