- DisplayAlert() already waits for a mouse click.

- Implement dprintf() with DisplayAlert() for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39050 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2010-10-22 19:19:03 +00:00
parent 51bac633cf
commit 5a0d2097fe

View File

@ -51,8 +51,8 @@ panic(const char *format, ...)
DisplayAlert(DEADEND_ALERT, &alert, 40);
clear_key_buffer();
wait_for_key();
//clear_key_buffer();
//wait_for_key();
platform_exit();
}
@ -60,17 +60,40 @@ panic(const char *format, ...)
void
dprintf(const char *format, ...)
{
char buffer[512];
static struct AlertMessage {
uint16 column1;
uint8 line1;
char message[14];
uint8 cont;
uint16 column2;
uint8 line2;
char buffer[512];
uint8 end;
} _PACKED alert = {
10, 12,
"KERN: ",
1,
10, 22,
"",
0
};
char *buffer = alert.buffer;
va_list list;
//platform_switch_to_text_mode();
memset(buffer, 0, 512);
va_start(list, format);
vsnprintf(buffer, sizeof(buffer), format, list);
vsnprintf(buffer, 512, format, list);
va_end(list);
// Bconput(DEV_AUX, buffer);
DisplayAlert(RECOVERY_ALERT, &alert, 40);
//if (platform_boot_options() & BOOT_OPTION_DEBUG_OUTPUT)
// Bconput(DEV_CONSOLE, buffer);
// Bconput(DEV_CONSOLE, buffer);
}