21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_DRIVER_WINDOWS 40 DeleteObject(data->
hbm);
44 size =
sizeof(BITMAPINFOHEADER) + 256 *
sizeof (RGBQUAD);
51 info->bmiHeader.biSize =
sizeof(BITMAPINFOHEADER);
54 hbm = CreateCompatibleBitmap(data->
hdc, 1, 1);
55 GetDIBits(data->
hdc, hbm, 0, 0,
NULL, info, DIB_RGB_COLORS);
56 GetDIBits(data->
hdc, hbm, 0, 0,
NULL, info, DIB_RGB_COLORS);
64 bpp = info->bmiHeader.biPlanes * info->bmiHeader.biBitCount;
65 masks = (
Uint32*)((
Uint8*)info + info->bmiHeader.biSize);
75 info->bmiHeader.biSize =
sizeof(BITMAPINFOHEADER);
76 info->bmiHeader.biPlanes = 1;
77 info->bmiHeader.biBitCount = 32;
78 info->bmiHeader.biCompression =
BI_RGB;
83 info->bmiHeader.biWidth = window->
w;
84 info->bmiHeader.biHeight = -window->
h;
85 info->bmiHeader.biSizeImage = window->
h * (*pitch);
87 data->
mdc = CreateCompatibleDC(data->
hdc);
88 data->
hbm = CreateDIBSection(data->
hdc, info, DIB_RGB_COLORS, pixels,
NULL, 0);
94 SelectObject(data->
mdc, data->
hbm);
103 BitBlt(data->
hdc, 0, 0, window->
w, window->
h, data->
mdc, 0, 0, SRCCOPY);
121 DeleteObject(data->
hbm);
#define SDL_MasksToPixelFormatEnum
#define SDL_BYTESPERPIXEL(X)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int WIN_CreateWindowFramebuffer(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define SDL_small_alloc(type, count, pisstack)
void WIN_DestroyWindowFramebuffer(_THIS, SDL_Window *window)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
#define SDL_OutOfMemory()
int WIN_SetError(const char *prefix)
EGLSurface EGLNativeWindowType * window
The type used to identify a window.
#define SDL_small_free(ptr, isstack)
EGLSurface EGLint * rects
A rectangle, with the origin at the upper left (integer).
int WIN_UpdateWindowFramebuffer(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)