wined3d: Remove the version parameter.

This commit is contained in:
Stefan Dösinger 2014-03-20 15:51:45 +01:00 committed by Alexandre Julliard
parent d3c9e8a7e6
commit 938529e1f9
10 changed files with 15 additions and 17 deletions

View File

@ -410,7 +410,7 @@ BOOL d3d8_init(struct d3d8 *d3d8)
d3d8->refcount = 1;
wined3d_mutex_lock();
d3d8->wined3d = wined3d_create(8, flags);
d3d8->wined3d = wined3d_create(flags);
wined3d_mutex_unlock();
if (!d3d8->wined3d)
return FALSE;

View File

@ -644,7 +644,7 @@ BOOL d3d9_init(struct d3d9 *d3d9, BOOL extended)
d3d9->refcount = 1;
wined3d_mutex_lock();
d3d9->wined3d = wined3d_create(9, flags);
d3d9->wined3d = wined3d_create(flags);
wined3d_mutex_unlock();
if (!d3d9->wined3d)
return FALSE;

View File

@ -4871,9 +4871,9 @@ HRESULT ddraw_init(struct ddraw *ddraw, enum wined3d_device_type device_type)
ddraw->ref7 = 1;
flags = WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING;
if (!(ddraw->wined3d = wined3d_create(7, flags)))
if (!(ddraw->wined3d = wined3d_create(flags)))
{
if (!(ddraw->wined3d = wined3d_create(7, flags | WINED3D_NO3D)))
if (!(ddraw->wined3d = wined3d_create(flags | WINED3D_NO3D)))
{
WARN("Failed to create a wined3d object.\n");
return E_FAIL;

View File

@ -408,9 +408,9 @@ HRESULT WINAPI DirectDrawEnumerateExA(LPDDENUMCALLBACKEXA callback, void *contex
FIXME("flags 0x%08x not handled\n", flags & ~DDENUM_ATTACHEDSECONDARYDEVICES);
TRACE("Enumerating ddraw interfaces\n");
if (!(wined3d = wined3d_create(7, WINED3D_LEGACY_DEPTH_BIAS)))
if (!(wined3d = wined3d_create(WINED3D_LEGACY_DEPTH_BIAS)))
{
if (!(wined3d = wined3d_create(7, WINED3D_LEGACY_DEPTH_BIAS | WINED3D_NO3D)))
if (!(wined3d = wined3d_create(WINED3D_LEGACY_DEPTH_BIAS | WINED3D_NO3D)))
{
WARN("Failed to create a wined3d object.\n");
return E_FAIL;

View File

@ -329,7 +329,7 @@ static HRESULT dxgi_factory_init(struct dxgi_factory *factory, BOOL extended)
factory->refcount = 1;
EnterCriticalSection(&dxgi_cs);
factory->wined3d = wined3d_create(10, 0);
factory->wined3d = wined3d_create(0);
if (!factory->wined3d)
{
LeaveCriticalSection(&dxgi_cs);

View File

@ -5204,9 +5204,8 @@ const struct wined3d_parent_ops wined3d_null_parent_ops =
wined3d_null_wined3d_object_destroyed,
};
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, DWORD flags)
HRESULT wined3d_init(struct wined3d *wined3d, DWORD flags)
{
wined3d->dxVersion = version;
wined3d->ref = 1;
wined3d->flags = flags;

View File

@ -6,7 +6,7 @@
@ cdecl wined3d_check_device_format_conversion(ptr long long long long)
@ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr)
@ cdecl wined3d_check_device_type(ptr long long long long long)
@ cdecl wined3d_create(long long)
@ cdecl wined3d_create(long)
@ cdecl wined3d_decref(ptr)
@ cdecl wined3d_enum_adapter_modes(ptr long long long long ptr)
@ cdecl wined3d_get_adapter_count(ptr)

View File

@ -87,7 +87,7 @@ struct wined3d_settings wined3d_settings =
FALSE, /* 3D support enabled by default. */
};
struct wined3d * CDECL wined3d_create(UINT version, DWORD flags)
struct wined3d * CDECL wined3d_create(DWORD flags)
{
struct wined3d *object;
HRESULT hr;
@ -99,10 +99,10 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags)
return NULL;
}
if (version == 7 && wined3d_settings.no_3d)
if (wined3d_settings.no_3d)
flags |= WINED3D_NO3D;
hr = wined3d_init(object, version, flags);
hr = wined3d_init(object, flags);
if (FAILED(hr))
{
WARN("Failed to initialize wined3d object, hr %#x.\n", hr);
@ -110,7 +110,7 @@ struct wined3d * CDECL wined3d_create(UINT version, DWORD flags)
return NULL;
}
TRACE("Created wined3d object %p for d3d%d support.\n", object, version);
TRACE("Created wined3d object %p.\n", object);
return object;
}

View File

@ -1785,12 +1785,11 @@ struct wined3d
{
LONG ref;
DWORD flags;
UINT dxVersion;
UINT adapter_count;
struct wined3d_adapter adapters[1];
};
HRESULT wined3d_init(struct wined3d *wined3d, UINT version, DWORD flags) DECLSPEC_HIDDEN;
HRESULT wined3d_init(struct wined3d *wined3d, DWORD flags) DECLSPEC_HIDDEN;
BOOL wined3d_register_window(HWND window, struct wined3d_device *device) DECLSPEC_HIDDEN;
void wined3d_unregister_window(HWND window) DECLSPEC_HIDDEN;

View File

@ -2024,7 +2024,7 @@ HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wine
HRESULT __cdecl wined3d_check_device_type(const struct wined3d *wined3d, UINT adapter_idx,
enum wined3d_device_type device_type, enum wined3d_format_id display_format_id,
enum wined3d_format_id backbuffer_format_id, BOOL windowed);
struct wined3d * __cdecl wined3d_create(UINT version, DWORD flags);
struct wined3d * __cdecl wined3d_create(DWORD flags);
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, enum wined3d_scanline_ordering scanline_ordering,