comparison src/SDL_compat.c @ 4701:d40bb3165d2b

Added (partially implemented) android video backend and associated files needed to build
author Paul Hunkin <paul@bieh.net>
date Thu, 10 Jun 2010 18:54:23 +1200
parents faa9fc8e7f67
children 1f7ad083fd3c
comparison
equal deleted inserted replaced
4700:cf23d9b8e606 4701:d40bb3165d2b
641 } 641 }
642 } 642 }
643 643
644 /* If we're in OpenGL mode, just create a stub surface and we're done! */ 644 /* If we're in OpenGL mode, just create a stub surface and we're done! */
645 if (flags & SDL_OPENGL) { 645 if (flags & SDL_OPENGL) {
646
647 printf("1\n");
648
646 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); 649 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
647 if (!SDL_VideoContext) { 650 if (!SDL_VideoContext) {
648 return NULL; 651 return NULL;
649 } 652 }
653
654
655 printf("2\n");
656
650 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { 657 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) {
651 return NULL; 658 return NULL;
652 } 659 }
660
661 printf("3\n");
653 SDL_VideoSurface = 662 SDL_VideoSurface =
654 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); 663 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0);
655 if (!SDL_VideoSurface) { 664 if (!SDL_VideoSurface) {
656 return NULL; 665 return NULL;
657 } 666 }
667
668 printf("4\n");
658 SDL_VideoSurface->flags |= surface_flags; 669 SDL_VideoSurface->flags |= surface_flags;
659 SDL_PublicSurface = SDL_VideoSurface; 670 SDL_PublicSurface = SDL_VideoSurface;
660 return SDL_PublicSurface; 671 return SDL_PublicSurface;
661 } 672 }
662 673