Skip to content

Commit

Permalink
console server: Always activate new consoles being created.
Browse files Browse the repository at this point in the history
This is related to, but does not really fix, #45.

It was needed to resolve #102.
  • Loading branch information
perlun committed Dec 25, 2017
1 parent ee7a250 commit 726202c
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions servers/system/console/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,25 +125,22 @@ static void connection_client(message_parameter_type *message_parameter, console
(*our_application)->ipc_structure.input_mailbox_id = ipc_structure->input_mailbox_id;
(*our_application)->ipc_structure.output_mailbox_id = ipc_structure->output_mailbox_id;

// Is this the first console? If so, activate it.
if (current_console == NULL)
{
current_console = *our_console;
(*our_console)->output = screen;
// Always active a new console being created, so we handle cluido being launched by the boot server.
current_console = *our_console;
(*our_console)->output = screen;

if (has_video)
if (has_video)
{
// Try to set the requested video mode.
// FIXME: Error handling and return values!
video_mode.width = console_attribute->width;
video_mode.height = console_attribute->height;
video_mode.depth = console_attribute->depth;
video_mode.mode_type = console_attribute->mode_type;

if (video_mode_set(&video_structure, &video_mode) != VIDEO_RETURN_SUCCESS)
{
// Try to set the requested video mode.
// FIXME: Error handling and return values!
video_mode.width = console_attribute->width;
video_mode.height = console_attribute->height;
video_mode.depth = console_attribute->depth;
video_mode.mode_type = console_attribute->mode_type;

if (video_mode_set(&video_structure, &video_mode) != VIDEO_RETURN_SUCCESS)
{
// FIXME: Fail and return here.
}
// FIXME: Fail and return here.
}
}

Expand Down

0 comments on commit 726202c

Please sign in to comment.