Route live reload policy through platform services

This commit is contained in:
2026-06-03 05:08:00 +02:00
parent ac4d065c78
commit e152616d7f
10 changed files with 66 additions and 18 deletions

View File

@@ -1014,22 +1014,23 @@ void App::ui_thread_main()
rendered_frames = 0;
}
#if /*_DEBUG &&*/ (_WIN32 || __OSX__)
t_reloader += dt;
if (t_reloader > 1.0)
if (platform_enables_live_asset_reloading())
{
t_reloader = 0;
if (ShaderManager::reload())
t_reloader += dt;
if (t_reloader > 1.0)
{
stroke->update_controls();
redraw = true;
t_reloader = 0;
if (ShaderManager::reload())
{
stroke->update_controls();
redraw = true;
}
if (layout.reload())
redraw = true;
if (layout_designer.reload())
redraw = true;
}
if (layout.reload())
redraw = true;
if (layout_designer.reload())
redraw = true;
}
#endif
tick(dt);