Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information
icculus committed Jul 14, 2013
1 parent 8f59cb6 commit fa705d5735ab9cbf1bdcb6366f1e33bbc0e4eb29
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/video/SDL_video.c
@@ -667,7 +667,7 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode)
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;
}
}

0 comments on commit fa705d5

Please sign in to comment.