Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Don't use SDL_memcmp() on modes to check if they've already been added.
Browse files Browse the repository at this point in the history
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 fa705d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/SDL_video.c
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit fa705d5

Please sign in to comment.