src/video/fbcon/SDL_fbvideo.c
changeset 1837 6987e947c77a
parent 1798 49b4b8413734
child 1895 c121d94672cb
child 3917 8a3a0f1179f3
equal deleted inserted replaced
1836:703f7268b5b1 1837:6987e947c77a
   158 	ret = mmap(start, length, prot, flags, fd, offset);
   158 	ret = mmap(start, length, prot, flags, fd, offset);
   159 	if ( ret == (char *)-1 && (flags & MAP_SHARED) ) {
   159 	if ( ret == (char *)-1 && (flags & MAP_SHARED) ) {
   160 		ret = mmap(start, length, prot,
   160 		ret = mmap(start, length, prot,
   161 		           (flags & ~MAP_SHARED) | MAP_PRIVATE, fd, offset);
   161 		           (flags & ~MAP_SHARED) | MAP_PRIVATE, fd, offset);
   162 	}
   162 	}
       
   163 	return ret;
   163 }
   164 }
   164 
   165 
   165 /* FB driver bootstrap functions */
   166 /* FB driver bootstrap functions */
   166 
   167 
   167 static int FB_Available(void)
   168 static int FB_Available(void)
   168 {
   169 {
   169 	int console;
   170 	int console = -1;
   170 	/* Added check for /fb/0 (devfs) */
   171 	/* Added check for /fb/0 (devfs) */
   171 	/* but - use environment variable first... if it fails, still check defaults */
   172 	/* but - use environment variable first... if it fails, still check defaults */
   172 	int idx = 0;
   173 	int idx = 0;
   173 	const char *SDL_fbdevs[4] = { NULL, "/dev/fb0", "/dev/fb/0", NULL };
   174 	const char *SDL_fbdevs[4] = { NULL, "/dev/fb0", "/dev/fb/0", NULL };
   174 
   175