 +SDL_Surface *NACL_SetVideoMode(_THIS, SDL_Surface *current,
 +    int width, int height, int bpp, Uint32 flags) {
 +
-+  fprintf(stderr, "SDL: setvideomode %d %d %d %u\n", width, height, bpp, flags);
++  fprintf(stderr, "SDL: setvideomode %dx%d bpp=%d opengl=%d flags=%u\n",
++          width, height, bpp, flags & SDL_OPENGL ? 1 : 0, flags);
 +  fflush(stderr);
 +
 +  if (width > _this->hidden->ow || height > _this->hidden->oh)

+
+  /* Initialize all variables that we clean on shutdown */
+  device = (SDL_VideoDevice *)SDL_malloc(sizeof(SDL_VideoDevice));
+  if ( device ) {
+    SDL_memset(device, 0, (sizeof *device));
+    device->hidden = (struct SDL_PrivateVideoData *)
+        SDL_malloc((sizeof *device->hidden));
+  }
+  if ( (device == NULL) || (device->hidden == NULL) ) {
+    SDL_OutOfMemory();
+    if ( device ) {
+      SDL_free(device);
+    }
+    return(0);
+  }
+  SDL_memset(device->hidden, 0, (sizeof *device->hidden));
+

+                ;;
+        esac
+        MATHLIB="-lm"
+        SYS_GL_LIBS=""
+        ;;
     *)
         EXE=""
