/* * ScreenInit - get screen info */ void ScreenInit( void ) { uistart(); BIOSKeyboardInit(); WindMaxHeight = LINES; WindMaxWidth = COLS; Scrn = (void *)(UIData->screen.origin); EditFlags.Color = TRUE; EditFlags.HasSystemMouse = TRUE; } /* ScreenInit */
/* * ScreenInit - get screen info */ void ScreenInit( void ) { struct _osinfo info; int rows, cols; unsigned size; unsigned seg; vi_rc rc; QNXCon = console_open( QNXConHandle, O_WRONLY ); if( QNXCon == NULL ) { // FatalError( ERR_WIND_NO_MORE_WINDOWS ); ChangeDirectory( HomeDirectory ); exit( 0 ); } if( console_size( QNXCon, QNXConsole, 0, 0, &rows, &cols ) != 0 ) { console_close( QNXCon ); FatalError( ERR_WIND_NO_MORE_WINDOWS ); } rc = BIOSKeyboardInit(); if( rc != ERR_NO_ERR ) { console_close( QNXCon ); FatalError( rc ); } EditVars.WindMaxWidth = cols; EditVars.WindMaxHeight = rows; qnx_osinfo( 0, &info ); switch( info.primary_monitor ) { case _MONITOR_PGS: case _MONITOR_CGA: case _MONITOR_PS30_COLOR: case _MONITOR_EGA_COLOR: case _MONITOR_VGA_COLOR: EditFlags.Color = TRUE; break; case _MONITOR_EGA_MONO: case _MONITOR_VGA_MONO: case _MONITOR_PS30_MONO: EditFlags.BlackAndWhite = TRUE; break; default: EditFlags.Monocolor = TRUE; break; } size = cols * rows * sizeof( char_info ); seg = qnx_segment_alloc( size ); Scrn = MK_FP( seg, 0 ); ScreenPage( 0 ); } /* ScreenInit */
/* * ScreenInit - get screen info */ void ScreenInit( void ) { if( !uistart() ) StartupError( ERR_WIND_NO_MORE_WINDOWS ); BIOSKeyboardInit(); EditVars.WindMaxHeight = LINES; EditVars.WindMaxWidth = COLS; Scrn = (void *)(UIData->screen.origin); EditFlags.Color = true; EditFlags.HasSystemMouse = true; } /* ScreenInit */