mirror of https://github.com/minetest/minetest.git
remove timer variable
This commit is contained in:
parent
98200bb771
commit
97f7a521f3
|
@ -1284,20 +1284,15 @@ void Game::shutdown()
|
|||
FpsControl fps_control;
|
||||
fps_control.reset();
|
||||
|
||||
f32 timer = 0;
|
||||
float percentage = 0;
|
||||
while (stop_thread->isRunning()) {
|
||||
m_rendering_engine->run();
|
||||
f32 dtime;
|
||||
fps_control.limit(device, &dtime);
|
||||
timer += dtime;
|
||||
|
||||
if(timer >= 0.1) {
|
||||
timer = 0;
|
||||
percentage += 5;
|
||||
if (percentage > 100) {
|
||||
percentage = 0;
|
||||
}
|
||||
percentage += 5 * (dtime / 0.1);
|
||||
if (percentage >= 100) {
|
||||
percentage = 0;
|
||||
}
|
||||
|
||||
m_rendering_engine->draw_load_screen(utf8_to_wide(std::string(N_("Shutting down…"))) , guienv, texture_src, dtime, percentage);
|
||||
|
|
Loading…
Reference in New Issue