comparison src/video/win32/SDL_win32modes.c @ 1965:a788656ca29a

SDL constants are all uppercase.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Aug 2006 17:09:42 +0000
parents 83420da906a5
children 9341a884a4d9
comparison
equal deleted inserted replaced
1964:071b6598d48f 1965:a788656ca29a
46 data->DeviceMode.dmFields = 46 data->DeviceMode.dmFields =
47 (DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY | 47 (DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY |
48 DM_DISPLAYFLAGS); 48 DM_DISPLAYFLAGS);
49 49
50 /* Fill in the mode information */ 50 /* Fill in the mode information */
51 mode->format = SDL_PixelFormat_Unknown; 51 mode->format = SDL_PIXELFORMAT_UNKNOWN;
52 mode->w = devmode.dmPelsWidth; 52 mode->w = devmode.dmPelsWidth;
53 mode->h = devmode.dmPelsHeight; 53 mode->h = devmode.dmPelsHeight;
54 mode->refresh_rate = devmode.dmDisplayFrequency; 54 mode->refresh_rate = devmode.dmDisplayFrequency;
55 mode->driverdata = data; 55 mode->driverdata = data;
56 56
70 DeleteObject(hbm); 70 DeleteObject(hbm);
71 DeleteDC(hdc); 71 DeleteDC(hdc);
72 if (bmi->bmiHeader.biCompression == BI_BITFIELDS) { 72 if (bmi->bmiHeader.biCompression == BI_BITFIELDS) {
73 switch (*(Uint32 *) bmi->bmiColors) { 73 switch (*(Uint32 *) bmi->bmiColors) {
74 case 0x00FF0000: 74 case 0x00FF0000:
75 mode->format = SDL_PixelFormat_RGB888; 75 mode->format = SDL_PIXELFORMAT_RGB888;
76 break; 76 break;
77 case 0x000000FF: 77 case 0x000000FF:
78 mode->format = SDL_PixelFormat_BGR888; 78 mode->format = SDL_PIXELFORMAT_BGR888;
79 break; 79 break;
80 case 0xF800: 80 case 0xF800:
81 mode->format = SDL_PixelFormat_RGB565; 81 mode->format = SDL_PIXELFORMAT_RGB565;
82 break; 82 break;
83 case 0x7C00: 83 case 0x7C00:
84 mode->format = SDL_PixelFormat_RGB555; 84 mode->format = SDL_PIXELFORMAT_RGB555;
85 break; 85 break;
86 } 86 }
87 } else if (bmi->bmiHeader.biBitCount == 8) { 87 } else if (bmi->bmiHeader.biBitCount == 8) {
88 mode->format = SDL_PixelFormat_Index8; 88 mode->format = SDL_PIXELFORMAT_INDEX8;
89 } 89 }
90 } else { 90 } else {
91 /* FIXME: Can we tell what this will be? */ 91 /* FIXME: Can we tell what this will be? */
92 switch (devmode.dmBitsPerPel) { 92 switch (devmode.dmBitsPerPel) {
93 case 32: 93 case 32:
94 mode->format = SDL_PixelFormat_RGB888; 94 mode->format = SDL_PIXELFORMAT_RGB888;
95 break; 95 break;
96 case 24: 96 case 24:
97 mode->format = SDL_PixelFormat_RGB24; 97 mode->format = SDL_PIXELFORMAT_RGB24;
98 break; 98 break;
99 case 16: 99 case 16:
100 mode->format = SDL_PixelFormat_RGB565; 100 mode->format = SDL_PIXELFORMAT_RGB565;
101 break; 101 break;
102 case 15: 102 case 15:
103 mode->format = SDL_PixelFormat_RGB555; 103 mode->format = SDL_PIXELFORMAT_RGB555;
104 break; 104 break;
105 case 8: 105 case 8:
106 mode->format = SDL_PixelFormat_Index8; 106 mode->format = SDL_PIXELFORMAT_INDEX8;
107 break; 107 break;
108 } 108 }
109 } 109 }
110 return SDL_TRUE; 110 return SDL_TRUE;
111 } 111 }