Mercurial > sdl-ios-xcode
comparison src/SDL_compat.c @ 4762:833a225613e2
Cleanup from the Android commit
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 22 Aug 2010 12:35:34 -0700 |
parents | 1f7ad083fd3c |
children | 518d1679d2d0 |
comparison
equal
deleted
inserted
replaced
4729:1f7ad083fd3c | 4762:833a225613e2 |
---|---|
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 | |
645 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); | 642 SDL_VideoContext = SDL_GL_CreateContext(SDL_VideoWindow); |
646 if (!SDL_VideoContext) { | 643 if (!SDL_VideoContext) { |
647 return NULL; | 644 return NULL; |
648 } | 645 } |
649 | |
650 | |
651 printf("2\n"); | |
652 | |
653 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { | 646 if (SDL_GL_MakeCurrent(SDL_VideoWindow, SDL_VideoContext) < 0) { |
654 return NULL; | 647 return NULL; |
655 } | 648 } |
656 | |
657 printf("3\n"); | |
658 SDL_VideoSurface = | 649 SDL_VideoSurface = |
659 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); | 650 SDL_CreateRGBSurfaceFrom(NULL, width, height, bpp, 0, 0, 0, 0, 0); |
660 if (!SDL_VideoSurface) { | 651 if (!SDL_VideoSurface) { |
661 return NULL; | 652 return NULL; |
662 } | 653 } |
663 | |
664 printf("4\n"); | |
665 SDL_VideoSurface->flags |= surface_flags; | 654 SDL_VideoSurface->flags |= surface_flags; |
666 SDL_PublicSurface = SDL_VideoSurface; | 655 SDL_PublicSurface = SDL_VideoSurface; |
667 return SDL_PublicSurface; | 656 return SDL_PublicSurface; |
668 } | 657 } |
669 | 658 |