test/testcursor.c
changeset 5405 64fa8526e1ce
parent 3111 14d32495a502
child 5420 180640c1ae53
--- a/test/testcursor.c	Sun Feb 27 21:17:06 2011 -0800
+++ b/test/testcursor.c	Sun Feb 27 21:36:23 2011 -0800
@@ -147,7 +147,7 @@
 {
     SDL_Surface *screen;
     SDL_bool quit = SDL_FALSE, first_time = SDL_TRUE;
-    SDL_Cursor *cursor[3];
+    SDL_Cursor *cursor[4];
     int current;
 
     /* Load the SDL library */
@@ -189,6 +189,7 @@
         SDL_Quit();
         return (1);
     }
+    cursor[3] = SDL_GetCursor();
 
     current = 0;
     SDL_SetCursor(cursor[current]);
@@ -198,7 +199,7 @@
         while (SDL_PollEvent(&event)) {
             switch (event.type) {
             case SDL_MOUSEBUTTONDOWN:
-                current = (current + 1) % 3;
+                current = (current + 1) % SDL_arraysize(cursor);
                 SDL_SetCursor(cursor[current]);
                 break;
             case SDL_KEYDOWN:
@@ -222,3 +223,5 @@
     SDL_Quit();
     return (0);
 }
+
+/* vi: set ts=4 sw=4 expandtab: */