comparison src/video/fbcon/SDL_fbvideo.c @ 1837:6987e947c77a

Date: Mon, 15 May 2006 17:18:34 +0300 From: Vassilis Virvilis Subject: Re: [SDL] SDL + fbcon = weird colors (resolved) > I am getting weird colors in 16/32 bpp in an VIA custom > board with savagefb and in qemu (cirrusfb). Ok looks that nowadays if you follow compiler warnings closely all bugs will be resolved by you. This one was that a non void function (do_mmap) was not returning anything. I also silenced a warning since I was in janitor mode.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 16 May 2006 03:58:08 +0000
parents 49b4b8413734
children c121d94672cb 8a3a0f1179f3
comparison
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