OpenTTD

Tasklist

FS#6546 - Fast forward on macOS is restricted by frame refresh rate

Attached to Project: OpenTTD
Opened by Stefan Ring (Ringding) - Friday, 17 March 2017, 15:00 GMT
Type Bug
Category Interface
Status New
Assigned To No-one
Operating System Mac OS X
Severity Medium
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

On macOS, fast forward does not run as fast as the CPU can do. It runs about twice the normal speed. This happens at least on El Capitan.

Following information unrelated to OpenTTD, specifically I'm not implying that I've run OpenTTD inside DOSBox -- <http://www.vogons.org/viewtopic.php?f=32&t=46306>:
I've had the same issue with DOSBox, and I found that it behaved like this when DOSBox was compiled on a contemporary macOS machine (I think Yosemite or later), but when I compiled it on Snow Leopard, the frame refresh restriction went away, even when running on El Capitan. I have not found out what caused this. Maybe someone can enlighten me.
This task depends upon

Comment by andythenorth (andythenorth) - Sunday, 03 September 2017, 10:06 GMT
Is full-animation enabled here?

If so see FS#6469, which I suspect will at least mitigate this, or possibly eliminate it.
Comment by Stefan Ring (Ringding) - Sunday, 03 September 2017, 10:53 GMT
I can try, but I doubt it, as if this was the cause, the CPU usage would be much higher. It's showing ~30% in fast-forward vs. ~19% at normal speed.
Comment by Stefan Ring (Ringding) - Monday, 04 September 2017, 20:05 GMT
As expected, it does not make a difference.
Comment by andythenorth (andythenorth) - Tuesday, 05 September 2017, 06:35 GMT
Join IRC sometime if you want to investigate further https://wiki.openttd.org/Irc

Trading ticket comments is a non-fluid way to discuss the issue ;)
Comment by Stefan Ring (Ringding) - Saturday, 21 October 2017, 13:07 GMT
I've played around with this quite a bit, and for now I've accidentally found that setting [ this->cocoaview setWantsLayer:YES ] in wnd_quartz.mm is a cheap way to speed it up a good deal by pushing the frame rate up from 60 to 125.

Someone on the DOSbox forums hinted that this peculiar frame rate limiting behavior may already be a thing of the past on the Sierras. I'm still on El Capitan for now.

Loading...