static UINT WINAPI IDirect3D8Impl_GetAdapterModeCount (LPDIRECT3D8 iface,UINT Adapter) { IDirect3D8Impl *This = (IDirect3D8Impl *)iface; HRESULT hr; TRACE("(%p)->(%d)\n", This, Adapter); EnterCriticalSection(&d3d8_cs); hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, 0 /* format */); LeaveCriticalSection(&d3d8_cs); return hr; }
static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format) { IDirect3D9Impl *This = (IDirect3D9Impl *)iface; HRESULT hr; TRACE("(%p)->(%d, %d\n", This, Adapter, Format); /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out */ if(Format != D3DFMT_X8R8G8B8 && Format != D3DFMT_R5G6B5) { return 0; } EnterCriticalSection(&d3d9_cs); hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, Format); LeaveCriticalSection(&d3d9_cs); return hr; }
static UINT WINAPI IDirect3D9Impl_GetAdapterModeCount(LPDIRECT3D9EX iface, UINT Adapter, D3DFORMAT Format) { IDirect3D9Impl *This = (IDirect3D9Impl *)iface; HRESULT hr; TRACE("iface %p, adapter %u, format %#x.\n", iface, Adapter, Format); /* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out */ if(Format != D3DFMT_X8R8G8B8 && Format != D3DFMT_R5G6B5) { return 0; } wined3d_mutex_lock(); hr = IWineD3D_GetAdapterModeCount(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format)); wined3d_mutex_unlock(); return hr; }