Hi all,
Have a very bare-bones standalone PC build whose Start function sets Application.targetFrameRate to 60. Afterwards, I do pretty much nothing with the program itself except confirm through FRAPS that the framerate is actually set to 60. Well, I lied–I do one thing with the program: I have a keybind that basically toggles the framerate between 30 and 60 (by making a call to Applicaiton.targetFrameRate as above.) I make sure that this works and that I can switch between 30 and 60. Great, good, dandy, this works and I change the framerate back to 60.
After that, I then ALT+TAB the program a few times, turn on/off the monitor, go back to the program, it stays locked at 60. Wait another half-hour, do the same, still locked at 60. One last time, I ALT+TAB out and turn off the monitor and go to sleep. I should also note that the computer itself does not go to sleep during this time (but I do)
When I look at it in the morning, however, after roughly 8 hours or so, I find that the framerate has skyrocketed to 120. Even stranger, the previous keybind that toggled between 30 and 60 now toggles between 60 and 120 instead!? Furthermore, the FPS is no longer ‘locked’ so cleanly to either of these values, but seems to hover/oscillate around them (for instance, it’ll show ~58-62 instead of 60, etc.)
I have a few more tests to run, such as leaving the monitor on, and not alt-tabbing out, but I wanted to post this here first incase anyone had any insight.
I do know this could potentially happen if the framerate was locked using a float data type, but I’ve read on the forums elsewhere that a double is used internally (good) that is then truncated to a float when requested. I guess my question is, does anyone have an idea whether this is just framerate drift (doesn’t seem to be) or something more insidious? Again, the program itself just spins in a loop waiting for input and overnight, literally nothing happens (unless my cat is making very well-hidden code changes.)
Thanks!