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 7439f52afd324ec7
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
     1.1 --- a/src/video/SDL_video.c	Sat Jul 13 20:24:09 2013 -0400
     1.2 +++ b/src/video/SDL_video.c	Sat Jul 13 21:42:57 2013 -0400
     1.3 @@ -667,7 +667,7 @@
     1.4      modes = display->display_modes;
     1.5      nmodes = display->num_display_modes;
     1.6      for (i = nmodes; i--;) {
     1.7 -        if (SDL_memcmp(mode, &modes[i], sizeof(*mode)) == 0) {
     1.8 +        if (cmpmodes(mode, &modes[i]) == 0) {
     1.9              return SDL_FALSE;
    1.10          }
    1.11      }