mirror of
https://github.com/yawut/SDL.git
synced 2026-09-14 03:56:39 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user