comparison src/SDL_compat.c @ 4729:1f7ad083fd3c

Merged Paul's Google Summer of Code work from SDL-gsoc2010_android
author Sam Lantinga <slouken@libsdl.org>
date Sun, 22 Aug 2010 12:23:55 -0700
parents 791b3256fb22 d40bb3165d2b
children 833a225613e2
comparison
equal deleted inserted replaced
4694:c24ba2cc9583 4729:1f7ad083fd3c
637 } 637 }
638 } 638 }
639 639
640 /* If we're in OpenGL mode, just create a stub surface and we're done! */ 640 /* If we're in OpenGL mode, just create a stub surface and we're done! */
641 if (flags & SDL_OPENGL) { 641 if (flags & SDL_OPENGL) {
642
643 printf("1\n");
644
642 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); 645 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow);
643 if (!SDL_VideoContext) { 646 if (!SDL_VideoContext) {
644 return NULL; 647 return NULL;
645 } 648 }
649
650
651 printf("2\n");
652
646 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { 653 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) {
647 return NULL; 654 return NULL;
648 } 655 }
656
657 printf("3\n");
649 SDL_VideoSurface = 658 SDL_VideoSurface =
650 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); 659 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0);
651 if (!SDL_VideoSurface) { 660 if (!SDL_VideoSurface) {
652 return NULL; 661 return NULL;
653 } 662 }
663
664 printf("4\n");
654 SDL_VideoSurface->flags |= surface_flags; 665 SDL_VideoSurface->flags |= surface_flags;
655 SDL_PublicSurface = SDL_VideoSurface; 666 SDL_PublicSurface = SDL_VideoSurface;
656 return SDL_PublicSurface; 667 return SDL_PublicSurface;
657 } 668 }
658 669