mirror of
https://github.com/minetest/minetest.git
synced 2025-01-10 18:10:21 +01:00
Fix sound manager not being stepped by GUIEngine
This commit is contained in:
parent
1837a11c22
commit
8e09077de8
@ -259,6 +259,9 @@ void GUIEngine::run()
|
|||||||
);
|
);
|
||||||
const bool initial_window_maximized = g_settings->getBool("window_maximized");
|
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)) {
|
while (m_rendering_engine->run() && (!m_startgame) && (!m_kill)) {
|
||||||
|
|
||||||
//check if we need to update the "upper left corner"-text
|
//check if we need to update the "upper left corner"-text
|
||||||
@ -293,8 +296,14 @@ void GUIEngine::run()
|
|||||||
else
|
else
|
||||||
sleep_ms(frametime_min);
|
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_script->step();
|
||||||
|
|
||||||
|
m_sound_manager->step(dtime);
|
||||||
|
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
m_menu->getAndroidUIInput();
|
m_menu->getAndroidUIInput();
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user