summaryrefslogtreecommitdiff
path: root/src/kernel/kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/kernel.c')
-rw-r--r--src/kernel/kernel.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/kernel/kernel.c b/src/kernel/kernel.c
index 4f68f18..102fb69 100644
--- a/src/kernel/kernel.c
+++ b/src/kernel/kernel.c
@@ -348,7 +348,8 @@ static void switch_to_graphics_mode( global_context_t *global_context )
mouse_t *mouse = global_context->mouse;
desktop_t *desktop = &global_context->desktop;
- if( vga_set_mode( vga, vga_make_mode( VGA_MODE_TYPE_GRAPHICS, 320, 200, 8 ) ) ) {
+ video_mode_t mode = video_make_mode( VIDEO_MODE_TYPE_GRAPHICS, 320, 200, 8 );
+ if( ((video_vtable_t *)(vga->base.base.vtable))->set_mode( vga, mode ) ) {
vga_text_save( vga_text );
desktop_init( desktop, 320, 200, VGA_COLOR_BLUE );
@@ -368,13 +369,13 @@ static void switch_to_graphics_mode( global_context_t *global_context )
}
*p = '\0';
- window_init( &global_context->window3, (widget_t *)desktop, 55, 5, vga->mode.x - 65, 100, VGA_COLOR_CYAN );
+ window_init( &global_context->window3, (widget_t *)desktop, 55, 5, vga->mode->base.x - 65, 100, VGA_COLOR_CYAN );
((composite_widget_vtable_t *)global_context->desktop.base.base.vtable)->add_child( desktop, (widget_t *)&global_context->window3 );
text_widget_init( &global_context->widget3, (widget_t *)&global_context->window3, 1, 1, global_context->window3.base.base.w - 2, global_context->window3.base.base.h - 2, VGA_COLOR_RED, s );
((composite_widget_vtable_t *)global_context->window3.base.base.vtable)->add_child( (composite_widget_t *)&global_context->window3, (widget_t *)&global_context->widget3 );
- ((mouse_vtable_t *)(mouse->base.vtable))->set_resolution( mouse, vga->mode.x, vga->mode.y );
+ ((mouse_vtable_t *)(mouse->base.vtable))->set_resolution( mouse, vga->mode->base.x, vga->mode->base.y );
// enable Z buffering
vga_use_z_buffer( global_context->vga, true );
@@ -391,7 +392,8 @@ static void switch_to_text_mode( global_context_t *global_context )
vga_text_restore( vga_text );
- if( vga_set_mode( vga, vga_make_mode( VGA_MODE_TYPE_TEXT, 640, 480, 4 ) ) ) {
+ video_mode_t mode = video_make_mode( VIDEO_MODE_TYPE_TEXT, 640, 480, 4 );
+ if( ((video_vtable_t *)(vga->base.base.vtable))->set_mode( vga, mode ) ) {
vga_text_set_cursor( vga_text, vga_text->cursor_x, vga_text->cursor_y );
((mouse_vtable_t *)(mouse->base.vtable))->set_resolution( mouse, vga_text->res_x, vga_text->res_y );
global_context->mode = MODE_TEXT;