comparison src/video/svga/SDL_svgavideo.c @ 226:bb72c418a1f9

Disabled virtual terminal check for SVGAlib video
author Sam Lantinga <slouken@libsdl.org>
date Fri, 02 Nov 2001 22:41:32 +0000
parents 13161d3d349d
children e8157fcb3114
comparison
equal deleted inserted replaced
225:2d1753bc178a 226:bb72c418a1f9
84 /* SVGALib 1.9.x+ doesn't require root (via /dev/svga) */ 84 /* SVGALib 1.9.x+ doesn't require root (via /dev/svga) */
85 int svgalib2 = -1; 85 int svgalib2 = -1;
86 86
87 /* See if we are connected to a virtual terminal */ 87 /* See if we are connected to a virtual terminal */
88 console = STDIN_FILENO; 88 console = STDIN_FILENO;
89 #if 0 /* This is no longer needed, SVGAlib can switch consoles for us */
89 if ( console >= 0 ) { 90 if ( console >= 0 ) {
90 struct stat sb; 91 struct stat sb;
91 struct vt_mode dummy; 92 struct vt_mode dummy;
92 93
93 if ( (fstat(console, &sb) < 0) || 94 if ( (fstat(console, &sb) < 0) ||
94 (ioctl(console, VT_GETMODE, &dummy) < 0) ) { 95 (ioctl(console, VT_GETMODE, &dummy) < 0) ) {
95 console = -1; 96 console = -1;
96 } 97 }
97 } 98 }
99 #endif /* 0 */
98 100
99 /* See if SVGAlib 2.0 is available */ 101 /* See if SVGAlib 2.0 is available */
100 svgalib2 = open("/dev/svga", O_RDONLY); 102 svgalib2 = open("/dev/svga", O_RDONLY);
101 if (svgalib2 != -1) { 103 if (svgalib2 != -1) {
102 close(svgalib2); 104 close(svgalib2);
223 this->info.wm_available = 0; 225 this->info.wm_available = 0;
224 this->info.hw_available = 1; 226 this->info.hw_available = 1;
225 modeinfo = vga_getmodeinfo(vga_getcurrentmode()); 227 modeinfo = vga_getmodeinfo(vga_getcurrentmode());
226 this->info.video_mem = modeinfo->memory; 228 this->info.video_mem = modeinfo->memory;
227 /* FIXME: Add hardware accelerated blit information */ 229 /* FIXME: Add hardware accelerated blit information */
228 #if 0 230 #ifdef SVGALIB_DEBUG
229 printf("Hardware accelerated blit: %savailable\n", modeinfo->haveblit ? "" : "not "); 231 printf("Hardware accelerated blit: %savailable\n", modeinfo->haveblit ? "" : "not ");
230 #endif 232 #endif
231 } 233 }
232 234
233 int SVGA_VideoInit(_THIS, SDL_PixelFormat *vformat) 235 int SVGA_VideoInit(_THIS, SDL_PixelFormat *vformat)
234 { 236 {