src/video/qtopia/SDL_QWin.cc
branchSDL-1.3
changeset 1663 11775724e3fe
parent 1662 782fd950bd46
child 1664 cd3db072ba8a
     1.1 --- a/src/video/qtopia/SDL_QWin.cc	Sun May 28 13:04:16 2006 +0000
     1.2 +++ b/src/video/qtopia/SDL_QWin.cc	Sun May 28 13:29:03 2006 +0000
     1.3 @@ -265,24 +265,19 @@
     1.4  }
     1.5  
     1.6  // desktop, SL-A300 etc
     1.7 -bool SDL_QWin::repaintRotation0 (const QRect & rect)
     1.8 +bool
     1.9 +SDL_QWin::repaintRotation0 (const QRect & rect)
    1.10  {
    1.11      if (my_image->width () == width ()) {
    1.12 -        uchar *
    1.13 -            fb = (uchar *) my_painter->frameBuffer ();
    1.14 -        uchar *
    1.15 -            buf = (uchar *) my_image->bits ();
    1.16 +        uchar *fb = (uchar *) my_painter->frameBuffer ();
    1.17 +        uchar *buf = (uchar *) my_image->bits ();
    1.18          if (rect == my_image->rect ()) {
    1.19              SDL_memcpy (fb, buf, width () * height () * 2);
    1.20          } else {
    1.21 -            int
    1.22 -                h = rect.height ();
    1.23 -            int
    1.24 -                wd = rect.width () << 1;
    1.25 -            int
    1.26 -                fblineadd = my_painter->lineStep ();
    1.27 -            int
    1.28 -                buflineadd = my_image->bytesPerLine ();
    1.29 +            int h = rect.height ();
    1.30 +            int wd = rect.width () << 1;
    1.31 +            int fblineadd = my_painter->lineStep ();
    1.32 +            int buflineadd = my_image->bytesPerLine ();
    1.33              fb += (rect.left () << 1) + rect.top () * my_painter->lineStep ();
    1.34              buf +=
    1.35                  (rect.left () << 1) + rect.top () * my_image->bytesPerLine ();
    1.36 @@ -303,32 +298,25 @@
    1.37  
    1.38  
    1.39  // Sharp Zaurus SL-5500 etc 
    1.40 -bool SDL_QWin::repaintRotation3 (const QRect & rect)
    1.41 +bool
    1.42 +SDL_QWin::repaintRotation3 (const QRect & rect)
    1.43  {
    1.44      if (my_image->width () == width ()) {
    1.45 -        ushort *
    1.46 -            fb = (ushort *) my_painter->frameBuffer ();
    1.47 -        ushort *
    1.48 -            buf = (ushort *) my_image->bits ();
    1.49 +        ushort *fb = (ushort *) my_painter->frameBuffer ();
    1.50 +        ushort *buf = (ushort *) my_image->bits ();
    1.51          gs_fastRotateBlit_3 (fb, buf, rect);
    1.52      } else {
    1.53          // landscape mode
    1.54          if (screenRotation == SDL_QT_ROTATION_90) {
    1.55 -            uchar *
    1.56 -                fb = (uchar *) my_painter->frameBuffer ();
    1.57 -            uchar *
    1.58 -                buf = (uchar *) my_image->bits ();
    1.59 +            uchar *fb = (uchar *) my_painter->frameBuffer ();
    1.60 +            uchar *buf = (uchar *) my_image->bits ();
    1.61              if (rect == my_image->rect ()) {
    1.62                  SDL_memcpy (fb, buf, width () * height () * 2);
    1.63              } else {
    1.64 -                int
    1.65 -                    h = rect.height ();
    1.66 -                int
    1.67 -                    wd = rect.width () << 1;
    1.68 -                int
    1.69 -                    fblineadd = my_painter->lineStep ();
    1.70 -                int
    1.71 -                    buflineadd = my_image->bytesPerLine ();
    1.72 +                int h = rect.height ();
    1.73 +                int wd = rect.width () << 1;
    1.74 +                int fblineadd = my_painter->lineStep ();
    1.75 +                int buflineadd = my_image->bytesPerLine ();
    1.76                  fb +=
    1.77                      (rect.left () << 1) +
    1.78                      rect.top () * my_painter->lineStep ();
    1.79 @@ -342,21 +330,14 @@
    1.80                  }
    1.81              }
    1.82          } else if (screenRotation == SDL_QT_ROTATION_270) {
    1.83 -            int
    1.84 -                h = rect.height ();
    1.85 -            int
    1.86 -                wd = rect.width ();
    1.87 -            int
    1.88 -                fblineadd = my_painter->lineStep () - (rect.width () << 1);
    1.89 -            int
    1.90 -                buflineadd = my_image->bytesPerLine () - (rect.width () << 1);
    1.91 -            int
    1.92 -                w;
    1.93 +            int h = rect.height ();
    1.94 +            int wd = rect.width ();
    1.95 +            int fblineadd = my_painter->lineStep () - (rect.width () << 1);
    1.96 +            int buflineadd = my_image->bytesPerLine () - (rect.width () << 1);
    1.97 +            int w;
    1.98  
    1.99 -            uchar *
   1.100 -                fb = (uchar *) my_painter->frameBuffer ();
   1.101 -            uchar *
   1.102 -                buf = (uchar *) my_image->bits ();
   1.103 +            uchar *fb = (uchar *) my_painter->frameBuffer ();
   1.104 +            uchar *buf = (uchar *) my_image->bits ();
   1.105  
   1.106              fb +=
   1.107                  ((my_painter->width () -
   1.108 @@ -384,13 +365,12 @@
   1.109  }
   1.110  
   1.111  // ipaq 3800...
   1.112 -bool SDL_QWin::repaintRotation1 (const QRect & rect)
   1.113 +bool
   1.114 +SDL_QWin::repaintRotation1 (const QRect & rect)
   1.115  {
   1.116      if (my_image->width () == width ()) {
   1.117 -        ushort *
   1.118 -            fb = (ushort *) my_painter->frameBuffer ();
   1.119 -        ushort *
   1.120 -            buf = (ushort *) my_image->bits ();
   1.121 +        ushort *fb = (ushort *) my_painter->frameBuffer ();
   1.122 +        ushort *buf = (ushort *) my_image->bits ();
   1.123          gs_fastRotateBlit_1 (fb, buf, rect);
   1.124      } else {
   1.125          return false;           // FIXME: landscape mode
   1.126 @@ -680,7 +660,8 @@
   1.127      }
   1.128  }
   1.129  
   1.130 -bool SDL_QWin::lockScreen (bool force)
   1.131 +bool
   1.132 +SDL_QWin::lockScreen (bool force)
   1.133  {
   1.134      if (!my_painter) {
   1.135          if (force || (isVisible () && isActiveWindow ())) {