src/video/os2fslib/SDL_os2fslib.c
changeset 3011 8f4ed5ec2b06
parent 2859 99210400e8b9
child 3013 8cc00819c8d6
     1.1 --- a/src/video/os2fslib/SDL_os2fslib.c	Fri Jan 09 20:41:31 2009 +0000
     1.2 +++ b/src/video/os2fslib/SDL_os2fslib.c	Fri Jan 09 20:43:30 2009 +0000
     1.3 @@ -440,8 +440,8 @@
     1.4                      if ((!pVideo->hidden->pSDLSurface) ||
     1.5                          ((pVideo->hidden->pSDLSurface)
     1.6                           &&
     1.7 -                         ((pVideo->hidden->
     1.8 -                           pSDLSurface->flags & SDL_RESIZABLE) == 0)))
     1.9 +                         ((pVideo->hidden->pSDLSurface->
    1.10 +                           flags & SDL_RESIZABLE) == 0)))
    1.11                          FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd));
    1.12  #ifdef DEBUG_BUILD
    1.13                      else
    1.14 @@ -690,15 +690,15 @@
    1.15                              WinQueryWindowPos(hwnd, &swp);
    1.16                              if ((!pVideo->hidden->pSDLSurface) ||
    1.17                                  ((pVideo->hidden->pSDLSurface) &&
    1.18 -                                 (pVideo->hidden->
    1.19 -                                  pSDLSurface->flags & SDL_RESIZABLE)
    1.20 +                                 (pVideo->hidden->pSDLSurface->
    1.21 +                                  flags & SDL_RESIZABLE)
    1.22                                   &&
    1.23                                   ((swp.cx !=
    1.24 -                                   pVideo->hidden->
    1.25 -                                   SrcBufferDesc.uiXResolution)
    1.26 +                                   pVideo->hidden->SrcBufferDesc.
    1.27 +                                   uiXResolution)
    1.28                                    || (swp.cy !=
    1.29 -                                      pVideo->hidden->SrcBufferDesc.
    1.30 -                                      uiYResolution))
    1.31 +                                      pVideo->hidden->
    1.32 +                                      SrcBufferDesc.uiYResolution))
    1.33                                   && (!FSLib_QueryFSMode(hwnd)))) {
    1.34                                  // Resizable surface and in resizing!
    1.35                                  // So, don't blit now!
    1.36 @@ -717,10 +717,10 @@
    1.37                                  FSLIB_BITBLT(hwnd,
    1.38                                               pVideo->hidden->pchSrcBuffer, 0,
    1.39                                               0,
    1.40 +                                             pVideo->hidden->SrcBufferDesc.
    1.41 +                                             uiXResolution,
    1.42                                               pVideo->hidden->
    1.43 -                                             SrcBufferDesc.uiXResolution,
    1.44 -                                             pVideo->hidden->SrcBufferDesc.
    1.45 -                                             uiYResolution);
    1.46 +                                             SrcBufferDesc.uiYResolution);
    1.47                              }
    1.48                          }
    1.49  #ifdef DEBUG_BUILD
    1.50 @@ -2503,26 +2503,21 @@
    1.51                                         pModeInfoFound->uiXResolution,
    1.52                                         pModeInfoFound->uiYResolution,
    1.53                                         pModeInfoFound->uiBPP, ((unsigned int)
    1.54 -                                                               pModeInfoFound->
    1.55 -                                                               PixelFormat.
    1.56 -                                                               ucRedMask)
    1.57 -                                       << pModeInfoFound->PixelFormat.
    1.58 -                                       ucRedPosition, ((unsigned int)
    1.59 -                                                       pModeInfoFound->
    1.60 -                                                       PixelFormat.
    1.61 -                                                       ucGreenMask)
    1.62 -                                       << pModeInfoFound->PixelFormat.
    1.63 -                                       ucGreenPosition, ((unsigned int)
    1.64 -                                                         pModeInfoFound->
    1.65 -                                                         PixelFormat.
    1.66 -                                                         ucBlueMask)
    1.67 -                                       << pModeInfoFound->PixelFormat.
    1.68 -                                       ucBluePosition, ((unsigned int)
    1.69 -                                                        pModeInfoFound->
    1.70 -                                                        PixelFormat.
    1.71 -                                                        ucAlphaMask)
    1.72 -                                       << pModeInfoFound->PixelFormat.
    1.73 -                                       ucAlphaPosition);
    1.74 +                                                               pModeInfoFound->PixelFormat.ucRedMask)
    1.75 +                                       << pModeInfoFound->
    1.76 +                                       PixelFormat.ucRedPosition,
    1.77 +                                       ((unsigned int)
    1.78 +                                        pModeInfoFound->PixelFormat.ucGreenMask)
    1.79 +                                       << pModeInfoFound->
    1.80 +                                       PixelFormat.ucGreenPosition,
    1.81 +                                       ((unsigned int)
    1.82 +                                        pModeInfoFound->PixelFormat.ucBlueMask)
    1.83 +                                       << pModeInfoFound->
    1.84 +                                       PixelFormat.ucBluePosition,
    1.85 +                                       ((unsigned int)
    1.86 +                                        pModeInfoFound->PixelFormat.ucAlphaMask)
    1.87 +                                       << pModeInfoFound->
    1.88 +                                       PixelFormat.ucAlphaPosition);
    1.89  
    1.90          if (pResult == NULL) {
    1.91              DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer);
    1.92 @@ -2536,27 +2531,23 @@
    1.93  
    1.94          // Adjust pixel format mask!
    1.95          pResult->format->Rmask =
    1.96 -            ((unsigned int) pModeInfoFound->
    1.97 -             PixelFormat.ucRedMask) << pModeInfoFound->PixelFormat.
    1.98 -            ucRedPosition;
    1.99 +            ((unsigned int) pModeInfoFound->PixelFormat.
   1.100 +             ucRedMask) << pModeInfoFound->PixelFormat.ucRedPosition;
   1.101          pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition;
   1.102          pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust;
   1.103          pResult->format->Gmask =
   1.104 -            ((unsigned int) pModeInfoFound->
   1.105 -             PixelFormat.ucGreenMask) << pModeInfoFound->PixelFormat.
   1.106 -            ucGreenPosition;
   1.107 +            ((unsigned int) pModeInfoFound->PixelFormat.
   1.108 +             ucGreenMask) << pModeInfoFound->PixelFormat.ucGreenPosition;
   1.109          pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition;
   1.110          pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust;
   1.111          pResult->format->Bmask =
   1.112 -            ((unsigned int) pModeInfoFound->
   1.113 -             PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat.
   1.114 -            ucBluePosition;
   1.115 +            ((unsigned int) pModeInfoFound->PixelFormat.
   1.116 +             ucBlueMask) << pModeInfoFound->PixelFormat.ucBluePosition;
   1.117          pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition;
   1.118          pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust;
   1.119          pResult->format->Amask =
   1.120 -            ((unsigned int) pModeInfoFound->
   1.121 -             PixelFormat.ucAlphaMask) << pModeInfoFound->PixelFormat.
   1.122 -            ucAlphaPosition;
   1.123 +            ((unsigned int) pModeInfoFound->PixelFormat.
   1.124 +             ucAlphaMask) << pModeInfoFound->PixelFormat.ucAlphaPosition;
   1.125          pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition;
   1.126          pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust;
   1.127  
   1.128 @@ -2815,25 +2806,23 @@
   1.129      vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8;
   1.130  
   1.131      vformat->Rmask =
   1.132 -        ((unsigned int) pDesktopMode->PixelFormat.
   1.133 -         ucRedMask) << pDesktopMode->PixelFormat.ucRedPosition;
   1.134 +        ((unsigned int) pDesktopMode->PixelFormat.ucRedMask) << pDesktopMode->
   1.135 +        PixelFormat.ucRedPosition;
   1.136      vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition;
   1.137      vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust;
   1.138      vformat->Gmask =
   1.139 -        ((unsigned int) pDesktopMode->
   1.140 -         PixelFormat.ucGreenMask) << pDesktopMode->PixelFormat.
   1.141 -        ucGreenPosition;
   1.142 +        ((unsigned int) pDesktopMode->PixelFormat.
   1.143 +         ucGreenMask) << pDesktopMode->PixelFormat.ucGreenPosition;
   1.144      vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition;
   1.145      vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust;
   1.146      vformat->Bmask =
   1.147 -        ((unsigned int) pDesktopMode->
   1.148 -         PixelFormat.ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
   1.149 +        ((unsigned int) pDesktopMode->PixelFormat.
   1.150 +         ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
   1.151      vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition;
   1.152      vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust;
   1.153      vformat->Amask =
   1.154 -        ((unsigned int) pDesktopMode->
   1.155 -         PixelFormat.ucAlphaMask) << pDesktopMode->PixelFormat.
   1.156 -        ucAlphaPosition;
   1.157 +        ((unsigned int) pDesktopMode->PixelFormat.
   1.158 +         ucAlphaMask) << pDesktopMode->PixelFormat.ucAlphaPosition;
   1.159      vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition;
   1.160      vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust;
   1.161  
   1.162 @@ -2938,10 +2927,10 @@
   1.163                 sizeof(_this->hidden->SrcBufferDesc));
   1.164      // Allocate new video buffer!
   1.165      _this->hidden->pchSrcBuffer =
   1.166 -        (char *) SDL_malloc(_this->hidden->
   1.167 -                            pAvailableFSLibVideoModes->uiScanLineSize *
   1.168 -                            _this->hidden->
   1.169 -                            pAvailableFSLibVideoModes->uiYResolution);
   1.170 +        (char *) SDL_malloc(_this->hidden->pAvailableFSLibVideoModes->
   1.171 +                            uiScanLineSize *
   1.172 +                            _this->hidden->pAvailableFSLibVideoModes->
   1.173 +                            uiYResolution);
   1.174      if (!_this->hidden->pchSrcBuffer) {
   1.175  #ifdef DEBUG_BUILD
   1.176          printf