You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
@@ -2175,6 +2175,13 @@ bool Main::start() {
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t minimum_time_msec = GLOBAL_DEF("application/boot_splash/minimum_display_time", 0);
|
||||
ProjectSettings::get_singleton()->set_custom_property_info("application/boot_splash/minimum_display_time",
|
||||
PropertyInfo(Variant::INT,
|
||||
"application/boot_splash/minimum_display_time",
|
||||
PROPERTY_HINT_RANGE,
|
||||
"0,100,1,or_greater,suffix:ms")); // No negative numbers.
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (!doc_tool_path.is_empty()) {
|
||||
// Needed to instance editor-only classes for their default values
|
||||
@@ -2692,6 +2699,15 @@ bool Main::start() {
|
||||
if (movie_writer) {
|
||||
movie_writer->begin(DisplayServer::get_singleton()->window_get_size(), fixed_fps, write_movie_path);
|
||||
}
|
||||
|
||||
if (minimum_time_msec) {
|
||||
uint64_t minimum_time = 1000 * minimum_time_msec;
|
||||
uint64_t elapsed_time = OS::get_singleton()->get_ticks_usec();
|
||||
if (elapsed_time < minimum_time) {
|
||||
OS::get_singleton()->delay_usec(minimum_time - elapsed_time);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user