new haa tests
[sdlhildon] / sdlhaa / test / fullscreen.c
index 4511096..8fc660b 100644 (file)
@@ -13,8 +13,6 @@
 #include <SDL.h>
 #include <SDL_haa.h>
 
-static bool fullscreen = false;
-
 static SDL_Surface *screen;
 
 static HAA_Actor *actor;
@@ -32,15 +30,6 @@ static Uint32 tick(Uint32 interval, void* param)
        return interval;
 }
 
-static void setup_video_mode()
-{
-       unsigned flags = SDL_SWSURFACE | (fullscreen ? SDL_FULLSCREEN : 0);
-       printf("video mode ...\n");
-       screen = SDL_SetVideoMode(0, 0, 16, flags);
-       assert(screen);
-       printf("video mode set\n");
-}
-
 int main()
 {
        int res;
@@ -50,7 +39,8 @@ int main()
        res = HAA_Init(0);
        assert(res == 0);
        
-       setup_video_mode();
+       screen = SDL_SetVideoMode(0, 0, 16, SDL_SWSURFACE | SDL_FULLSCREEN);
+       assert(screen);
        
        SDL_TimerID timer = SDL_AddTimer(10, tick, NULL);
        assert(timer != NULL);
@@ -71,15 +61,10 @@ int main()
                        case SDL_QUIT:
                                goto quit;
                        case SDL_VIDEOEXPOSE:
-                               //HAA_SetRotation(actor, HAA_Y_AXIS, degrees, 0, 0, 0);
+                               HAA_SetRotation(actor, HAA_Y_AXIS, degrees, 0, 0, 0);
                                res = HAA_Flip(actor);
                                assert(res == 0);
                                break;
-                       case SDL_MOUSEBUTTONUP:
-                               printf("Switching fullscreen\n");
-                               fullscreen = !fullscreen;
-                               setup_video_mode();
-                               break;
                }
        }
 
@@ -91,3 +76,4 @@ quit:
 
        return 0;
 }
+