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

Commit

Permalink
Changed some for-loops to be a bit more clear.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 14, 2013
1 parent c8a6ce4 commit e32bdd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/video/SDL_video.c
Expand Up @@ -663,7 +663,7 @@ SDL_AddDisplayMode(SDL_VideoDisplay * display, const SDL_DisplayMode * mode)
/* Make sure we don't already have the mode in the list */
modes = display->display_modes;
nmodes = display->num_display_modes;
for (i = nmodes; i--;) {
for (i = 0; i < nmodes; ++i) {
if (cmpmodes(mode, &modes[i]) == 0) {
return SDL_FALSE;
}
Expand Down Expand Up @@ -2253,7 +2253,7 @@ SDL_VideoQuit(void)
}
_this->VideoQuit(_this);

for (i = _this->num_displays; i--;) {
for (i = 0; i < _this->num_displays; ++i) {
SDL_VideoDisplay *display = &_this->displays[i];
for (j = display->num_display_modes; j--;) {
if (display->display_modes[j].driverdata) {
Expand Down

0 comments on commit e32bdd3

Please sign in to comment.