Skip to content

Conversation

@NOOBDY
Copy link
Member

@NOOBDY NOOBDY commented Jun 13, 2025

the original implementation calls SDL_ functions before SDL_init is called, which probably produces garbage results on first loop on some environments (Linux?)

and on

ms_t afterUpdate = Util::Time::GetElapsedTimeMs();
ms_t updateTime = afterUpdate - m_BeforeUpdateTime;
if (updateTime < frameTime) {
SDL_Delay(static_cast<Uint32>(frameTime - updateTime));
}

updateTime can be a large negative number, causing SDL_Delay to sleep for a very long time

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Member

@Dragonfly911117 Dragonfly911117 left a comment

Choose a reason for hiding this comment

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

LGTM

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

Labels

None yet

Projects

Status: 🆕 Backlog

Development

Successfully merging this pull request may close these issues.

2 participants