diff options
author | Samuel Nicholas <nicholas.samuel@gmail.com> | 2024-03-20 00:11:09 +1030 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-03-26 11:41:13 +0100 |
commit | 93559db3a2cfd1ae15d53900b782022e8c23642b (patch) | |
tree | e61cd290a18ee7d92db09c0b0f23c95f2e84d3c6 /main | |
parent | 7c6e85de0dd7627d1a43acf5f144cee34df6ab36 (diff) | |
download | redot-engine-93559db3a2cfd1ae15d53900b782022e8c23642b.tar.gz |
Properly skip printing version header with `--no-header`
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index 41f82177bc..cf40f764cf 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -398,15 +398,15 @@ void Main::print_header(bool p_rich) { if (VERSION_TIMESTAMP > 0) { // Version timestamp available. if (p_rich) { - print_line_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - \u001b[4m" + String(VERSION_WEBSITE)); + Engine::get_singleton()->print_header_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - \u001b[4m" + String(VERSION_WEBSITE)); } else { - print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - " + String(VERSION_WEBSITE)); + Engine::get_singleton()->print_header(String(VERSION_NAME) + " v" + get_full_version_string() + " (" + Time::get_singleton()->get_datetime_string_from_unix_time(VERSION_TIMESTAMP, true) + " UTC) - " + String(VERSION_WEBSITE)); } } else { if (p_rich) { - print_line_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " - \u001b[4m" + String(VERSION_WEBSITE)); + Engine::get_singleton()->print_header_rich("\u001b[38;5;39m" + String(VERSION_NAME) + "\u001b[0m v" + get_full_version_string() + " - \u001b[4m" + String(VERSION_WEBSITE)); } else { - print_line(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); + Engine::get_singleton()->print_header(String(VERSION_NAME) + " v" + get_full_version_string() + " - " + String(VERSION_WEBSITE)); } } } |