Commit e618ab65 authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

gdi32: Fix arguments for OSMesaMakeCurrent when using 16 bit formats.

parent e0e909ec
......@@ -251,6 +251,7 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context )
HBITMAP bitmap;
BITMAPOBJ *bmp;
dib_info dib;
GLenum type;
BOOL ret = FALSE;
if (!context)
......@@ -281,7 +282,12 @@ static BOOL dibdrv_wglMakeCurrent( HDC hdc, struct wgl_context *context )
TRACE( "context %p bits %p size %ux%u\n", context, bits, width, height );
ret = pOSMesaMakeCurrent( context->context, bits, GL_UNSIGNED_BYTE, width, height );
if (pixel_formats[context->format - 1].mesa == OSMESA_RGB_565)
type = GL_UNSIGNED_SHORT_5_6_5;
else
type = GL_UNSIGNED_BYTE;
ret = pOSMesaMakeCurrent( context->context, bits, type, width, height );
if (ret)
{
pOSMesaPixelStore( OSMESA_ROW_LENGTH, abs( dib.stride ) * 8 / dib.bit_count );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment