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

set fps 40 does not take effect, it's allway 60fps #19241

Open
ccmfeng opened this Issue Dec 11, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@ccmfeng
Copy link

ccmfeng commented Dec 11, 2018

  • cocos2d-x version: 3.17
  • devices test on: iphone6s 12.1
  • developing environments
    • NDK version:
    • Xcode version: 10.1
    • VS version:
    • browser type and version:

Steps to Reproduce:

  1. set fps 40 does not take effect, it's allway 60fps
@Dimon4eg

This comment has been minimized.

Copy link
Contributor

Dimon4eg commented Dec 11, 2018

How do you set 40 fps?

@ccmfeng

This comment has been minimized.

Copy link

ccmfeng commented Dec 11, 2018

CC_GAME_FPS = 40
local director = cc.Director:getInstance()
local view = director:getOpenGLView()

if CC_GAME_FPS > 0 then
director:setAnimationInterval(1.0/CC_GAME_FPS)
end

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