src/video/windows/SDL_windowsmodes.c
changeset 7102 b9fa5a2acbfd
parent 7037 3fedf1f25b94
child 8086 b744b3f8754b
equal deleted inserted replaced
7101:ea2e8eb622e1 7102:b9fa5a2acbfd
   243         if (!WIN_GetDisplayMode(data->DeviceName, i, &mode)) {
   243         if (!WIN_GetDisplayMode(data->DeviceName, i, &mode)) {
   244             break;
   244             break;
   245         }
   245         }
   246         if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) {
   246         if (SDL_ISPIXELFORMAT_INDEXED(mode.format)) {
   247             /* We don't support palettized modes now */
   247             /* We don't support palettized modes now */
       
   248             SDL_free(mode.driverdata);
   248             continue;
   249             continue;
   249         }
   250         }
   250         if (mode.format != SDL_PIXELFORMAT_UNKNOWN) {
   251         if (mode.format != SDL_PIXELFORMAT_UNKNOWN) {
   251             if (!SDL_AddDisplayMode(display, &mode)) {
   252             if (!SDL_AddDisplayMode(display, &mode)) {
   252                 SDL_free(mode.driverdata);
   253                 SDL_free(mode.driverdata);
   253             }
   254             }
       
   255         }
       
   256         else {
       
   257             SDL_free(mode.driverdata);
   254         }
   258         }
   255     }
   259     }
   256 }
   260 }
   257 
   261 
   258 int
   262 int