Compare commits

...

2 Commits

Author SHA1 Message Date
a595a77421
kernel: Print percentage in splash screen
All checks were successful
continuous-integration/drone/push Build is passing
2023-02-27 16:27:59 +01:00
b978d02cfb
luna: Fix %% skipping a character 2023-02-27 16:27:45 +01:00
2 changed files with 2 additions and 1 deletions

View File

@ -151,7 +151,7 @@ static void update_splash(const char* message, u32 current, u32 total)
Framebuffer::rect(line_begin, line_height + 20, line_length, 16, BLACK);
TextConsole::move_to(Framebuffer::width() / 2 - 100, line_height + 20);
TextConsole::print(message).release_value();
TextConsole::printf("%s (%d%%)", message, (100 / total) * current).release_value();
TextConsole::move_to(0, 0);

View File

@ -477,6 +477,7 @@ Result<usize> cstyle_format(const char* format, callback_t callback, void* arg,
if (*format == '%')
{
TRY(format_putchar('%', state));
format++;
continue;
}