- if (this->hidden->fbdev == NULL) {
- this->hidden->fbdev = vout_fbdev_init("/dev/fb0", &width, &height, 0);
- if (this->hidden->fbdev == NULL)
- return NULL;
+ omapsdl_config_from_env(pdata);
+
+ switch (bpp) {
+ case 16:
+ format = SDL_ReallocFormat(current, 16, 0xf800, 0x07e0, 0x001f, 0);
+ break;
+ case 24:
+ format = SDL_ReallocFormat(current, 24, 0xff0000, 0xff00, 0xff, 0);
+ break;
+ case 32:
+ format = SDL_ReallocFormat(current, 32, 0xff0000, 0xff00, 0xff, 0xff000000);
+ break;
+ default:
+ err("SetVideoMode: bpp %d not supported", bpp);
+ return NULL;
+ }
+ if (format == NULL)
+ return NULL;