Commits

Anonymous committed dc2c602

Fixed keyword arguments in sdl.video.set_mode().

  • Participants
  • Parent commits 1d9c216
  • Branches pgreloaded

Comments (0)

Files changed (2)

File src/sdl/videomod.c

     PyObject *sf;
 
     static char *kwlist[] = { "width", "height", "bpp", "flags", NULL };
+    static char *kwlist2[] = { "size", "bpp", "flags", NULL };
     
     /* Not necessary usually. SDL_SetVideoMode() seems to do that
      * implicitly for recent versions of SDL. Though we'll force users
     {
         PyObject *size;
         PyErr_Clear ();
-        if (!PyArg_ParseTuple (args, "O|il:set_mode", &size, &bpp, &flags))
+        if (!PyArg_ParseTupleAndKeywords (args, kwds, "O|il:set_mode", kwlist2,
+                &size, &bpp, &flags))
             return NULL;
         if (!SizeFromObject (size, (pgint32*)&width, (pgint32*)&height))
             return NULL;

File test/sdl_video_surface_test.py

         for bitsize, dx, dy in scrolls:
             if bitsize == 8:
                 masks = (0xFF >> 6 << 5, 0xFF >> 5 << 2, 0xFF >> 6, 0)
-                surf = video.Surface((10, 10), bitsize)
+                surf = video.Surface((10, 10), bitsize, masks=masks)
             else:
                 surf = video.Surface((10, 10), bitsize)
             surf.fill(Color(255, 0, 0))