- rotate boot.log per boot cycle (might be easiest to just fork/exec out to logrotate directly)
- fix error handling. In particular, ply_open_module gets it completely wrong (replies on errno instead of dlerror())
- consider moving text code from ply-window to a ply-text-buffer analog of ply-frame-buffer
-- restore text color palette on exit
+- maybe watch for VT switches and do things like restoring text color palette and stopping drawing the framebuffer
ply_window_color_t foreground_color;
ply_window_color_t background_color;
+ uint8_t original_color_palette[TEXT_PALETTE_SIZE];
uint8_t color_palette[TEXT_PALETTE_SIZE];
int number_of_text_rows;
return true;
}
+static void
+ply_window_save_color_palette (ply_window_t *window)
+{
+ memcpy (window->original_color_palette, window->color_palette,
+ TEXT_PALETTE_SIZE);
+}
+
+static void
+ply_window_restore_color_palette (ply_window_t *window)
+{
+ memcpy (window->color_palette, window->original_color_palette,
+ TEXT_PALETTE_SIZE);
+
+ ply_window_change_color_palette (window);
+}
+
bool
ply_window_open (ply_window_t *window)
{
if (!ply_window_look_up_color_palette (window))
return false;
+ ply_window_save_color_palette (window);
+
ply_window_hide_text_cursor (window);
ply_window_set_text_cursor_position (window, 0, 0);
void
ply_window_close (ply_window_t *window)
{
+ ply_window_restore_color_palette (window);
ply_window_set_text_cursor_position (window, 0, 0);
if (ply_frame_buffer_device_is_open (window->frame_buffer))