Don't use SDL_memcmp() on modes to check if they've already been added.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 13 Jul 2013 21:42:57 -0400
changeset 7439 f52afd324ec7
parent 7438 97c35b3811d1
child 7440 9817477202d1
Don't use SDL_memcmp() on modes to check if they've already been added. They might have different driverdata values and thus not match. Fixes Bugzilla #1407.
src/video/SDL_video.c
--- a/src/video/SDL_video.c	Sat Jul 13 20:24:09 2013 -0400
+++ b/src/video/SDL_video.c	Sat Jul 13 21:42:57 2013 -0400
@@ -667,7 +667,7 @@
     modes = display->display_modes;
     nmodes = display->num_display_modes;
     for (i = nmodes; i--;) {
-        if (SDL_memcmp(mode, &modes[i], sizeof(*mode)) == 0) {
+        if (cmpmodes(mode, &modes[i]) == 0) {
             return SDL_FALSE;
         }
     }