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.
This commit is contained in:
parent
7f4744bf03
commit
0df5b7f912
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue