FreeBASIC  0.91.0
io_getsize.c
Go to the documentation of this file.
1 #include "../fb.h"
2 #include "fb_private_console.h"
3 
4 FBCALL void fb_ConsoleGetSize( int *cols, int *rows )
5 {
6  if( !__fb_con.inited ) {
7  if( cols ) *cols = 80;
8  if( rows ) *rows = 24;
9  return;
10  }
11 
12  BG_LOCK( );
14  BG_UNLOCK( );
15 
16  if( cols ) *cols = __fb_con.w;
17  if( rows ) *rows = __fb_con.h;
18 }