Mercurial > sdl-ios-xcode
comparison src/video/windib/SDL_dibvideo.c @ 1251:86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
updated project files, VS2005 support, VGA mode, more device support, etc,
etc, etc.
Fixes Bugzilla #47 and #28.
--ryan.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Thu, 19 Jan 2006 08:43:00 +0000 |
parents | 51a8702d8ecd |
children | f61f045343d3 |
comparison
equal
deleted
inserted
replaced
1250:a4d515d0fc3a | 1251:86d0d01290ea |
---|---|
766 } | 766 } |
767 DeleteDC(mdc); | 767 DeleteDC(mdc); |
768 ReleaseDC(SDL_Window, hdc); | 768 ReleaseDC(SDL_Window, hdc); |
769 } | 769 } |
770 | 770 |
771 | |
771 int DIB_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) | 772 int DIB_SetColors(_THIS, int firstcolor, int ncolors, SDL_Color *colors) |
772 { | 773 { |
773 RGBQUAD *pal; | 774 RGBQUAD *pal; |
774 int i; | 775 int i; |
775 #ifndef _WIN32_WCE | 776 #if (_WIN32_WCE < 400 ) |
777 HDC hdc; | |
778 #else | |
776 HDC hdc, mdc; | 779 HDC hdc, mdc; |
777 #else | |
778 HDC hdc; | |
779 #endif | 780 #endif |
780 | 781 |
781 /* Update the display palette */ | 782 /* Update the display palette */ |
782 hdc = GetDC(SDL_Window); | 783 hdc = GetDC(SDL_Window); |
783 if ( screen_pal ) { | 784 if ( screen_pal ) { |
803 pal[i].rgbBlue = colors[i].b; | 804 pal[i].rgbBlue = colors[i].b; |
804 pal[i].rgbReserved = 0; | 805 pal[i].rgbReserved = 0; |
805 } | 806 } |
806 | 807 |
807 /* Set the DIB palette and update the display */ | 808 /* Set the DIB palette and update the display */ |
808 #ifndef _WIN32_WCE | 809 #if ( _WIN32_WCE >= 400 ) |
809 mdc = CreateCompatibleDC(hdc); | 810 mdc = CreateCompatibleDC(hdc); |
810 SelectObject(mdc, screen_bmp); | 811 SelectObject(mdc, screen_bmp); |
811 SetDIBColorTable(mdc, firstcolor, ncolors, pal); | 812 SetDIBColorTable(mdc, firstcolor, ncolors, pal); |
812 BitBlt(hdc, 0, 0, this->screen->w, this->screen->h, | 813 BitBlt(hdc, 0, 0, this->screen->w, this->screen->h, |
813 mdc, 0, 0, SRCCOPY); | 814 mdc, 0, 0, SRCCOPY); |
814 DeleteDC(mdc); | 815 DeleteDC(mdc); |
815 #endif | 816 #endif |
816 ReleaseDC(SDL_Window, hdc); | 817 ReleaseDC(SDL_Window, hdc); |
817 return(1); | 818 return(1); |
818 } | 819 } |
820 | |
819 | 821 |
820 static void DIB_CheckGamma(_THIS) | 822 static void DIB_CheckGamma(_THIS) |
821 { | 823 { |
822 #ifndef NO_GAMMA_SUPPORT | 824 #ifndef NO_GAMMA_SUPPORT |
823 HDC hdc; | 825 HDC hdc; |