Commit 03f7a2d8 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the remaining "Flags".

parent b459b917
......@@ -68,14 +68,14 @@ static ULONG WINAPI IWineD3DClipperImpl_Release(IWineD3DClipper *iface)
return ref;
}
static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD Flags, HWND hWnd)
static HRESULT WINAPI IWineD3DClipperImpl_SetHwnd(IWineD3DClipper *iface, DWORD flags, HWND hWnd)
{
IWineD3DClipperImpl *This = (IWineD3DClipperImpl *)iface;
TRACE("(%p)->(0x%08x,%p)\n", This, Flags, hWnd);
if( Flags )
TRACE("iface %p, flags %#x, window %p.\n", iface, flags, hWnd);
if (flags)
{
FIXME("Flags = 0x%08x, not supported.\n",Flags);
FIXME("flags %#x, not supported.\n", flags);
return WINED3DERR_INVALIDCALL;
}
......@@ -128,12 +128,12 @@ static HRESULT WINAPI IWineD3DClipperImpl_GetClipList(IWineD3DClipper *iface, co
}
}
static HRESULT WINAPI IWineD3DClipperImpl_SetClipList(IWineD3DClipper *iface, const RGNDATA *rgn, DWORD Flags)
static HRESULT WINAPI IWineD3DClipperImpl_SetClipList(IWineD3DClipper *iface, const RGNDATA *rgn, DWORD flags)
{
static int warned = 0;
if (warned++ < 10 || !rgn)
FIXME("iface %p, region %p, flags %#x stub!\n", iface, rgn, Flags);
FIXME("iface %p, region %p, flags %#x stub!\n", iface, rgn, flags);
return WINED3D_OK;
}
......
......@@ -5,7 +5,7 @@
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -180,8 +180,10 @@ static ULONG WINAPI IWineD3DCubeTextureImpl_Release(IWineD3DCubeTexture *iface)
/* ****************************************************
IWineD3DCubeTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
static HRESULT WINAPI IWineD3DCubeTextureImpl_SetPrivateData(IWineD3DCubeTexture *iface,
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
{
return resource_set_private_data((IWineD3DResource *)iface, riid, data, data_size, flags);
}
static HRESULT WINAPI IWineD3DCubeTextureImpl_GetPrivateData(IWineD3DCubeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
......
......@@ -1601,7 +1601,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DWORD Flags,
static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DWORD flags,
const PALETTEENTRY *PalEnt, void *parent, IWineD3DPalette **Palette)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
......@@ -1609,7 +1609,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
HRESULT hr;
TRACE("iface %p, flags %#x, entries %p, palette %p, parent %p.\n",
iface, Flags, PalEnt, Palette, parent);
iface, flags, PalEnt, Palette, parent);
object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object));
if (!object)
......@@ -1618,7 +1618,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePalette(IWineD3DDevice *iface, DW
return E_OUTOFMEMORY;
}
hr = wined3d_palette_init(object, This, Flags, PalEnt, parent);
hr = wined3d_palette_init(object, This, flags, PalEnt, parent);
if (FAILED(hr))
{
WARN("Failed to initialize palette, hr %#x.\n", hr);
......@@ -2451,7 +2451,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetStreamSource(IWineD3DDevice *iface,
static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *iface, UINT StreamNumber, UINT Divider) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
struct wined3d_stream_state *stream;
UINT oldFlags, oldFreq;
UINT old_flags, oldFreq;
TRACE("iface %p, stream_idx %u, divider %#x.\n", iface, StreamNumber, Divider);
......@@ -2473,7 +2473,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *ifa
}
stream = &This->updateStateBlock->state.streams[StreamNumber];
oldFlags = stream->flags;
old_flags = stream->flags;
oldFreq = stream->frequency;
stream->flags = Divider & (WINED3DSTREAMSOURCE_INSTANCEDATA | WINED3DSTREAMSOURCE_INDEXEDDATA);
......@@ -2481,7 +2481,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetStreamSourceFreq(IWineD3DDevice *ifa
This->updateStateBlock->changed.streamFreq |= 1 << StreamNumber;
if (stream->frequency != oldFreq || stream->flags != oldFlags)
if (stream->frequency != oldFreq || stream->flags != old_flags)
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_STREAMSRC);
return WINED3D_OK;
......@@ -3894,7 +3894,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantF(
/* Do not call while under the GL lock. */
#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIndex, DWORD dwCount,
const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD dwFlags,
const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD flags,
DWORD DestFVF)
{
const struct wined3d_gl_info *gl_info = &This->adapter->gl_info;
......@@ -4237,7 +4237,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn
/* Do not call while under the GL lock. */
static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex,
UINT VertexCount, IWineD3DBuffer *pDestBuffer, IWineD3DVertexDeclaration *pVertexDecl, DWORD Flags,
UINT VertexCount, IWineD3DBuffer *pDestBuffer, IWineD3DVertexDeclaration *pVertexDecl, DWORD flags,
DWORD DestFVF)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
......@@ -4247,7 +4247,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
BOOL vbo = FALSE, streamWasUP = This->stateBlock->state.user_stream;
HRESULT hr;
TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, Flags);
TRACE("(%p)->(%d,%d,%d,%p,%p,%d\n", This, SrcStartIndex, DestIndex, VertexCount, pDestBuffer, pVertexDecl, flags);
if(pVertexDecl) {
ERR("Output vertex declaration not implemented yet\n");
......@@ -4293,7 +4293,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
}
hr = process_vertices_strided(This, DestIndex, VertexCount, &stream_info,
(struct wined3d_buffer *)pDestBuffer, Flags, DestFVF);
(struct wined3d_buffer *)pDestBuffer, flags, DestFVF);
context_release(context);
......@@ -6008,15 +6008,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetCursorProperties(IWineD3DDevice *ifa
return WINED3D_OK;
}
static void WINAPI IWineD3DDeviceImpl_SetCursorPosition(IWineD3DDevice* iface, int XScreenSpace, int YScreenSpace, DWORD Flags) {
static void WINAPI IWineD3DDeviceImpl_SetCursorPosition(IWineD3DDevice *iface,
int XScreenSpace, int YScreenSpace, DWORD flags)
{
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *) iface;
TRACE("(%p) : SetPos to (%u,%u)\n", This, XScreenSpace, YScreenSpace);
TRACE("iface %p, x %d, y %d, flags %#x.\n",
iface, XScreenSpace, YScreenSpace, flags);
This->xScreenSpace = XScreenSpace;
This->yScreenSpace = YScreenSpace;
return;
}
static BOOL WINAPI IWineD3DDeviceImpl_ShowCursor(IWineD3DDevice* iface, BOOL bShow) {
......@@ -6560,13 +6561,16 @@ static HRESULT WINAPI IWineD3DDeviceImpl_GetCreationParameters(IWineD3DDevice
return WINED3D_OK;
}
static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT iSwapChain, DWORD Flags, CONST WINED3DGAMMARAMP* pRamp) {
static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice *iface,
UINT iSwapChain, DWORD flags, const WINED3DGAMMARAMP *pRamp)
{
IWineD3DSwapChain *swapchain;
TRACE("Relaying to swapchain\n");
if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK) {
IWineD3DSwapChain_SetGammaRamp(swapchain, Flags, pRamp);
if (IWineD3DDeviceImpl_GetSwapChain(iface, iSwapChain, &swapchain) == WINED3D_OK)
{
IWineD3DSwapChain_SetGammaRamp(swapchain, flags, pRamp);
IWineD3DSwapChain_Release(swapchain);
}
}
......
......@@ -2782,13 +2782,14 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterDisplayMode(IWineD3D *iface, UINT A
/* NOTE: due to structure differences between dx8 and dx9 D3DADAPTER_IDENTIFIER,
and fields being inserted in the middle, a new structure is used in place */
static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Adapter, DWORD Flags,
WINED3DADAPTER_IDENTIFIER* pIdentifier) {
static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface,
UINT Adapter, DWORD flags, WINED3DADAPTER_IDENTIFIER *pIdentifier)
{
IWineD3DImpl *This = (IWineD3DImpl *)iface;
struct wined3d_adapter *adapter;
size_t len;
TRACE_(d3d_caps)("(%p}->(Adapter: %d, Flags: %x, pId=%p)\n", This, Adapter, Flags, pIdentifier);
TRACE_(d3d_caps)("(%p}->(Adapter: %d, flags: %x, pId=%p)\n", This, Adapter, flags, pIdentifier);
if (Adapter >= IWineD3D_GetAdapterCount(iface)) {
return WINED3DERR_INVALIDCALL;
......@@ -2838,7 +2839,7 @@ static HRESULT WINAPI IWineD3DImpl_GetAdapterIdentifier(IWineD3D *iface, UINT Ad
pIdentifier->subsystem_id = 0;
pIdentifier->revision = 0;
memcpy(&pIdentifier->device_identifier, &IID_D3DDEVICE_D3DUID, sizeof(pIdentifier->device_identifier));
pIdentifier->whql_level = (Flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
pIdentifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
memcpy(&pIdentifier->adapter_luid, &adapter->luid, sizeof(pIdentifier->adapter_luid));
pIdentifier->video_memory = adapter->TextureRam;
......
......@@ -74,25 +74,29 @@ static ULONG WINAPI IWineD3DPaletteImpl_Release(IWineD3DPalette *iface) {
}
/* Not called from the vtable */
static WORD IWineD3DPaletteImpl_Size(DWORD dwFlags)
static WORD IWineD3DPaletteImpl_Size(DWORD flags)
{
switch (dwFlags & SIZE_BITS) {
switch (flags & SIZE_BITS)
{
case WINEDDPCAPS_1BIT: return 2;
case WINEDDPCAPS_2BIT: return 4;
case WINEDDPCAPS_4BIT: return 16;
case WINEDDPCAPS_8BIT: return 256;
default:
FIXME("Unhandled size bits %#x.\n", dwFlags & SIZE_BITS);
FIXME("Unhandled size bits %#x.\n", flags & SIZE_BITS);
return 256;
}
}
static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DWORD Flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt) {
static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface,
DWORD flags, DWORD Start, DWORD Count, PALETTEENTRY *PalEnt)
{
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt);
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n",
iface, flags, Start, Count, PalEnt);
if (Flags) return WINED3DERR_INVALIDCALL; /* unchecked */
if (flags) return WINED3DERR_INVALIDCALL; /* unchecked */
if (Start + Count > IWineD3DPaletteImpl_Size(This->flags))
return WINED3DERR_INVALIDCALL;
......@@ -111,12 +115,13 @@ static HRESULT WINAPI IWineD3DPaletteImpl_GetEntries(IWineD3DPalette *iface, DW
}
static HRESULT WINAPI IWineD3DPaletteImpl_SetEntries(IWineD3DPalette *iface,
DWORD Flags, DWORD Start, DWORD Count, const PALETTEENTRY *PalEnt)
DWORD flags, DWORD Start, DWORD Count, const PALETTEENTRY *PalEnt)
{
IWineD3DPaletteImpl *This = (IWineD3DPaletteImpl *)iface;
IWineD3DResourceImpl *res;
TRACE("(%p)->(%08x,%d,%d,%p)\n",This,Flags,Start,Count,PalEnt);
TRACE("iface %p, flags %#x, start %u, count %u, entries %p.\n",
iface, flags, Start, Count, PalEnt);
TRACE("Palette flags: %#x.\n", This->flags);
if (This->flags & WINEDDPCAPS_8BITENTRIES)
......
......@@ -3,7 +3,7 @@
*
* Copyright 2005 Oliver Stieber
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
* Copyright 2009 Henri Verbeet for CodeWeavers.
* Copyright 2009-2010 Henri Verbeet for CodeWeavers.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -284,7 +284,9 @@ static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
return ref;
}
static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery *iface,
void *pData, DWORD dwSize, DWORD flags)
{
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
struct wined3d_occlusion_query *query = This->extendedData;
IWineD3DDeviceImpl *device = This->device;
......@@ -295,7 +297,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface,
GLuint samples;
HRESULT res;
TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
TRACE("(%p) : type D3DQUERY_OCCLUSION, pData %p, dwSize %#x, flags %#x.\n", This, pData, dwSize, flags);
if (!query->context) This->state = QUERY_CREATED;
......@@ -359,13 +361,15 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface,
return res;
}
static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) {
static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery *iface,
void *pData, DWORD dwSize, DWORD flags)
{
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface;
struct wined3d_event_query *query = This->extendedData;
BOOL *data = pData;
enum wined3d_event_query_result ret;
TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags);
TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, flags %#x.\n", This, pData, dwSize, flags);
if (!pData || !dwSize) return S_OK;
if (!query)
......@@ -417,11 +421,12 @@ static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){
return This->type;
}
static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD flags)
{
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
TRACE("(%p) : dwIssueFlags %#x, type D3DQUERY_EVENT\n", This, dwIssueFlags);
if (dwIssueFlags & WINED3DISSUE_END)
TRACE("(%p) : flags %#x, type D3DQUERY_EVENT\n", This, flags);
if (flags & WINED3DISSUE_END)
{
struct wined3d_event_query *query = This->extendedData;
......@@ -430,22 +435,22 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD
wined3d_event_query_issue(query, This->device);
}
else if(dwIssueFlags & WINED3DISSUE_BEGIN)
else if (flags & WINED3DISSUE_BEGIN)
{
/* Started implicitly at device creation */
ERR("Event query issued with START flag - what to do?\n");
}
if(dwIssueFlags & WINED3DISSUE_BEGIN) {
if (flags & WINED3DISSUE_BEGIN)
This->state = QUERY_BUILDING;
} else {
else
This->state = QUERY_SIGNALLED;
}
return WINED3D_OK;
}
static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) {
static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery *iface, DWORD flags)
{
IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface;
IWineD3DDeviceImpl *device = This->device;
const struct wined3d_gl_info *gl_info = &device->adapter->gl_info;
......@@ -456,7 +461,7 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
struct wined3d_context *context;
/* This is allowed according to msdn and our tests. Reset the query and restart */
if (dwIssueFlags & WINED3DISSUE_BEGIN)
if (flags & WINED3DISSUE_BEGIN)
{
if (This->state == QUERY_BUILDING)
{
......@@ -492,7 +497,8 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
context_release(context);
}
if (dwIssueFlags & WINED3DISSUE_END) {
if (flags & WINED3DISSUE_END)
{
/* Msdn says _END on a non-building occlusion query returns an error, but
* our tests show that it returns OK. But OpenGL doesn't like it, so avoid
* generating an error
......@@ -520,11 +526,11 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_Issue(IWineD3DQuery* iface, D
FIXME("(%p) : Occlusion queries not supported\n", This);
}
if(dwIssueFlags & WINED3DISSUE_BEGIN) {
if (flags & WINED3DISSUE_BEGIN)
This->state = QUERY_BUILDING;
} else {
else
This->state = QUERY_SIGNALLED;
}
return WINED3D_OK; /* can be WINED3DERR_INVALIDCALL. */
}
......
......@@ -5,7 +5,7 @@
* Copyright 2003-2004 Raphael Junqueira
* Copyright 2004 Christian Costa
* Copyright 2005 Oliver Stieber
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -130,22 +130,26 @@ static PrivateData* resource_find_private_data(IWineD3DResourceImpl *This, REFGU
}
HRESULT resource_set_private_data(IWineD3DResource *iface, REFGUID refguid,
const void *pData, DWORD SizeOfData, DWORD Flags)
const void *pData, DWORD SizeOfData, DWORD flags)
{
IWineD3DResourceImpl *This = (IWineD3DResourceImpl *)iface;
PrivateData *data;
TRACE("(%p) : %s %p %d %d\n", This, debugstr_guid(refguid), pData, SizeOfData, Flags);
TRACE("iface %p, riid %s, data %p, data_size %u, flags %#x.\n",
iface, debugstr_guid(refguid), pData, SizeOfData, flags);
resource_free_private_data(iface, refguid);
data = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*data));
if (!data) return E_OUTOFMEMORY;
data->tag = *refguid;
data->flags = Flags;
data->flags = flags;
if (Flags & WINED3DSPD_IUNKNOWN) {
if(SizeOfData != sizeof(IUnknown *)) {
if (flags & WINED3DSPD_IUNKNOWN)
{
if (SizeOfData != sizeof(IUnknown *))
{
WARN("IUnknown data with size %d, returning WINED3DERR_INVALIDCALL\n", SizeOfData);
HeapFree(GetProcessHeap(), 0, data);
return WINED3DERR_INVALIDCALL;
......
......@@ -110,7 +110,7 @@ static void WINAPI IWineGDISurfaceImpl_UnLoad(IWineD3DSurface *iface)
}
static HRESULT WINAPI IWineGDISurfaceImpl_Map(IWineD3DSurface *iface,
WINED3DLOCKED_RECT *pLockedRect, const RECT *pRect, DWORD Flags)
WINED3DLOCKED_RECT *pLockedRect, const RECT *pRect, DWORD flags)
{
IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
......@@ -131,7 +131,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_Map(IWineD3DSurface *iface,
This->resource.allocatedMemory = This->dib.bitmap_data;
}
return IWineD3DBaseSurfaceImpl_Map(iface, pLockedRect, pRect, Flags);
return IWineD3DBaseSurfaceImpl_Map(iface, pLockedRect, pRect, flags);
}
static HRESULT WINAPI IWineGDISurfaceImpl_Unmap(IWineD3DSurface *iface)
......@@ -174,10 +174,7 @@ static HRESULT WINAPI IWineGDISurfaceImpl_Unmap(IWineD3DSurface *iface)
* WINED3D_OK on success
*
*****************************************************************************/
static HRESULT WINAPI
IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface,
IWineD3DSurface *override,
DWORD Flags)
static HRESULT WINAPI IWineGDISurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD flags)
{
IWineD3DSurfaceImpl *surface = (IWineD3DSurfaceImpl *)iface;
IWineD3DSwapChainImpl *swapchain;
......
......@@ -220,7 +220,10 @@ static void swapchain_blit(IWineD3DSwapChainImpl *This, struct wined3d_context *
}
}
static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) {
static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface,
const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride,
const RGNDATA *pDirtyRegion, DWORD flags)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
const struct wined3d_gl_info *gl_info;
struct wined3d_context *context;
......
......@@ -169,11 +169,14 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain
return WINED3D_OK;
}
HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface, DWORD Flags, CONST WINED3DGAMMARAMP *pRamp){
HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface,
DWORD flags, const WINED3DGAMMARAMP *pRamp)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *)iface;
HDC hDC;
TRACE("(%p) : pRamp@%p flags(%d)\n", This, pRamp, Flags);
TRACE("iface %p, flags %#x, ramp %p.\n", iface, flags, pRamp);
hDC = GetDC(This->device_window);
SetDeviceGammaRamp(hDC, (LPVOID)pRamp);
ReleaseDC(This->device_window, hDC);
......
......@@ -172,7 +172,10 @@ static HRESULT WINAPI IWineGDISwapChainImpl_SetDestWindowOverride(IWineD3DSwapCh
return WINED3D_OK;
}
static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) {
static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface,
const RECT *pSourceRect, const RECT *pDestRect, HWND hDestWindowOverride,
const RGNDATA *pDirtyRegion, DWORD flags)
{
IWineD3DSwapChainImpl *This = (IWineD3DSwapChainImpl *) iface;
IWineD3DSurfaceImpl *front, *back;
......
......@@ -5,7 +5,7 @@
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -175,8 +175,10 @@ static ULONG WINAPI IWineD3DTextureImpl_Release(IWineD3DTexture *iface) {
/* ****************************************************
IWineD3DTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DTextureImpl_SetPrivateData(IWineD3DTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
static HRESULT WINAPI IWineD3DTextureImpl_SetPrivateData(IWineD3DTexture *iface,
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
{
return resource_set_private_data((IWineD3DResource *)iface, riid, data, data_size, flags);
}
static HRESULT WINAPI IWineD3DTextureImpl_GetPrivateData(IWineD3DTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
......
......@@ -4,7 +4,7 @@
* Copyright 2002-2005 Jason Edmeades
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -149,8 +149,10 @@ static void * WINAPI IWineD3DVolumeImpl_GetParent(IWineD3DVolume *iface)
return ((IWineD3DVolumeImpl *)iface)->resource.parent;
}
static HRESULT WINAPI IWineD3DVolumeImpl_SetPrivateData(IWineD3DVolume *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
static HRESULT WINAPI IWineD3DVolumeImpl_SetPrivateData(IWineD3DVolume *iface,
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
{
return resource_set_private_data((IWineD3DResource *)iface, riid, data, data_size, flags);
}
static HRESULT WINAPI IWineD3DVolumeImpl_GetPrivateData(IWineD3DVolume *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
......@@ -206,7 +208,7 @@ static void WINAPI IWineD3DVolumeImpl_GetDesc(IWineD3DVolume *iface, WINED3DVOLU
}
static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
WINED3DLOCKED_BOX *pLockedVolume, const WINED3DBOX *pBox, DWORD Flags)
WINED3DLOCKED_BOX *pLockedVolume, const WINED3DBOX *pBox, DWORD flags)
{
IWineD3DVolumeImpl *This = (IWineD3DVolumeImpl *)iface;
FIXME("(%p) : pBox=%p stub\n", This, pBox);
......@@ -244,10 +246,7 @@ static HRESULT WINAPI IWineD3DVolumeImpl_Map(IWineD3DVolume *iface,
This->lockedBox.Back = pBox->Back;
}
if (Flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)) {
/* Don't dirtify */
}
else
if (!(flags & (WINED3DLOCK_NO_DIRTY_UPDATE | WINED3DLOCK_READONLY)))
{
volume_add_dirty_box(iface, &This->lockedBox);
This->container->baseTexture.texture_rgb.dirty = TRUE;
......
......@@ -4,7 +4,7 @@
* Copyright 2002-2005 Jason Edmeades
* Copyright 2002-2005 Raphael Junqueira
* Copyright 2005 Oliver Stieber
* Copyright 2009 Henri Verbeet for CodeWeavers
* Copyright 2009-2010 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -143,8 +143,10 @@ static ULONG WINAPI IWineD3DVolumeTextureImpl_Release(IWineD3DVolumeTexture *ifa
/* ****************************************************
IWineD3DVolumeTexture IWineD3DResource parts follow
**************************************************** */
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, CONST void* pData, DWORD SizeOfData, DWORD Flags) {
return resource_set_private_data((IWineD3DResource *)iface, refguid, pData, SizeOfData, Flags);
static HRESULT WINAPI IWineD3DVolumeTextureImpl_SetPrivateData(IWineD3DVolumeTexture *iface,
REFGUID riid, const void *data, DWORD data_size, DWORD flags)
{
return resource_set_private_data((IWineD3DResource *)iface, riid, data, data_size, flags);
}
static HRESULT WINAPI IWineD3DVolumeTextureImpl_GetPrivateData(IWineD3DVolumeTexture *iface, REFGUID refguid, void* pData, DWORD* pSizeOfData) {
......
......@@ -2189,7 +2189,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_QueryInterface(IWineD3DSurface *iface,
ULONG WINAPI IWineD3DBaseSurfaceImpl_AddRef(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
void * WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPrivateData(IWineD3DSurface *iface,
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD Flags) DECLSPEC_HIDDEN;
REFGUID refguid, const void *pData, DWORD SizeOfData, DWORD flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPrivateData(IWineD3DSurface *iface,
REFGUID refguid, void *pData, DWORD *pSizeOfData) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, REFGUID refguid) DECLSPEC_HIDDEN;
......@@ -2197,21 +2197,21 @@ DWORD WINAPI IWineD3DBaseSurfaceImpl_SetPriority(IWineD3DSurface *iface, DWORD P
DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPriority(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
WINED3DRESOURCETYPE WINAPI IWineD3DBaseSurfaceImpl_GetType(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
void WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSURFACE_DESC *desc) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD Flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetBltStatus(IWineD3DSurface *iface, DWORD flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetFlipStatus(IWineD3DSurface *iface, DWORD flags) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_IsLost(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_Restore(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetPalette(IWineD3DSurface *iface, IWineD3DPalette **Pal) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetPalette(IWineD3DSurface *iface, IWineD3DPalette *Pal) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetColorKey(IWineD3DSurface *iface,
DWORD Flags, const WINEDDCOLORKEY *CKey) DECLSPEC_HIDDEN;
DWORD flags, const WINEDDCOLORKEY *CKey) DECLSPEC_HIDDEN;
DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface, LONG X, LONG Y) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetOverlayPosition(IWineD3DSurface *iface, LONG *X, LONG *Y) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder(IWineD3DSurface *iface,
DWORD Flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN;
DWORD flags, IWineD3DSurface *Ref) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, const RECT *SrcRect,
IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD Flags, const WINEDDOVERLAYFX *FX) DECLSPEC_HIDDEN;
IWineD3DSurface *DstSurface, const RECT *DstRect, DWORD flags, const WINEDDOVERLAYFX *FX) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetClipper(IWineD3DSurface *iface, IWineD3DClipper *clipper) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DClipper **clipper) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetFormat(IWineD3DSurface *iface,
......@@ -2222,7 +2222,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_Blt(IWineD3DSurface *iface, const RECT *d
HRESULT WINAPI IWineD3DBaseSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, DWORD dsty,
IWineD3DSurface *Source, const RECT *rsrc, DWORD trans) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSurfaceImpl_Map(IWineD3DSurface *iface, WINED3DLOCKED_RECT *pLockedRect,
const RECT *pRect, DWORD Flags) DECLSPEC_HIDDEN;
const RECT *pRect, DWORD flags) DECLSPEC_HIDDEN;
const void *WINAPI IWineD3DBaseSurfaceImpl_GetData(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
void get_drawable_size_swapchain(struct wined3d_context *context, UINT *width, UINT *height) DECLSPEC_HIDDEN;
......@@ -2634,7 +2634,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDevice(IWineD3DSwapChain *iface,
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetPresentParameters(IWineD3DSwapChain *iface,
WINED3DPRESENT_PARAMETERS *pPresentationParameters) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSwapChainImpl_SetGammaRamp(IWineD3DSwapChain *iface,
DWORD Flags, const WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN;
DWORD flags, const WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN;
HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetGammaRamp(IWineD3DSwapChain *iface,
WINED3DGAMMARAMP *pRamp) DECLSPEC_HIDDEN;
......
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