Commit 6b91f5b3 authored by Oliver Stieber's avatar Oliver Stieber Committed by Alexandre Julliard

Set the apha channel to opaque when locking X8R8G8B8 backbuffers.

parent 70442d5e
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
*/ */
#include "config.h" #include "config.h"
#include "wine/port.h"
#include "wined3d_private.h" #include "wined3d_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface);
...@@ -696,7 +697,19 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) { ...@@ -696,7 +697,19 @@ HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
vcheckGLcall("glDrawPixels"); vcheckGLcall("glDrawPixels");
} }
break; break;
case WINED3DFMT_X8R8G8B8: /* FIXME: there's no alpha change with D3DFMT_X8R8G8B8 but were using GL_BGRA */ case WINED3DFMT_X8R8G8B8: /* make sure the X byte is set to alpha on, since it
could be any random value this fixes the intro move in Pirates! */
{
int size;
unsigned int *data;
data = (unsigned int *)This->resource.allocatedMemory;
size = (This->lockedRect.bottom - This->lockedRect.top) * (This->lockedRect.right - This->lockedRect.left);
while(size > 0) {
*data |= 0xFF000000;
data++;
size--;
}
}
case WINED3DFMT_A8R8G8B8: case WINED3DFMT_A8R8G8B8:
{ {
glPixelStorei(GL_PACK_SWAP_BYTES, TRUE); glPixelStorei(GL_PACK_SWAP_BYTES, TRUE);
......
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