updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / alienblaster / alienblaster-1.1.0-fullscreen.patch
blob925b6610a1d121e0eeba4ed5de4559c585b8c055
1 diff -up alienblaster/src/video.h~ alienblaster/src/video.h
2 --- alienblaster/src/video.h~ 2007-07-22 21:34:45.000000000 +0200
3 +++ alienblaster/src/video.h 2007-07-22 21:34:45.000000000 +0200
4 @@ -36,8 +36,6 @@ public:
5 ~Video();
6 SDL_Surface *init();
8 - bool fullscreen;
9 -
10 void clearScreen();
11 void toggleFullscreen();
13 diff -up alienblaster/src/video.cc~ alienblaster/src/video.cc
14 --- alienblaster/src/video.cc~ 2007-07-22 21:33:10.000000000 +0200
15 +++ alienblaster/src/video.cc 2007-07-22 21:34:35.000000000 +0200
16 @@ -38,12 +38,11 @@ SDL_Surface *Video::init(){
17 // --------------------------------------------------
18 // SDL initialisation
19 // -----------------------------------------------------
20 - fullscreen = false;
21 if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
22 printf("Couldn't initialize SDL video subsystem: %s\n", SDL_GetError());
23 exit(1);
25 - screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF /* | SDL_FULLSCREEN */ );
26 + screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF | SDL_FULLSCREEN );
27 if (!screen) {
28 printf("Couldn't set %dx%d, %dbit video mode: %s\n", SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_GetError());
29 exit(2);
30 @@ -68,10 +67,5 @@ void Video::clearScreen() {
33 void Video::toggleFullscreen() {
34 - if ( fullscreen ) {
35 - screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF );
36 - } else {
37 - screen = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, BIT_DEPTH, SDL_DOUBLEBUF | SDL_FULLSCREEN );
38 - }
39 - fullscreen = !fullscreen;
40 + SDL_WM_ToggleFullScreen(screen);