Skip to content
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

fpsが小数の時に時間表示が動かなくなる不具合の修正 #470

Merged
merged 1 commit into from
Oct 5, 2019

Conversation

suzme
Copy link
Contributor

@suzme suzme commented Oct 5, 2019

変更内容

  1. 時間表示の処理を毎フレーム行うようにしました
  2. 秒の計算に切り捨てを追加しました

変更理由

g_fpsに小数を指定すると現在時間表示が「-:--」のまま動かなくなります。

その他コメント

twitterより

@cwtickle
Copy link
Owner

cwtickle commented Oct 5, 2019

ありがとうございます。
ただ、毎フレーム行わなくても下記で対処できるような気がしますが、どうでしょうか?
秒の計算の切り捨ては良いと思います。

if (g_scoreObj.nominalFrameNum % g_fps === 0) {
if (Math.floor(g_scoreObj.nominalFrameNum % g_fps) === 0) {

@suzme
Copy link
Contributor Author

suzme commented Oct 5, 2019

重い処理ではないので単純な方向に解決したほうがよいと考えました。
強いこだわりがあるわけではないので修正します。

Copy link
Owner

@cwtickle cwtickle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございますー、問題ありませんのでマージしておきます。

@cwtickle cwtickle added bug Something isn't working func:Main labels Oct 5, 2019
@cwtickle cwtickle merged commit 5b29492 into cwtickle:develop Oct 5, 2019
@suzme suzme deleted the fix-timeview branch September 5, 2021 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working func:Main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants