Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

SDL constants are all uppercase.

  • Loading branch information
slouken committed Aug 5, 2006
1 parent b95660f commit 90b879c14237b98c598e3a30a1fb6ef64e47e9c7

File 12 of 16 in 90b879c

@@ -65,25 +65,25 @@ SDL_RenderDriver GDI_RenderDriver = {
GDI_CreateRenderer,
{
"gdi",
(SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy |
SDL_Renderer_PresentFlip2 | SDL_Renderer_PresentFlip3 |
SDL_Renderer_PresentDiscard | SDL_Renderer_Accelerated),
(SDL_TextureBlendMode_None | SDL_TextureBlendMode_Mask |
SDL_TextureBlendMode_Blend),
(SDL_TextureScaleMode_None | SDL_TextureScaleMode_Fast),
(SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
SDL_RENDERER_PRESENTFLIP2 | sDL_RENDERER_PRESENTFLIP3 |
SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_ACCELERATED),
(SDL_TEXTUREBLENDMODE_NONE | SDL_TEXTUREBLENDMODE_MASK |
SDL_TEXTUREBLENDMODE_BLEND),
(SDL_TEXTURESCALEMODE_NONE | SDL_TEXTURESCALEMODE_FAST),
11,
{
SDL_PixelFormat_Index8,
SDL_PixelFormat_RGB555,
SDL_PixelFormat_RGB565,
SDL_PixelFormat_RGB888,
SDL_PixelFormat_BGR888,
SDL_PixelFormat_ARGB8888,
SDL_PixelFormat_RGBA8888,
SDL_PixelFormat_ABGR8888,
SDL_PixelFormat_BGRA8888,
SDL_PixelFormat_YUY2,
SDL_PixelFormat_UYVY},
SDL_PIXELFORMAT_INDEX8,
SDL_PIXELFORMAT_RGB555,
SDL_PIXELFORMAT_RGB565,
SDL_PIXELFORMAT_RGB888,
SDL_PIXELFORMAT_BGR888,
SDL_PIXELFORMAT_ARGB8888,
SDL_PIXELFORMAT_RGBA8888,
SDL_PIXELFORMAT_ABGR8888,
SDL_PIXELFORMAT_BGRA8888,
SDL_PIXELFORMAT_YUY2,
SDL_PIXELFORMAT_UYVY},
0,
0}
};
@@ -172,7 +172,7 @@ GDI_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->window = window->id;
renderer->driverdata = data;

renderer->info.flags = SDL_Renderer_Accelerated;
renderer->info.flags = SDL_RENDERER_ACCELERATED;

data->hwnd = windowdata->hwnd;
data->window_hdc = windowdata->hdc;
@@ -194,18 +194,18 @@ GDI_CreateRenderer(SDL_Window * window, Uint32 flags)
GetDIBits(data->window_hdc, hbm, 0, 1, NULL, data->bmi, DIB_RGB_COLORS);
DeleteObject(hbm);

if (flags & SDL_Renderer_SingleBuffer) {
if (flags & SDL_RENDERER_SINGLEBUFFER) {
renderer->info.flags |=
(SDL_Renderer_SingleBuffer | SDL_Renderer_PresentCopy);
(SDL_RENDERER_SINGLEBUFFER | sDL_RENDERER_PRESENTCOPY);
n = 0;
} else if (flags & SDL_Renderer_PresentFlip2) {
renderer->info.flags |= SDL_Renderer_PresentFlip2;
} else if (flags & SDL_RENDERER_PRESENTFLIP2) {
renderer->info.flags |= SDL_RENDERER_PRESENTFLIP2;
n = 2;
} else if (flags & SDL_Renderer_PresentFlip3) {
renderer->info.flags |= SDL_Renderer_PresentFlip3;
} else if (flags & SDL_RENDERER_PRESENTFLIP3) {
renderer->info.flags |= SDL_RENDERER_PRESENTFLIP3;
n = 3;
} else {
renderer->info.flags |= SDL_Renderer_PresentCopy;
renderer->info.flags |= SDL_RENDERER_PRESENTCOPY;
n = 1;
}
for (i = 0; i < n; ++i) {
@@ -257,7 +257,7 @@ GDI_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
}
data->pitch = (texture->w * SDL_BYTESPERPIXEL(data->format));

if (data->yuv || texture->access == SDL_TextureAccess_Local
if (data->yuv || texture->access == SDL_TEXTUREACCESS_LOCAL
|| texture->format != SDL_GetCurrentDisplayMode()->format) {
int bmi_size;
LPBITMAPINFO bmi;
@@ -537,7 +537,7 @@ GDI_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
SelectPalette(data->memory_hdc, texturedata->hpal, TRUE);
RealizePalette(data->memory_hdc);
}
if (blendMode & (SDL_TextureBlendMode_Mask | SDL_TextureBlendMode_Blend)) {
if (blendMode & (SDL_TEXTUREBLENDMODE_MASK | SDL_TEXTUREBLENDMODE_BLEND)) {
static BLENDFUNCTION blendFunc = {
AC_SRC_OVER,
0,
@@ -581,7 +581,7 @@ GDI_RenderPresent(SDL_Renderer * renderer)
SDL_DirtyRect *dirty;

/* Send the data to the display */
if (!(renderer->info.flags & SDL_Renderer_SingleBuffer)) {
if (!(renderer->info.flags & SDL_RENDERER_SINGLEBUFFER)) {
for (dirty = data->dirty.list; dirty; dirty = dirty->next) {
const SDL_Rect *rect = &dirty->rect;
BitBlt(data->window_hdc, rect->x, rect->y, rect->w, rect->h,
@@ -591,10 +591,10 @@ GDI_RenderPresent(SDL_Renderer * renderer)
}

/* Update the flipping chain, if any */
if (renderer->info.flags & SDL_Renderer_PresentFlip2) {
if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP2) {
data->current_hbm = (data->current_hbm + 1) % 2;
SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
} else if (renderer->info.flags & SDL_Renderer_PresentFlip3) {
} else if (renderer->info.flags & SDL_RENDERER_PRESENTFLIP3) {
data->current_hbm = (data->current_hbm + 1) % 3;
SelectObject(data->render_hdc, data->hbm[data->current_hbm]);
}

0 comments on commit 90b879c

Please sign in to comment.