New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOHAWK: RIVEN: Delay less for slower systems #1272

Merged
merged 2 commits into from Aug 11, 2018

Conversation

Projects
None yet
2 participants
@dafioram
Member

dafioram commented Aug 8, 2018

  1. Move input handling from doFrame to another function
  2. Delay less if doFrame loop takes longer.

dafioram added some commits Aug 8, 2018

MOHAWK: RIVEN: Delay less for slower systems
Some systems may take longer to process the game loop
than others so we delay by a variable amount so faster
and slower system execute the game loop the same number
of times per second (the fps is capped at 100).

Slower systems that take longer than 10ms to process the game
loop won't have any delay.
@bgK

This comment has been minimized.

Member

bgK commented Aug 11, 2018

I did a bit on testing on my system, with vsync enabled, and this seems to introduce missed frames when turning around.

Without the proposed change:
capture d ecran de 2018-08-11 09-47-39

With the proposed change:
capture d ecran de 2018-08-11 09-48-34

I believe waiting should happen before updating the screen so it does not interfer with vsync.

@bgK

This comment has been minimized.

Member

bgK commented Aug 11, 2018

Actually, my mistake. The dropped frames were always there. I messed up the delay while testing.

@bgK bgK merged commit 535c47f into scummvm:master Aug 11, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@dafioram

This comment has been minimized.

Member

dafioram commented Aug 12, 2018

Interesting that you are getting 60fps and not 100fps for the 10ms delay is that due to the vsync or some other 60fps limitation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment