From 6c1633b80a30c639bc096cc4b98a1da998af38c2 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 21 Jul 2017 21:10:12 +0200 Subject: changed video mode management, moved to video driver, the VGA driver registers his specific mode data with the video driver kernel function now use virtual functions of the video driver --- src/gui/window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/window.c') diff --git a/src/gui/window.c b/src/gui/window.c index fd53920..681c3b7 100644 --- a/src/gui/window.c +++ b/src/gui/window.c @@ -39,14 +39,14 @@ void window_draw( void *obj, graphics_context_t *context ) if( ((widget_t *)widget)->x < 0 ) { ((widget_t *)widget)->x = 0; } - if( ((widget_t *)widget)->x > context->mode.x - ((widget_t *)widget)->w ) { - ((widget_t *)widget)->x = context->mode.x - ((widget_t *)widget)->w; + if( ((widget_t *)widget)->x > context->mode->base.x - ((widget_t *)widget)->w ) { + ((widget_t *)widget)->x = context->mode->base.x - ((widget_t *)widget)->w; } if( ((widget_t *)widget)->y < 0 ) { ((widget_t *)widget)->y = 0; } - if( ((widget_t *)widget)->y > context->mode.y - ((widget_t *)widget)->h ) { - ((widget_t *)widget)->y = context->mode.y - ((widget_t *)widget)->h; + if( ((widget_t *)widget)->y > context->mode->base.y - ((widget_t *)widget)->h ) { + ((widget_t *)widget)->y = context->mode->base.y - ((widget_t *)widget)->h; } composite_widget_draw( obj, context ); -- cgit v1.2.3-54-g00ecf