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

Fix sound manager not being stepped by GUIEngine #13661

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/gui/guiEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ void GUIEngine::run()
);
const bool initial_window_maximized = g_settings->getBool("window_maximized");

u64 t_last_frame = porting::getTimeUs();
f32 dtime = 0.0f;

while (m_rendering_engine->run() && (!m_startgame) && (!m_kill)) {

//check if we need to update the "upper left corner"-text
Expand Down Expand Up @@ -293,8 +296,14 @@ void GUIEngine::run()
else
sleep_ms(frametime_min);

u64 t_now = porting::getTimeUs();
dtime = static_cast<f32>(t_now - t_last_frame) * 1.0e-6f;
t_last_frame = t_now;

m_script->step();

m_sound_manager->step(dtime);

#ifdef __ANDROID__
m_menu->getAndroidUIInput();
#endif
Expand Down