comparison src/video/os2fslib/SDL_os2fslib.c @ 3011:8f4ed5ec2b06

I ran a global "make indent" it modified the following files.
author Bob Pendleton <bob@pendleton.com>
date Fri, 09 Jan 2009 20:43:30 +0000
parents 99210400e8b9
children 8cc00819c8d6
comparison
equal deleted inserted replaced
3010:a6694a812119 3011:8f4ed5ec2b06
438 // Only switch between fullscreen and back if it's not 438 // Only switch between fullscreen and back if it's not
439 // a resizable mode! 439 // a resizable mode!
440 if ((!pVideo->hidden->pSDLSurface) || 440 if ((!pVideo->hidden->pSDLSurface) ||
441 ((pVideo->hidden->pSDLSurface) 441 ((pVideo->hidden->pSDLSurface)
442 && 442 &&
443 ((pVideo->hidden-> 443 ((pVideo->hidden->pSDLSurface->
444 pSDLSurface->flags & SDL_RESIZABLE) == 0))) 444 flags & SDL_RESIZABLE) == 0)))
445 FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd)); 445 FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd));
446 #ifdef DEBUG_BUILD 446 #ifdef DEBUG_BUILD
447 else 447 else
448 printf(" Resizable mode, so discarding ALT+HOME!\n"); 448 printf(" Resizable mode, so discarding ALT+HOME!\n");
449 fflush(stdout); 449 fflush(stdout);
688 // the window is resizable and the source buffer size is the 688 // the window is resizable and the source buffer size is the
689 // same as the destination buffer size! 689 // same as the destination buffer size!
690 WinQueryWindowPos(hwnd, &swp); 690 WinQueryWindowPos(hwnd, &swp);
691 if ((!pVideo->hidden->pSDLSurface) || 691 if ((!pVideo->hidden->pSDLSurface) ||
692 ((pVideo->hidden->pSDLSurface) && 692 ((pVideo->hidden->pSDLSurface) &&
693 (pVideo->hidden-> 693 (pVideo->hidden->pSDLSurface->
694 pSDLSurface->flags & SDL_RESIZABLE) 694 flags & SDL_RESIZABLE)
695 && 695 &&
696 ((swp.cx != 696 ((swp.cx !=
697 pVideo->hidden-> 697 pVideo->hidden->SrcBufferDesc.
698 SrcBufferDesc.uiXResolution) 698 uiXResolution)
699 || (swp.cy != 699 || (swp.cy !=
700 pVideo->hidden->SrcBufferDesc. 700 pVideo->hidden->
701 uiYResolution)) 701 SrcBufferDesc.uiYResolution))
702 && (!FSLib_QueryFSMode(hwnd)))) { 702 && (!FSLib_QueryFSMode(hwnd)))) {
703 // Resizable surface and in resizing! 703 // Resizable surface and in resizing!
704 // So, don't blit now! 704 // So, don't blit now!
705 #ifdef DEBUG_BUILD 705 #ifdef DEBUG_BUILD
706 printf 706 printf
715 fflush(stdout); 715 fflush(stdout);
716 #endif 716 #endif
717 FSLIB_BITBLT(hwnd, 717 FSLIB_BITBLT(hwnd,
718 pVideo->hidden->pchSrcBuffer, 0, 718 pVideo->hidden->pchSrcBuffer, 0,
719 0, 719 0,
720 pVideo->hidden->SrcBufferDesc.
721 uiXResolution,
720 pVideo->hidden-> 722 pVideo->hidden->
721 SrcBufferDesc.uiXResolution, 723 SrcBufferDesc.uiYResolution);
722 pVideo->hidden->SrcBufferDesc.
723 uiYResolution);
724 } 724 }
725 } 725 }
726 #ifdef DEBUG_BUILD 726 #ifdef DEBUG_BUILD
727 else 727 else
728 printf 728 printf
2501 // Create new software surface! 2501 // Create new software surface!
2502 pResult = SDL_CreateRGBSurface(SDL_SWSURFACE, 2502 pResult = SDL_CreateRGBSurface(SDL_SWSURFACE,
2503 pModeInfoFound->uiXResolution, 2503 pModeInfoFound->uiXResolution,
2504 pModeInfoFound->uiYResolution, 2504 pModeInfoFound->uiYResolution,
2505 pModeInfoFound->uiBPP, ((unsigned int) 2505 pModeInfoFound->uiBPP, ((unsigned int)
2506 pModeInfoFound-> 2506 pModeInfoFound->PixelFormat.ucRedMask)
2507 PixelFormat. 2507 << pModeInfoFound->
2508 ucRedMask) 2508 PixelFormat.ucRedPosition,
2509 << pModeInfoFound->PixelFormat. 2509 ((unsigned int)
2510 ucRedPosition, ((unsigned int) 2510 pModeInfoFound->PixelFormat.ucGreenMask)
2511 pModeInfoFound-> 2511 << pModeInfoFound->
2512 PixelFormat. 2512 PixelFormat.ucGreenPosition,
2513 ucGreenMask) 2513 ((unsigned int)
2514 << pModeInfoFound->PixelFormat. 2514 pModeInfoFound->PixelFormat.ucBlueMask)
2515 ucGreenPosition, ((unsigned int) 2515 << pModeInfoFound->
2516 pModeInfoFound-> 2516 PixelFormat.ucBluePosition,
2517 PixelFormat. 2517 ((unsigned int)
2518 ucBlueMask) 2518 pModeInfoFound->PixelFormat.ucAlphaMask)
2519 << pModeInfoFound->PixelFormat. 2519 << pModeInfoFound->
2520 ucBluePosition, ((unsigned int) 2520 PixelFormat.ucAlphaPosition);
2521 pModeInfoFound->
2522 PixelFormat.
2523 ucAlphaMask)
2524 << pModeInfoFound->PixelFormat.
2525 ucAlphaPosition);
2526 2521
2527 if (pResult == NULL) { 2522 if (pResult == NULL) {
2528 DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer); 2523 DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer);
2529 SDL_OutOfMemory(); 2524 SDL_OutOfMemory();
2530 return NULL; 2525 return NULL;
2534 fflush(stdout); 2529 fflush(stdout);
2535 #endif 2530 #endif
2536 2531
2537 // Adjust pixel format mask! 2532 // Adjust pixel format mask!
2538 pResult->format->Rmask = 2533 pResult->format->Rmask =
2539 ((unsigned int) pModeInfoFound-> 2534 ((unsigned int) pModeInfoFound->PixelFormat.
2540 PixelFormat.ucRedMask) << pModeInfoFound->PixelFormat. 2535 ucRedMask) << pModeInfoFound->PixelFormat.ucRedPosition;
2541 ucRedPosition;
2542 pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition; 2536 pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition;
2543 pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust; 2537 pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust;
2544 pResult->format->Gmask = 2538 pResult->format->Gmask =
2545 ((unsigned int) pModeInfoFound-> 2539 ((unsigned int) pModeInfoFound->PixelFormat.
2546 PixelFormat.ucGreenMask) << pModeInfoFound->PixelFormat. 2540 ucGreenMask) << pModeInfoFound->PixelFormat.ucGreenPosition;
2547 ucGreenPosition;
2548 pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition; 2541 pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition;
2549 pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust; 2542 pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust;
2550 pResult->format->Bmask = 2543 pResult->format->Bmask =
2551 ((unsigned int) pModeInfoFound-> 2544 ((unsigned int) pModeInfoFound->PixelFormat.
2552 PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat. 2545 ucBlueMask) << pModeInfoFound->PixelFormat.ucBluePosition;
2553 ucBluePosition;
2554 pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition; 2546 pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition;
2555 pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust; 2547 pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust;
2556 pResult->format->Amask = 2548 pResult->format->Amask =
2557 ((unsigned int) pModeInfoFound-> 2549 ((unsigned int) pModeInfoFound->PixelFormat.
2558 PixelFormat.ucAlphaMask) << pModeInfoFound->PixelFormat. 2550 ucAlphaMask) << pModeInfoFound->PixelFormat.ucAlphaPosition;
2559 ucAlphaPosition;
2560 pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition; 2551 pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition;
2561 pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust; 2552 pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust;
2562 2553
2563 #ifdef REPORT_EMPTY_ALPHA_MASK 2554 #ifdef REPORT_EMPTY_ALPHA_MASK
2564 pResult->format->Amask = 2555 pResult->format->Amask =
2813 /* Determine the screen depth */ 2804 /* Determine the screen depth */
2814 vformat->BitsPerPixel = pDesktopMode->uiBPP; 2805 vformat->BitsPerPixel = pDesktopMode->uiBPP;
2815 vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8; 2806 vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8;
2816 2807
2817 vformat->Rmask = 2808 vformat->Rmask =
2818 ((unsigned int) pDesktopMode->PixelFormat. 2809 ((unsigned int) pDesktopMode->PixelFormat.ucRedMask) << pDesktopMode->
2819 ucRedMask) << pDesktopMode->PixelFormat.ucRedPosition; 2810 PixelFormat.ucRedPosition;
2820 vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition; 2811 vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition;
2821 vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust; 2812 vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust;
2822 vformat->Gmask = 2813 vformat->Gmask =
2823 ((unsigned int) pDesktopMode-> 2814 ((unsigned int) pDesktopMode->PixelFormat.
2824 PixelFormat.ucGreenMask) << pDesktopMode->PixelFormat. 2815 ucGreenMask) << pDesktopMode->PixelFormat.ucGreenPosition;
2825 ucGreenPosition;
2826 vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition; 2816 vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition;
2827 vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust; 2817 vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust;
2828 vformat->Bmask = 2818 vformat->Bmask =
2829 ((unsigned int) pDesktopMode-> 2819 ((unsigned int) pDesktopMode->PixelFormat.
2830 PixelFormat.ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition; 2820 ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
2831 vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition; 2821 vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition;
2832 vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust; 2822 vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust;
2833 vformat->Amask = 2823 vformat->Amask =
2834 ((unsigned int) pDesktopMode-> 2824 ((unsigned int) pDesktopMode->PixelFormat.
2835 PixelFormat.ucAlphaMask) << pDesktopMode->PixelFormat. 2825 ucAlphaMask) << pDesktopMode->PixelFormat.ucAlphaPosition;
2836 ucAlphaPosition;
2837 vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition; 2826 vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition;
2838 vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust; 2827 vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust;
2839 2828
2840 #ifdef REPORT_EMPTY_ALPHA_MASK 2829 #ifdef REPORT_EMPTY_ALPHA_MASK
2841 vformat->Amask = vformat->Ashift = vformat->Aloss = 0; 2830 vformat->Amask = vformat->Ashift = vformat->Aloss = 0;
2936 SDL_memcpy(&(_this->hidden->SrcBufferDesc), 2925 SDL_memcpy(&(_this->hidden->SrcBufferDesc),
2937 _this->hidden->pAvailableFSLibVideoModes, 2926 _this->hidden->pAvailableFSLibVideoModes,
2938 sizeof(_this->hidden->SrcBufferDesc)); 2927 sizeof(_this->hidden->SrcBufferDesc));
2939 // Allocate new video buffer! 2928 // Allocate new video buffer!
2940 _this->hidden->pchSrcBuffer = 2929 _this->hidden->pchSrcBuffer =
2941 (char *) SDL_malloc(_this->hidden-> 2930 (char *) SDL_malloc(_this->hidden->pAvailableFSLibVideoModes->
2942 pAvailableFSLibVideoModes->uiScanLineSize * 2931 uiScanLineSize *
2943 _this->hidden-> 2932 _this->hidden->pAvailableFSLibVideoModes->
2944 pAvailableFSLibVideoModes->uiYResolution); 2933 uiYResolution);
2945 if (!_this->hidden->pchSrcBuffer) { 2934 if (!_this->hidden->pchSrcBuffer) {
2946 #ifdef DEBUG_BUILD 2935 #ifdef DEBUG_BUILD
2947 printf 2936 printf
2948 ("[os2fslib_VideoInit] : Yikes, not enough memory for new video buffer!\n"); 2937 ("[os2fslib_VideoInit] : Yikes, not enough memory for new video buffer!\n");
2949 fflush(stdout); 2938 fflush(stdout);