We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
UpdateWindow之后是不是应该用如下代码刷新: MSG msg; while (1) { if (! PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { ejoy2d_win_update(); InvalidateRect(wnd, NULL , FALSE); if (WM_QUIT == msg.message) { break; } continue; } TranslateMessage(&msg); DispatchMessage(&msg); }
在我的机器上(Win7, Intel i3)上动画不能正常播放。
The text was updated successfully, but these errors were encountered:
你这是能跑多快跑多快的节奏啊!
2014-04-18 17:24 GMT+08:00 Hai Bai notifications@github.com:
UpdateWindow之后是不是应该用如下代码刷新: MSG msg; while (1) { if (! PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) { ejoy2d_win_update(); InvalidateRect(wnd, NULL , FALSE); if (WM_QUIT == msg.message) { break; } continue; } TranslateMessage(&msg); DispatchMessage(&msg); } 在我的机器上(Win7, Intel i3)上动画不能正常播放。 — Reply to this email directly or view it on GitHubhttps://github.com//issues/47 .
— Reply to this email directly or view it on GitHubhttps://github.com//issues/47 .
Sorry, something went wrong.
void ejoy2d_win_update() { static int ifirst = 1; static DWORD last_tick = 0; if(ifirst){ last_tick = GetTickCount(); ifirst = 0; } DWORD dwNow = GetTickCount(); float delta = 1.0f * (dwNow - last_tick) / 1000; last_tick = dwNow; //ejoy2d_game_update(G->game, 0.01f); //之前是hardcode的0.01 ejoy2d_game_update(G->game, delta); } 这样就可以了。
No branches or pull requests
UpdateWindow之后是不是应该用如下代码刷新:
MSG msg;
while (1)
{
if (! PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
ejoy2d_win_update();
InvalidateRect(wnd, NULL , FALSE);
if (WM_QUIT == msg.message)
{
break;
}
continue;
}
TranslateMessage(&msg);
DispatchMessage(&msg);
}
在我的机器上(Win7, Intel i3)上动画不能正常播放。
The text was updated successfully, but these errors were encountered: