Add another paging mode to onscreen debug output. Activated by pressing "t" it
will show the next page after a timeout of 3 seconds instead of waiting for a key to be pressed. This allows you to enjoy onscreen debug output even when you only have a USB keyboard. Should be enough time to take a quick look or take a photo. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31814 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -49,6 +49,7 @@ struct screen_info {
|
|||||||
bool reverse_attr;
|
bool reverse_attr;
|
||||||
int32 in_command_rows;
|
int32 in_command_rows;
|
||||||
bool paging;
|
bool paging;
|
||||||
|
bool paging_timeout;
|
||||||
bool boot_debug_output;
|
bool boot_debug_output;
|
||||||
bool ignore_output;
|
bool ignore_output;
|
||||||
|
|
||||||
@@ -121,6 +122,9 @@ next_line(void)
|
|||||||
if (sScreen.paging && ((sScreen.in_command_rows > 0
|
if (sScreen.paging && ((sScreen.in_command_rows > 0
|
||||||
&& ((sScreen.in_command_rows + 3) % sScreen.rows) == 0)
|
&& ((sScreen.in_command_rows + 3) % sScreen.rows) == 0)
|
||||||
|| (sScreen.boot_debug_output && sScreen.y == sScreen.rows - 1))) {
|
|| (sScreen.boot_debug_output && sScreen.y == sScreen.rows - 1))) {
|
||||||
|
if (sScreen.paging_timeout)
|
||||||
|
spin(1000 * 1000 * 3);
|
||||||
|
else {
|
||||||
// Use the paging mechanism: either, we're in the debugger, and a
|
// Use the paging mechanism: either, we're in the debugger, and a
|
||||||
// command is being executed, or we're currently showing boot debug
|
// command is being executed, or we're currently showing boot debug
|
||||||
// output
|
// output
|
||||||
@@ -148,11 +152,14 @@ next_line(void)
|
|||||||
sScreen.ignore_output = true;
|
sScreen.ignore_output = true;
|
||||||
} else if (c == 'p' && !in_command_invocation())
|
} else if (c == 'p' && !in_command_invocation())
|
||||||
sScreen.paging = false;
|
sScreen.paging = false;
|
||||||
|
else if (c == 't' && !in_command_invocation())
|
||||||
|
sScreen.paging_timeout = true;
|
||||||
|
|
||||||
// remove on screen text again
|
// remove on screen text again
|
||||||
sModule->fill_glyph(sScreen.columns - length, sScreen.y, length,
|
sModule->fill_glyph(sScreen.columns - length, sScreen.y, length,
|
||||||
1, ' ', sScreen.attr);
|
1, ' ', sScreen.attr);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (sScreen.y == sScreen.rows - 1) {
|
if (sScreen.y == sScreen.rows - 1) {
|
||||||
sScreen.y = 0;
|
sScreen.y = 0;
|
||||||
sModule->fill_glyph(0, 0, sScreen.columns, 2, ' ', sScreen.attr);
|
sModule->fill_glyph(0, 0, sScreen.columns, 2, ' ', sScreen.attr);
|
||||||
@@ -580,6 +587,7 @@ blue_screen_init(void)
|
|||||||
|
|
||||||
sModule = &gFrameBufferConsoleModule;
|
sModule = &gFrameBufferConsoleModule;
|
||||||
sScreen.paging = true;
|
sScreen.paging = true;
|
||||||
|
sScreen.paging_timeout = false;
|
||||||
|
|
||||||
add_debugger_command("paging", set_paging, "Enable or disable paging");
|
add_debugger_command("paging", set_paging, "Enable or disable paging");
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user