Mercurial > sdl-ios-xcode
comparison src/video/fbcon/SDL_fbvideo.c @ 2698:e1da92da346c gsoc2008_nds
Clean up.
author | Darren Alton <dalton@stevens.edu> |
---|---|
date | Wed, 27 Aug 2008 04:23:38 +0000 |
parents | e27bdcc80744 |
children |
comparison
equal
deleted
inserted
replaced
2697:c9121b04cffa | 2698:e1da92da346c |
---|---|
80 {0, 0, 640, 400}, /* 8 bpp: 0x100, or 256 */ | 80 {0, 0, 640, 400}, /* 8 bpp: 0x100, or 256 */ |
81 {0, 0, 512, 384}, | 81 {0, 0, 512, 384}, |
82 {0, 0, 320, 240}, | 82 {0, 0, 320, 240}, |
83 {0, 0, 320, 200} | 83 {0, 0, 320, 200} |
84 }; | 84 }; |
85 | |
85 static const struct | 86 static const struct |
86 { | 87 { |
87 int xres; | 88 int xres; |
88 int yres; | 89 int yres; |
89 int pixclock; | 90 int pixclock; |
820 fprintf(stderr, "\tblue: %d/%d\n", vinfo->blue.length, | 821 fprintf(stderr, "\tblue: %d/%d\n", vinfo->blue.length, |
821 vinfo->blue.offset); | 822 vinfo->blue.offset); |
822 fprintf(stderr, "\talpha: %d/%d\n", vinfo->transp.length, | 823 fprintf(stderr, "\talpha: %d/%d\n", vinfo->transp.length, |
823 vinfo->transp.offset); | 824 vinfo->transp.offset); |
824 } | 825 } |
826 | |
825 static void | 827 static void |
826 print_finfo(struct fb_fix_screeninfo *finfo) | 828 print_finfo(struct fb_fix_screeninfo *finfo) |
827 { | 829 { |
828 fprintf(stderr, "Printing finfo:\n"); | 830 fprintf(stderr, "Printing finfo:\n"); |
829 fprintf(stderr, "\tsmem_start = %p\n", (char *) finfo->smem_start); | 831 fprintf(stderr, "\tsmem_start = %p\n", (char *) finfo->smem_start); |
1187 surfaces.size = (unsigned int) ((long) base - (long) surfaces.base); | 1189 surfaces.size = (unsigned int) ((long) base - (long) surfaces.base); |
1188 surfaces.next = bucket; | 1190 surfaces.next = bucket; |
1189 screen->hwdata = (struct private_hwdata *) &surfaces; | 1191 screen->hwdata = (struct private_hwdata *) &surfaces; |
1190 return (0); | 1192 return (0); |
1191 } | 1193 } |
1194 | |
1192 static void | 1195 static void |
1193 FB_FreeHWSurfaces(_THIS) | 1196 FB_FreeHWSurfaces(_THIS) |
1194 { | 1197 { |
1195 vidmem_bucket *bucket, *freeable; | 1198 vidmem_bucket *bucket, *freeable; |
1196 | 1199 |
1277 surface->flags |= SDL_HWSURFACE; | 1280 surface->flags |= SDL_HWSURFACE; |
1278 surface->pixels = bucket->base; | 1281 surface->pixels = bucket->base; |
1279 surface->hwdata = (struct private_hwdata *) bucket; | 1282 surface->hwdata = (struct private_hwdata *) bucket; |
1280 return (0); | 1283 return (0); |
1281 } | 1284 } |
1285 | |
1282 static void | 1286 static void |
1283 FB_FreeHWSurface(_THIS, SDL_Surface * surface) | 1287 FB_FreeHWSurface(_THIS, SDL_Surface * surface) |
1284 { | 1288 { |
1285 vidmem_bucket *bucket, *freeable; | 1289 vidmem_bucket *bucket, *freeable; |
1286 | 1290 |
1346 FB_WaitBusySurfaces(this); | 1350 FB_WaitBusySurfaces(this); |
1347 } | 1351 } |
1348 } | 1352 } |
1349 return (0); | 1353 return (0); |
1350 } | 1354 } |
1355 | |
1351 static void | 1356 static void |
1352 FB_UnlockHWSurface(_THIS, SDL_Surface * surface) | 1357 FB_UnlockHWSurface(_THIS, SDL_Surface * surface) |
1353 { | 1358 { |
1354 if (surface == this->screen) { | 1359 if (surface == this->screen) { |
1355 SDL_mutexV(hw_lock); | 1360 SDL_mutexV(hw_lock); |