src/video/ipod/SDL_ipodvideo.c
changeset 2735 204be4fc2726
parent 1895 c121d94672cb
child 2859 99210400e8b9
     1.1 --- a/src/video/ipod/SDL_ipodvideo.c	Wed Aug 27 13:37:19 2008 +0000
     1.2 +++ b/src/video/ipod/SDL_ipodvideo.c	Wed Aug 27 15:10:03 2008 +0000
     1.3 @@ -526,8 +526,7 @@
     1.4          }
     1.5          if (dbgout)
     1.6              fprintf(dbgout, "\n");
     1.7 -    }
     1.8 -    while (posted);
     1.9 +    } while (posted);
    1.10  }
    1.11  
    1.12  // enough space for 160x128x2
    1.13 @@ -570,8 +569,7 @@
    1.14          do {
    1.15              if ((inl(lcd_base) & (unsigned int) 0x8000) == 0)
    1.16                  break;
    1.17 -        }
    1.18 -        while (M_timer_check(start, 1000) == 0);
    1.19 +        } while (M_timer_check(start, 1000) == 0);
    1.20      }
    1.21  }
    1.22  
    1.23 @@ -681,10 +679,10 @@
    1.24          do {
    1.25              if ((inl(0x70008A0C) & 0x80000000) == 0)
    1.26                  break;
    1.27 -        }
    1.28 -        while (C_timer_check(start, 1000) == 0);
    1.29 +        } while (C_timer_check(start, 1000) == 0);
    1.30      }
    1.31  }
    1.32 +
    1.33  static void
    1.34  C_lcd_cmd_data(int cmd, int data)
    1.35  {
    1.36 @@ -780,10 +778,12 @@
    1.37                      ipod_scr[y * (lcd_width / 4) + x / 4] |=
    1.38                          (((Uint8 *) (SDL_VideoSurface->pixels))[y *
    1.39                                                                  SDL_VideoSurface->
    1.40 -                                                                pitch
    1.41 -                                                                +
    1.42 -                                                                x] &
    1.43 -                         3) << (2 * (x % 4));
    1.44 +                                                                pitch +
    1.45 +                                                                x] & 3) << (2
    1.46 +                                                                            *
    1.47 +                                                                            (x
    1.48 +                                                                             %
    1.49 +                                                                             4));
    1.50                  }
    1.51              }
    1.52          }