Commit 18a7653c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DDISPLAYMODE typedef.

parent 7cce4453
......@@ -422,7 +422,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetDisplayMode(IDirect3DDevice8 *ifac
TRACE("iface %p, mode %p.\n", iface, pMode);
wined3d_mutex_lock();
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......
......@@ -175,7 +175,8 @@ static HRESULT WINAPI IDirect3D8Impl_EnumAdapterModes(LPDIRECT3D8 iface, UINT Ad
iface, Adapter, Mode, pMode);
wined3d_mutex_lock();
hr = wined3d_enum_adapter_modes(This->WineD3D, Adapter, WINED3DFMT_UNKNOWN, Mode, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_enum_adapter_modes(This->WineD3D, Adapter, WINED3DFMT_UNKNOWN,
Mode, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......@@ -193,7 +194,7 @@ static HRESULT WINAPI IDirect3D8Impl_GetAdapterDisplayMode(LPDIRECT3D8 iface, UI
iface, Adapter, pMode);
wined3d_mutex_lock();
hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......
......@@ -371,7 +371,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetDisplayMode(IDirect3DDevice9Ex *if
TRACE("iface %p, swapchain %u, mode %p.\n", iface, iSwapChain, pMode);
wined3d_mutex_lock();
hr = wined3d_device_get_display_mode(This->wined3d_device, iSwapChain, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_device_get_display_mode(This->wined3d_device, iSwapChain, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......
......@@ -185,7 +185,7 @@ static HRESULT WINAPI IDirect3D9Impl_EnumAdapterModes(IDirect3D9Ex *iface, UINT
wined3d_mutex_lock();
hr = wined3d_enum_adapter_modes(This->WineD3D, Adapter, wined3dformat_from_d3dformat(Format),
Mode, (WINED3DDISPLAYMODE *) pMode);
Mode, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......@@ -202,7 +202,7 @@ static HRESULT WINAPI IDirect3D9Impl_GetAdapterDisplayMode(IDirect3D9Ex *iface,
TRACE("iface %p, adapter %u, mode %p.\n", iface, Adapter, pMode);
wined3d_mutex_lock();
hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_get_adapter_display_mode(This->WineD3D, Adapter, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......
......@@ -159,7 +159,7 @@ static HRESULT WINAPI IDirect3DSwapChain9Impl_GetDisplayMode(LPDIRECT3DSWAPCHAIN
TRACE("iface %p, mode %p.\n", iface, pMode);
wined3d_mutex_lock();
hr = wined3d_swapchain_get_display_mode(This->wined3d_swapchain, (WINED3DDISPLAYMODE *)pMode);
hr = wined3d_swapchain_get_display_mode(This->wined3d_swapchain, (struct wined3d_display_mode *)pMode);
wined3d_mutex_unlock();
if (SUCCEEDED(hr)) pMode->Format = d3dformat_from_wined3dformat(pMode->Format);
......
......@@ -739,11 +739,11 @@ static HRESULT WINAPI ddraw7_SetCooperativeLevel(IDirectDraw7 *iface, HWND hwnd,
if (cooplevel & DDSCL_FULLSCREEN)
{
WINED3DDISPLAYMODE display_mode;
struct wined3d_display_mode display_mode;
wined3d_get_adapter_display_mode(This->wineD3D, WINED3DADAPTER_DEFAULT, &display_mode);
wined3d_device_setup_fullscreen_window(This->wined3d_device, hwnd,
display_mode.Width, display_mode.Height);
display_mode.width, display_mode.height);
}
}
......@@ -847,8 +847,8 @@ static HRESULT WINAPI ddraw1_SetCooperativeLevel(IDirectDraw *iface, HWND window
static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD Height,
DWORD BPP, DWORD RefreshRate, DWORD Flags)
{
struct wined3d_display_mode mode;
enum wined3d_format_id format;
WINED3DDISPLAYMODE Mode;
HRESULT hr;
TRACE("ddraw %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", ddraw, Width,
......@@ -873,14 +873,14 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD
default: format = WINED3DFMT_UNKNOWN; break;
}
if (FAILED(hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &Mode)))
if (FAILED(hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &mode)))
{
ERR("Failed to get current display mode, hr %#x.\n", hr);
}
else if (Mode.Width == Width
&& Mode.Height == Height
&& Mode.Format == format
&& Mode.RefreshRate == RefreshRate)
else if (mode.width == Width
&& mode.height == Height
&& mode.format_id == format
&& mode.refresh_rate == RefreshRate)
{
TRACE("Skipping redundant mode setting call.\n");
wined3d_mutex_unlock();
......@@ -896,10 +896,10 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD
* depends on this
*/
Mode.Width = Width;
Mode.Height = Height;
Mode.RefreshRate = RefreshRate;
Mode.Format = format;
mode.width = Width;
mode.height = Height;
mode.refresh_rate = RefreshRate;
mode.format_id = format;
/* TODO: The possible return values from msdn suggest that
* the screen mode can't be changed if a surface is locked
......@@ -907,7 +907,7 @@ static HRESULT ddraw_set_display_mode(IDirectDrawImpl *ddraw, DWORD Width, DWORD
*/
/* TODO: Lose the primary surface */
hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &Mode);
hr = wined3d_device_set_display_mode(ddraw->wined3d_device, 0, &mode);
if (ddraw->cooperative_level & DDSCL_EXCLUSIVE)
SetWindowPos(ddraw->dest_window, HWND_TOP, 0, 0, Width, Height, SWP_SHOWWINDOW | SWP_NOACTIVATE);
......@@ -1239,8 +1239,8 @@ static HRESULT WINAPI ddraw1_Compact(IDirectDraw *iface)
static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2 *DDSD)
{
IDirectDrawImpl *This = impl_from_IDirectDraw7(iface);
struct wined3d_display_mode mode;
HRESULT hr;
WINED3DDISPLAYMODE Mode;
DWORD Size;
TRACE("iface %p, surface_desc %p.\n", iface, DDSD);
......@@ -1255,7 +1255,7 @@ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2
/* The necessary members of LPDDSURFACEDESC and LPDDSURFACEDESC2 are equal,
* so one method can be used for all versions (Hopefully) */
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &Mode);
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &mode);
if (FAILED(hr))
{
ERR(" (%p) IWineD3DDevice::GetDisplayMode returned %08x\n", This, hr);
......@@ -1268,13 +1268,13 @@ static HRESULT WINAPI ddraw7_GetDisplayMode(IDirectDraw7 *iface, DDSURFACEDESC2
DDSD->dwSize = Size;
DDSD->dwFlags |= DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_REFRESHRATE;
DDSD->dwWidth = Mode.Width;
DDSD->dwHeight = Mode.Height;
DDSD->dwWidth = mode.width;
DDSD->dwHeight = mode.height;
DDSD->u2.dwRefreshRate = 60;
DDSD->ddsCaps.dwCaps = 0;
DDSD->u4.ddpfPixelFormat.dwSize = sizeof(DDSD->u4.ddpfPixelFormat);
PixelFormat_WineD3DtoDD(&DDSD->u4.ddpfPixelFormat, Mode.Format);
DDSD->u1.lPitch = Mode.Width * DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount / 8;
PixelFormat_WineD3DtoDD(&DDSD->u4.ddpfPixelFormat, mode.format_id);
DDSD->u1.lPitch = mode.width * DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount / 8;
if(TRACE_ON(ddraw))
{
......@@ -1342,20 +1342,20 @@ static HRESULT WINAPI ddraw7_GetFourCCCodes(IDirectDraw7 *iface, DWORD *NumCodes
WINED3DFMT_DXT1, WINED3DFMT_DXT2, WINED3DFMT_DXT3, WINED3DFMT_DXT4, WINED3DFMT_DXT5,
WINED3DFMT_ATI2N, WINED3DFMT_NVHU, WINED3DFMT_NVHS
};
struct wined3d_display_mode mode;
DWORD count = 0, i, outsize;
HRESULT hr;
WINED3DDISPLAYMODE d3ddm;
TRACE("iface %p, codes_count %p, codes %p.\n", iface, NumCodes, Codes);
wined3d_device_get_display_mode(This->wined3d_device, 0, &d3ddm);
wined3d_device_get_display_mode(This->wined3d_device, 0, &mode);
outsize = NumCodes && Codes ? *NumCodes : 0;
for (i = 0; i < (sizeof(formats) / sizeof(formats[0])); ++i)
{
hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL,
d3ddm.Format, 0, WINED3DRTYPE_SURFACE, formats[i], DefaultSurfaceType);
mode.format_id, 0, WINED3DRTYPE_SURFACE, formats[i], DefaultSurfaceType);
if (SUCCEEDED(hr))
{
if (count < outsize)
......@@ -1776,9 +1776,9 @@ static HRESULT WINAPI ddraw1_WaitForVerticalBlank(IDirectDraw *iface, DWORD flag
static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
{
IDirectDrawImpl *This = impl_from_IDirectDraw7(iface);
struct wined3d_display_mode mode;
static DWORD cur_scanline;
static BOOL hide = FALSE;
WINED3DDISPLAYMODE Mode;
TRACE("iface %p, line %p.\n", iface, Scanline);
......@@ -1790,14 +1790,14 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline)
}
wined3d_mutex_lock();
wined3d_device_get_display_mode(This->wined3d_device, 0, &Mode);
wined3d_device_get_display_mode(This->wined3d_device, 0, &mode);
wined3d_mutex_unlock();
/* Fake the line sweeping of the monitor */
/* FIXME: We should synchronize with a source to keep the refresh rate */
*Scanline = cur_scanline++;
/* Assume 20 scan lines in the vertical blank */
if (cur_scanline >= Mode.Height + 20)
if (cur_scanline >= mode.height + 20)
cur_scanline = 0;
return DD_OK;
......@@ -1999,10 +1999,10 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
DDSURFACEDESC2 *DDSD, void *Context, LPDDENUMMODESCALLBACK2 cb)
{
IDirectDrawImpl *This = impl_from_IDirectDraw7(iface);
struct wined3d_display_mode *enum_modes = NULL;
struct wined3d_display_mode mode;
unsigned int modenum, fmt;
WINED3DDISPLAYMODE mode;
DDSURFACEDESC2 callback_sd;
WINED3DDISPLAYMODE *enum_modes = NULL;
unsigned enum_mode_count = 0, enum_mode_array_size = 0;
DDPIXELFORMAT pixelformat;
......@@ -2023,7 +2023,7 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
if(!(Flags & DDEDM_REFRESHRATES))
{
enum_mode_array_size = 16;
enum_modes = HeapAlloc(GetProcessHeap(), 0, sizeof(WINED3DDISPLAYMODE) * enum_mode_array_size);
enum_modes = HeapAlloc(GetProcessHeap(), 0, sizeof(*enum_modes) * enum_mode_array_size);
if (!enum_modes)
{
ERR("Out of memory\n");
......@@ -2039,14 +2039,18 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
while (wined3d_enum_adapter_modes(This->wineD3D, WINED3DADAPTER_DEFAULT,
checkFormatList[fmt], modenum++, &mode) == WINED3D_OK)
{
PixelFormat_WineD3DtoDD(&pixelformat, mode.Format);
if(DDSD)
PixelFormat_WineD3DtoDD(&pixelformat, mode.format_id);
if (DDSD)
{
if(DDSD->dwFlags & DDSD_WIDTH && mode.Width != DDSD->dwWidth) continue;
if(DDSD->dwFlags & DDSD_HEIGHT && mode.Height != DDSD->dwHeight) continue;
if(DDSD->dwFlags & DDSD_REFRESHRATE && mode.RefreshRate != DDSD->u2.dwRefreshRate) continue;
if (DDSD->dwFlags & DDSD_PIXELFORMAT &&
pixelformat.u1.dwRGBBitCount != DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount) continue;
if (DDSD->dwFlags & DDSD_WIDTH && mode.width != DDSD->dwWidth)
continue;
if (DDSD->dwFlags & DDSD_HEIGHT && mode.height != DDSD->dwHeight)
continue;
if (DDSD->dwFlags & DDSD_REFRESHRATE && mode.refresh_rate != DDSD->u2.dwRefreshRate)
continue;
if (DDSD->dwFlags & DDSD_PIXELFORMAT
&& pixelformat.u1.dwRGBBitCount != DDSD->u4.ddpfPixelFormat.u1.dwRGBBitCount)
continue;
}
if(!(Flags & DDEDM_REFRESHRATES))
......@@ -2060,8 +2064,8 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
for (i = 0; i < enum_mode_count; i++)
{
if(enum_modes[i].Width == mode.Width && enum_modes[i].Height == mode.Height &&
enum_modes[i].Format == mode.Format)
if (enum_modes[i].width == mode.width && enum_modes[i].height == mode.height
&& enum_modes[i].format_id == mode.format_id)
{
found = TRUE;
break;
......@@ -2076,18 +2080,16 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
callback_sd.u4.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
callback_sd.dwFlags = DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT|DDSD_PITCH|DDSD_REFRESHRATE;
if(Flags & DDEDM_REFRESHRATES)
{
callback_sd.u2.dwRefreshRate = mode.RefreshRate;
}
if (Flags & DDEDM_REFRESHRATES)
callback_sd.u2.dwRefreshRate = mode.refresh_rate;
callback_sd.dwWidth = mode.Width;
callback_sd.dwHeight = mode.Height;
callback_sd.dwWidth = mode.width;
callback_sd.dwHeight = mode.height;
callback_sd.u4.ddpfPixelFormat=pixelformat;
/* Calc pitch and DWORD align like MSDN says */
callback_sd.u1.lPitch = (callback_sd.u4.ddpfPixelFormat.u1.dwRGBBitCount / 8) * mode.Width;
callback_sd.u1.lPitch = (callback_sd.u4.ddpfPixelFormat.u1.dwRGBBitCount / 8) * mode.width;
callback_sd.u1.lPitch = (callback_sd.u1.lPitch + 3) & ~3;
TRACE("Enumerating %dx%dx%d @%d\n", callback_sd.dwWidth, callback_sd.dwHeight, callback_sd.u4.ddpfPixelFormat.u1.dwRGBBitCount,
......@@ -2105,11 +2107,11 @@ static HRESULT WINAPI ddraw7_EnumDisplayModes(IDirectDraw7 *iface, DWORD Flags,
{
if (enum_mode_count == enum_mode_array_size)
{
WINED3DDISPLAYMODE *new_enum_modes;
struct wined3d_display_mode *new_enum_modes;
enum_mode_array_size *= 2;
new_enum_modes = HeapReAlloc(GetProcessHeap(), 0, enum_modes, sizeof(WINED3DDISPLAYMODE) * enum_mode_array_size);
new_enum_modes = HeapReAlloc(GetProcessHeap(), 0, enum_modes,
sizeof(*new_enum_modes) * enum_mode_array_size);
if (!new_enum_modes)
{
ERR("Out of memory\n");
......@@ -2596,7 +2598,7 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSurface
{
WINED3DPRESENT_PARAMETERS presentation_parameters;
IDirectDrawSurfaceImpl *target = surface;
WINED3DDISPLAYMODE mode;
struct wined3d_display_mode mode;
HRESULT hr = WINED3D_OK;
/* FIXME: wined3d_get_adapter_display_mode() would be more appropriate
......@@ -2617,9 +2619,9 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSurface
}
memset(&presentation_parameters, 0, sizeof(presentation_parameters));
presentation_parameters.BackBufferWidth = mode.Width;
presentation_parameters.BackBufferHeight = mode.Height;
presentation_parameters.BackBufferFormat = mode.Format;
presentation_parameters.BackBufferWidth = mode.width;
presentation_parameters.BackBufferHeight = mode.height;
presentation_parameters.BackBufferFormat = mode.format_id;
presentation_parameters.SwapEffect = WINED3DSWAPEFFECT_COPY;
presentation_parameters.hDeviceWindow = ddraw->dest_window;
presentation_parameters.Windowed = !(ddraw->cooperative_level & DDSCL_FULLSCREEN);
......@@ -2739,10 +2741,10 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
IDirectDrawSurfaceImpl **Surf, IUnknown *UnkOuter, UINT version)
{
IDirectDrawSurfaceImpl *object = NULL;
struct wined3d_display_mode mode;
HRESULT hr;
LONG extra_surfaces = 0;
DDSURFACEDESC2 desc2;
WINED3DDISPLAYMODE Mode;
const DWORD sysvidmem = DDSCAPS_VIDEOMEMORY | DDSCAPS_SYSTEMMEMORY;
TRACE("ddraw %p, surface_desc %p, surface %p, outer_unknown %p.\n", ddraw, DDSD, Surf, UnkOuter);
......@@ -2850,34 +2852,34 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
desc2.u4.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT); /* Just to be sure */
/* Get the video mode from WineD3D - we will need it */
hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &Mode);
hr = wined3d_device_get_display_mode(ddraw->wined3d_device, 0, &mode);
if (FAILED(hr))
{
ERR("Failed to read display mode from wined3d\n");
switch(ddraw->orig_bpp)
{
case 8:
Mode.Format = WINED3DFMT_P8_UINT;
mode.format_id = WINED3DFMT_P8_UINT;
break;
case 15:
Mode.Format = WINED3DFMT_B5G5R5X1_UNORM;
mode.format_id = WINED3DFMT_B5G5R5X1_UNORM;
break;
case 16:
Mode.Format = WINED3DFMT_B5G6R5_UNORM;
mode.format_id = WINED3DFMT_B5G6R5_UNORM;
break;
case 24:
Mode.Format = WINED3DFMT_B8G8R8_UNORM;
mode.format_id = WINED3DFMT_B8G8R8_UNORM;
break;
case 32:
Mode.Format = WINED3DFMT_B8G8R8X8_UNORM;
mode.format_id = WINED3DFMT_B8G8R8X8_UNORM;
break;
}
Mode.Width = ddraw->orig_width;
Mode.Height = ddraw->orig_height;
mode.width = ddraw->orig_width;
mode.height = ddraw->orig_height;
}
/* No pixelformat given? Use the current screen format */
......@@ -2886,7 +2888,7 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
desc2.dwFlags |= DDSD_PIXELFORMAT;
desc2.u4.ddpfPixelFormat.dwSize=sizeof(DDPIXELFORMAT);
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, Mode.Format);
PixelFormat_WineD3DtoDD(&desc2.u4.ddpfPixelFormat, mode.format_id);
}
/* No Width or no Height? Use the original screen size
......@@ -2904,8 +2906,8 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
}
desc2.dwFlags |= DDSD_WIDTH | DDSD_HEIGHT;
desc2.dwWidth = Mode.Width;
desc2.dwHeight = Mode.Height;
desc2.dwWidth = mode.width;
desc2.dwHeight = mode.height;
}
if (!desc2.dwWidth || !desc2.dwHeight)
......@@ -4544,7 +4546,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
LPD3DENUMPIXELFORMATSCALLBACK callback, void *context)
{
IDirectDrawImpl *This = impl_from_IDirect3D7(iface);
WINED3DDISPLAYMODE d3ddm;
struct wined3d_display_mode mode;
WINED3DDEVTYPE type;
unsigned int i;
HRESULT hr;
......@@ -4602,11 +4604,11 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
* not like that we'll have to find some workaround, like iterating over
* all imaginable formats and collecting all the depth stencil formats we
* can get. */
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &d3ddm);
hr = wined3d_device_get_display_mode(This->wined3d_device, 0, &mode);
for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i)
{
hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, d3ddm.Format,
hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, mode.format_id,
WINED3DUSAGE_DEPTHSTENCIL, WINED3DRTYPE_SURFACE, formats[i], SURFACE_OPENGL);
if (SUCCEEDED(hr))
{
......@@ -4631,7 +4633,7 @@ static HRESULT WINAPI d3d7_EnumZBufferFormats(IDirect3D7 *iface, REFCLSID device
* while others used dwZBufferBitDepth=32. In either case the pitch matches a 32 bits per
* pixel format, so we use dwZBufferBitDepth=32. Some games expect 24. Windows Vista and
* newer enumerate both versions, so we do the same(bug 22434) */
hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, d3ddm.Format,
hr = wined3d_check_device_format(This->wineD3D, WINED3DADAPTER_DEFAULT, type, mode.format_id,
WINED3DUSAGE_DEPTHSTENCIL, WINED3DRTYPE_SURFACE, WINED3DFMT_X8D24_UNORM, SURFACE_OPENGL);
if (SUCCEEDED(hr))
{
......
......@@ -1053,8 +1053,8 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
void *Arg)
{
IDirect3DDeviceImpl *This = impl_from_IDirect3DDevice7(iface);
struct wined3d_display_mode mode;
HRESULT hr;
WINED3DDISPLAYMODE mode;
unsigned int i;
static const enum wined3d_format_id FormatList[] =
......@@ -1107,7 +1107,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
{
hr = wined3d_check_device_format(This->ddraw->wineD3D, WINED3DADAPTER_DEFAULT, WINED3DDEVTYPE_HAL,
mode.Format, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK)
{
DDPIXELFORMAT pformat;
......@@ -1130,7 +1130,7 @@ IDirect3DDeviceImpl_7_EnumTextureFormats(IDirect3DDevice7 *iface,
for (i = 0; i < sizeof(BumpFormatList) / sizeof(*BumpFormatList); ++i)
{
hr = wined3d_check_device_format(This->ddraw->wineD3D, WINED3DADAPTER_DEFAULT,
WINED3DDEVTYPE_HAL, mode.Format, WINED3DUSAGE_QUERY_LEGACYBUMPMAP,
WINED3DDEVTYPE_HAL, mode.format_id, WINED3DUSAGE_QUERY_LEGACYBUMPMAP,
WINED3DRTYPE_TEXTURE, BumpFormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK)
{
......@@ -1205,9 +1205,9 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
void *Arg)
{
IDirect3DDeviceImpl *This = impl_from_IDirect3DDevice2(iface);
struct wined3d_display_mode mode;
HRESULT hr;
unsigned int i;
WINED3DDISPLAYMODE mode;
static const enum wined3d_format_id FormatList[] =
{
......@@ -1246,7 +1246,7 @@ IDirect3DDeviceImpl_2_EnumTextureFormats(IDirect3DDevice2 *iface,
for (i = 0; i < sizeof(FormatList) / sizeof(*FormatList); ++i)
{
hr = wined3d_check_device_format(This->ddraw->wineD3D, 0, WINED3DDEVTYPE_HAL,
mode.Format, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
mode.format_id, 0, WINED3DRTYPE_TEXTURE, FormatList[i], SURFACE_OPENGL);
if (hr == D3D_OK)
{
DDSURFACEDESC sdesc;
......
......@@ -160,7 +160,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
for (i = 0; i < *mode_count; ++i)
{
WINED3DDISPLAYMODE mode;
struct wined3d_display_mode mode;
HRESULT hr;
hr = wined3d_enum_adapter_modes(wined3d, This->adapter->ordinal, wined3d_format, i, &mode);
......@@ -172,9 +172,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *ifa
return hr;
}
desc[i].Width = mode.Width;
desc[i].Height = mode.Height;
desc[i].RefreshRate.Numerator = mode.RefreshRate;
desc[i].Width = mode.width;
desc[i].Height = mode.height;
desc[i].RefreshRate.Numerator = mode.refresh_rate;
desc[i].RefreshRate.Denominator = 1;
desc[i].Format = format;
desc[i].ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; /* FIXME */
......
......@@ -1586,16 +1586,16 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
}
HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
UINT swapchain_idx, const WINED3DDISPLAYMODE *mode)
UINT swapchain_idx, const struct wined3d_display_mode *mode)
{
struct wined3d_adapter *adapter = device->adapter;
const struct wined3d_format *format = wined3d_get_format(&adapter->gl_info, mode->Format);
const struct wined3d_format *format = wined3d_get_format(&adapter->gl_info, mode->format_id);
DEVMODEW devmode;
LONG ret;
RECT clip_rc;
TRACE("device %p, swapchain_idx %u, mode %p (%ux%u@%u %s).\n", device, swapchain_idx, mode,
mode->Width, mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format));
mode->width, mode->height, mode->refresh_rate, debug_d3dformat(mode->format_id));
/* Resize the screen even without a window:
* The app could have unset it with SetCooperativeLevel, but not called
......@@ -1607,16 +1607,16 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
devmode.dmSize = sizeof(devmode);
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmBitsPerPel = format->byte_count * CHAR_BIT;
devmode.dmPelsWidth = mode->Width;
devmode.dmPelsHeight = mode->Height;
devmode.dmPelsWidth = mode->width;
devmode.dmPelsHeight = mode->height;
devmode.dmDisplayFrequency = mode->RefreshRate;
if (mode->RefreshRate)
devmode.dmDisplayFrequency = mode->refresh_rate;
if (mode->refresh_rate)
devmode.dmFields |= DM_DISPLAYFREQUENCY;
/* Only change the mode if necessary */
if (adapter->screen_size.cx == mode->Width && adapter->screen_size.cy == mode->Height
&& adapter->screen_format == mode->Format && !mode->RefreshRate)
if (adapter->screen_size.cx == mode->width && adapter->screen_size.cy == mode->height
&& adapter->screen_format == mode->format_id && !mode->refresh_rate)
return WINED3D_OK;
ret = ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL);
......@@ -1635,12 +1635,12 @@ HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device,
}
/* Store the new values */
adapter->screen_size.cx = mode->Width;
adapter->screen_size.cy = mode->Height;
adapter->screen_format = mode->Format;
adapter->screen_size.cx = mode->width;
adapter->screen_size.cy = mode->height;
adapter->screen_format = mode->format_id;
/* And finally clip mouse to our screen */
SetRect(&clip_rc, 0, 0, mode->Width, mode->Height);
SetRect(&clip_rc, 0, 0, mode->width, mode->height);
ClipCursor(&clip_rc);
return WINED3D_OK;
......@@ -3882,7 +3882,7 @@ HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device
}
HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *device,
UINT swapchain_idx, WINED3DDISPLAYMODE *mode)
UINT swapchain_idx, struct wined3d_display_mode *mode)
{
struct wined3d_swapchain *swapchain;
HRESULT hr;
......@@ -3909,10 +3909,10 @@ HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *devic
*
* Also don't relay to the swapchain because with ddraw it's possible
* that there isn't a swapchain at all. */
mode->Width = adapter->screen_size.cx;
mode->Height = adapter->screen_size.cy;
mode->Format = adapter->screen_format;
mode->RefreshRate = 0;
mode->width = adapter->screen_size.cx;
mode->height = adapter->screen_size.cy;
mode->format_id = adapter->screen_format;
mode->refresh_rate = 0;
hr = WINED3D_OK;
}
......@@ -5269,8 +5269,8 @@ static HRESULT updateSurfaceDesc(struct wined3d_surface *surface,
static BOOL is_display_mode_supported(const struct wined3d_device *device, const WINED3DPRESENT_PARAMETERS *pp)
{
struct wined3d_display_mode m;
UINT i, count;
WINED3DDISPLAYMODE m;
HRESULT hr;
/* All Windowed modes are supported, as is leaving the current mode */
......@@ -5285,7 +5285,7 @@ static BOOL is_display_mode_supported(const struct wined3d_device *device, const
hr = wined3d_enum_adapter_modes(device->wined3d, device->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m);
if (FAILED(hr))
ERR("Failed to enumerate adapter mode.\n");
if (m.Width == pp->BackBufferWidth && m.Height == pp->BackBufferHeight)
if (m.width == pp->BackBufferWidth && m.height == pp->BackBufferHeight)
/* Mode found, it is supported. */
return TRUE;
}
......@@ -5416,9 +5416,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
{
struct wined3d_resource *resource, *cursor;
struct wined3d_swapchain *swapchain;
struct wined3d_display_mode mode;
BOOL DisplayModeChanged = FALSE;
BOOL update_desc = FALSE;
WINED3DDISPLAYMODE mode;
unsigned int i;
HRESULT hr;
......@@ -5544,17 +5544,17 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
if (present_parameters->Windowed)
{
mode.Width = swapchain->orig_width;
mode.Height = swapchain->orig_height;
mode.RefreshRate = 0;
mode.Format = swapchain->presentParms.BackBufferFormat;
mode.width = swapchain->orig_width;
mode.height = swapchain->orig_height;
mode.refresh_rate = 0;
mode.format_id = swapchain->presentParms.BackBufferFormat;
}
else
{
mode.Width = present_parameters->BackBufferWidth;
mode.Height = present_parameters->BackBufferHeight;
mode.RefreshRate = present_parameters->FullScreen_RefreshRateInHz;
mode.Format = swapchain->presentParms.BackBufferFormat;
mode.width = present_parameters->BackBufferWidth;
mode.height = present_parameters->BackBufferHeight;
mode.refresh_rate = present_parameters->FullScreen_RefreshRateInHz;
mode.format_id = swapchain->presentParms.BackBufferFormat;
}
/* Should Width == 800 && Height == 0 set 800x600? */
......@@ -5893,9 +5893,9 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
{
struct wined3d_adapter *adapter = &wined3d->adapters[adapter_idx];
const struct fragment_pipeline *fragment_pipeline;
struct wined3d_display_mode mode;
struct shader_caps shader_caps;
struct fragment_caps ffp_caps;
WINED3DDISPLAYMODE mode;
unsigned int i;
HRESULT hr;
......@@ -5916,9 +5916,9 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d,
wined3d_decref(device->wined3d);
return hr;
}
adapter->screen_size.cx = mode.Width;
adapter->screen_size.cy = mode.Height;
adapter->screen_format = mode.Format;
adapter->screen_size.cx = mode.width;
adapter->screen_size.cy = mode.height;
adapter->screen_format = mode.format_id;
/* Save the creation parameters. */
device->createParms.AdapterOrdinal = adapter_idx;
......
......@@ -2903,7 +2903,7 @@ UINT CDECL wined3d_get_adapter_mode_count(const struct wined3d *wined3d, UINT ad
/* Note: dx9 supplies a format. Calls from d3d8 supply WINED3DFMT_UNKNOWN */
HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_format_id format_id, UINT mode_idx, WINED3DDISPLAYMODE *mode)
enum wined3d_format_id format_id, UINT mode_idx, struct wined3d_display_mode *mode)
{
TRACE_(d3d_caps)("wined3d %p, adapter_idx %u, format %s, mode_idx %u, mode %p.\n",
wined3d, adapter_idx, debug_d3dformat(format_id), mode_idx, mode);
......@@ -2954,16 +2954,16 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
/* Now get the display mode via the calculated index */
if (EnumDisplaySettingsExW(NULL, ModeIdx, &DevModeW, 0))
{
mode->Width = DevModeW.dmPelsWidth;
mode->Height = DevModeW.dmPelsHeight;
mode->RefreshRate = DEFAULT_REFRESH_RATE;
mode->width = DevModeW.dmPelsWidth;
mode->height = DevModeW.dmPelsHeight;
mode->refresh_rate = DEFAULT_REFRESH_RATE;
if (DevModeW.dmFields & DM_DISPLAYFREQUENCY)
mode->RefreshRate = DevModeW.dmDisplayFrequency;
mode->refresh_rate = DevModeW.dmDisplayFrequency;
if (format_id == WINED3DFMT_UNKNOWN)
mode->Format = pixelformat_for_depth(DevModeW.dmBitsPerPel);
mode->format_id = pixelformat_for_depth(DevModeW.dmBitsPerPel);
else
mode->Format = format_id;
mode->format_id = format_id;
}
else
{
......@@ -2972,8 +2972,8 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
}
TRACE_(d3d_caps)("W %d H %d rr %d fmt (%x - %s) bpp %u\n",
mode->Width, mode->Height, mode->RefreshRate, mode->Format,
debug_d3dformat(mode->Format), DevModeW.dmBitsPerPel);
mode->width, mode->height, mode->refresh_rate, mode->format_id,
debug_d3dformat(mode->format_id), DevModeW.dmBitsPerPel);
}
else
{
......@@ -2984,7 +2984,7 @@ HRESULT CDECL wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT ada
}
HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDISPLAYMODE *mode)
struct wined3d_display_mode *mode)
{
TRACE("wined3d %p, adapter_idx %u, display_mode %p.\n", wined3d, adapter_idx, mode);
......@@ -3000,21 +3000,21 @@ HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UI
DevModeW.dmSize = sizeof(DevModeW);
EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &DevModeW, 0);
mode->Width = DevModeW.dmPelsWidth;
mode->Height = DevModeW.dmPelsHeight;
mode->width = DevModeW.dmPelsWidth;
mode->height = DevModeW.dmPelsHeight;
bpp = DevModeW.dmBitsPerPel;
mode->RefreshRate = DEFAULT_REFRESH_RATE;
if (DevModeW.dmFields&DM_DISPLAYFREQUENCY)
mode->RefreshRate = DevModeW.dmDisplayFrequency;
mode->Format = pixelformat_for_depth(bpp);
mode->refresh_rate = DEFAULT_REFRESH_RATE;
if (DevModeW.dmFields & DM_DISPLAYFREQUENCY)
mode->refresh_rate = DevModeW.dmDisplayFrequency;
mode->format_id = pixelformat_for_depth(bpp);
}
else
{
FIXME_(d3d_caps)("Adapter not primary display\n");
}
TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", mode->Width,
mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format));
TRACE_(d3d_caps)("returning w:%d, h:%d, ref:%d, fmt:%s\n", mode->width,
mode->height, mode->refresh_rate, debug_d3dformat(mode->format_id));
return WINED3D_OK;
}
......
......@@ -29,7 +29,7 @@ WINE_DECLARE_DEBUG_CHANNEL(fps);
/* Do not call while under the GL lock. */
static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
{
WINED3DDISPLAYMODE mode;
struct wined3d_display_mode mode;
UINT i;
TRACE("Destroying swapchain %p.\n", swapchain);
......@@ -74,10 +74,10 @@ static void swapchain_cleanup(struct wined3d_swapchain *swapchain)
* orig_height will be equal to the modes in the presentation params. */
if (!swapchain->presentParms.Windowed && swapchain->presentParms.AutoRestoreDisplayMode)
{
mode.Width = swapchain->orig_width;
mode.Height = swapchain->orig_height;
mode.RefreshRate = 0;
mode.Format = swapchain->orig_fmt;
mode.width = swapchain->orig_width;
mode.height = swapchain->orig_height;
mode.refresh_rate = 0;
mode.format_id = swapchain->orig_fmt;
wined3d_device_set_display_mode(swapchain->device, 0, &mode);
}
......@@ -221,7 +221,8 @@ HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain
return WINED3DERR_INVALIDCALL;
}
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, WINED3DDISPLAYMODE *mode)
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain,
struct wined3d_display_mode *mode)
{
HRESULT hr;
......@@ -230,7 +231,7 @@ HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain
hr = wined3d_get_adapter_display_mode(swapchain->device->wined3d, swapchain->device->adapter->ordinal, mode);
TRACE("Returning w %u, h %u, refresh rate %u, format %s.\n",
mode->Width, mode->Height, mode->RefreshRate, debug_d3dformat(mode->Format));
mode->width, mode->height, mode->refresh_rate, debug_d3dformat(mode->format_id));
return hr;
}
......@@ -828,8 +829,8 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
{
const struct wined3d_adapter *adapter = device->adapter;
const struct wined3d_format *format;
struct wined3d_display_mode mode;
BOOL displaymode_set = FALSE;
WINED3DDISPLAYMODE mode;
RECT client_rect;
HWND window;
HRESULT hr;
......@@ -873,10 +874,10 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
swapchain->device_window = window;
wined3d_get_adapter_display_mode(device->wined3d, adapter->ordinal, &mode);
swapchain->orig_width = mode.Width;
swapchain->orig_height = mode.Height;
swapchain->orig_fmt = mode.Format;
format = wined3d_get_format(&adapter->gl_info, mode.Format);
swapchain->orig_width = mode.width;
swapchain->orig_height = mode.height;
swapchain->orig_fmt = mode.format_id;
format = wined3d_get_format(&adapter->gl_info, mode.format_id);
GetClientRect(window, &client_rect);
if (present_parameters->Windowed
......@@ -929,13 +930,13 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY
if (!present_parameters->Windowed)
{
WINED3DDISPLAYMODE mode;
struct wined3d_display_mode mode;
/* Change the display settings */
mode.Width = present_parameters->BackBufferWidth;
mode.Height = present_parameters->BackBufferHeight;
mode.Format = present_parameters->BackBufferFormat;
mode.RefreshRate = present_parameters->FullScreen_RefreshRateInHz;
mode.width = present_parameters->BackBufferWidth;
mode.height = present_parameters->BackBufferHeight;
mode.format_id = present_parameters->BackBufferFormat;
mode.refresh_rate = present_parameters->FullScreen_RefreshRateInHz;
hr = wined3d_device_set_display_mode(device, 0, &mode);
if (FAILED(hr))
......
......@@ -1509,13 +1509,13 @@ enum wined3d_sysval_semantic
#define WINEDDPCAPS_2BIT 0x00000200
#define WINEDDPCAPS_ALPHA 0x00000400
typedef struct _WINED3DDISPLAYMODE
struct wined3d_display_mode
{
UINT Width;
UINT Height;
UINT RefreshRate;
enum wined3d_format_id Format;
} WINED3DDISPLAYMODE;
UINT width;
UINT height;
UINT refresh_rate;
enum wined3d_format_id format_id;
};
struct wined3d_color
{
......@@ -2121,10 +2121,10 @@ HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT ad
struct wined3d * __cdecl wined3d_create(UINT dxVersion, DWORD flags, void *parent);
ULONG __cdecl wined3d_decref(struct wined3d *wined3d);
HRESULT __cdecl wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_format_id format_id, UINT mode_idx, WINED3DDISPLAYMODE *mode);
enum wined3d_format_id format_id, UINT mode_idx, struct wined3d_display_mode *mode);
UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d);
HRESULT __cdecl wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx,
WINED3DDISPLAYMODE *mode);
struct wined3d_display_mode *mode);
HRESULT __cdecl wined3d_get_adapter_identifier(const struct wined3d *wined3d, UINT adapter_idx,
DWORD flags, WINED3DADAPTER_IDENTIFIER *identifier);
UINT __cdecl wined3d_get_adapter_mode_count(const struct wined3d *wined3d,
......@@ -2207,7 +2207,7 @@ HRESULT __cdecl wined3d_device_get_depth_stencil(const struct wined3d_device *de
struct wined3d_surface **depth_stencil);
HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);
HRESULT __cdecl wined3d_device_get_display_mode(const struct wined3d_device *device,
UINT swapchain_idx, WINED3DDISPLAYMODE *mode);
UINT swapchain_idx, struct wined3d_display_mode *mode);
HRESULT __cdecl wined3d_device_get_front_buffer_data(const struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_surface *dst_surface);
void __cdecl wined3d_device_get_gamma_ramp(const struct wined3d_device *device,
......@@ -2287,7 +2287,7 @@ HRESULT __cdecl wined3d_device_set_cursor_properties(struct wined3d_device *devi
HRESULT __cdecl wined3d_device_set_depth_stencil(struct wined3d_device *device, struct wined3d_surface *depth_stencil);
HRESULT __cdecl wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs);
HRESULT __cdecl wined3d_device_set_display_mode(struct wined3d_device *device,
UINT swapchain_idx, const WINED3DDISPLAYMODE *mode);
UINT swapchain_idx, const struct wined3d_display_mode *mode);
void __cdecl wined3d_device_set_gamma_ramp(const struct wined3d_device *device,
UINT swapchain_idx, DWORD flags, const WINED3DGAMMARAMP *ramp);
HRESULT __cdecl wined3d_device_set_index_buffer(struct wined3d_device *device,
......@@ -2451,7 +2451,7 @@ HRESULT __cdecl wined3d_swapchain_get_back_buffer(const struct wined3d_swapchain
UINT backbuffer_idx, WINED3DBACKBUFFER_TYPE backbuffer_type, struct wined3d_surface **backbuffer);
struct wined3d_device * __cdecl wined3d_swapchain_get_device(const struct wined3d_swapchain *swapchain);
HRESULT __cdecl wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain,
WINED3DDISPLAYMODE *mode);
struct wined3d_display_mode *mode);
HRESULT __cdecl wined3d_swapchain_get_front_buffer_data(const struct wined3d_swapchain *swapchain,
struct wined3d_surface *dst_surface);
HRESULT __cdecl wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain,
......
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