diff --git a/src/video/directfb/SDL_DirectFB_video.c b/src/video/directfb/SDL_DirectFB_video.c index 63d6814a0..696b5c3b1 100644 --- a/src/video/directfb/SDL_DirectFB_video.c +++ b/src/video/directfb/SDL_DirectFB_video.c @@ -191,6 +191,9 @@ static DFBEnumerationResult EnumModesCallback (int width, HIDDEN->nummodes++; + if (enumlist && enumlist->r.w == width && enumlist->r.h == height) + return DFENUM_OK; + enumrect = SDL_calloc(1, sizeof(struct DirectFBEnumRect)); if (!enumrect) {