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);
......
......@@ -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