FreeBASIC  0.91.0
dev_scrn_init.c
Go to the documentation of this file.
1 /* file device */
2 
3 #include "fb.h"
4 
6 
8 {
9  int cols;
10  DEV_SCRN_INFO *info = (DEV_SCRN_INFO*) malloc(sizeof(DEV_SCRN_INFO));
11 
12  fb_GetSize( &cols, NULL );
13  info->length = 0;
14 
15  FB_HANDLE_SCREEN->opaque = info;
16  FB_HANDLE_SCREEN->line_length = fb_GetX() - 1;
17  FB_HANDLE_SCREEN->width = cols;
18 }
19 
21 {
22  if ( FB_HANDLE_SCREEN->hooks == NULL ) {
23  FB_LOCK();
24 
25  memset(FB_HANDLE_SCREEN, 0, sizeof(*FB_HANDLE_SCREEN));
26 
30 
32 
34 
35  FB_UNLOCK();
36  }
37 }