A couple of more files.
From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/wined3d/vertexdeclaration.c | 10 +++++----- include/wine/wined3d.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index cc18d2ea9ec..befd0a934f9 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -323,7 +323,7 @@ static void append_decl_element(struct wined3d_fvf_convert_state *state, }
static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *adapter, - DWORD fvf, struct wined3d_vertex_element **elements) + uint32_t fvf, struct wined3d_vertex_element **elements) { BOOL has_pos = !!(fvf & WINED3DFVF_POSITION_MASK); BOOL has_blend = (fvf & WINED3DFVF_XYZB5) > WINED3DFVF_XYZRHW; @@ -336,12 +336,12 @@ static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *ada BOOL has_diffuse = !!(fvf & WINED3DFVF_DIFFUSE); BOOL has_specular = !!(fvf & WINED3DFVF_SPECULAR);
- DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; - DWORD texcoords = (fvf & 0xffff0000) >> 16; + unsigned int num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; + unsigned int texcoords = (fvf & 0xffff0000) >> 16; struct wined3d_fvf_convert_state state; unsigned int size; unsigned int idx; - DWORD num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); + unsigned int num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); if (has_blend_idx) num_blends--;
/* Compute declaration size */ @@ -434,7 +434,7 @@ static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *ada }
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, - DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + uint32_t fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration) { struct wined3d_vertex_element *elements; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index ae0bc309b3f..70ab06209d5 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2885,7 +2885,7 @@ HRESULT __cdecl wined3d_vertex_declaration_create(struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration); HRESULT __cdecl wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, - DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + uint32_t fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration); ULONG __cdecl wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration); void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex_declaration *declaration);
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/vertexdeclaration.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index befd0a934f9..e1aaf6dc9bc 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -21,7 +21,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_NO_LONG_TYPES /* temporary */
#include "wined3d_private.h"
@@ -280,7 +279,7 @@ HRESULT CDECL wined3d_vertex_declaration_create(struct wined3d_device *device, hr = vertexdeclaration_init(object, device, elements, element_count, parent, parent_ops); if (FAILED(hr)) { - WARN("Failed to initialize vertex declaration, hr %#x.\n", hr); + WARN("Failed to initialize vertex declaration, hr %#lx.\n", hr); heap_free(object); return hr; }
From: Eric Pouech eric.pouech@gmail.com
Signed-off-by: Eric Pouech eric.pouech@gmail.com --- dlls/wined3d/palette.c | 4 ++-- include/wine/wined3d.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index 40e2b6c7941..1c18ca4dbbc 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -57,7 +57,7 @@ ULONG CDECL wined3d_palette_decref(struct wined3d_palette *palette) }
HRESULT CDECL wined3d_palette_get_entries(const struct wined3d_palette *palette, - uint32_t flags, DWORD start, DWORD count, PALETTEENTRY *entries) + uint32_t flags, unsigned int start, unsigned int count, PALETTEENTRY *entries) { unsigned int i; TRACE("palette %p, flags %#x, start %u, count %u, entries %p.\n", @@ -96,7 +96,7 @@ void CDECL wined3d_palette_apply_to_dc(const struct wined3d_palette *palette, HD }
HRESULT CDECL wined3d_palette_set_entries(struct wined3d_palette *palette, - uint32_t flags, DWORD start, DWORD count, const PALETTEENTRY *entries) + uint32_t flags, unsigned int start, unsigned int count, const PALETTEENTRY *entries) { unsigned int i;
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 70ab06209d5..1660b424441 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2567,11 +2567,11 @@ HRESULT __cdecl wined3d_palette_create(struct wined3d_device *device, uint32_t f unsigned int entry_count, const PALETTEENTRY *entries, struct wined3d_palette **palette); ULONG __cdecl wined3d_palette_decref(struct wined3d_palette *palette); HRESULT __cdecl wined3d_palette_get_entries(const struct wined3d_palette *palette, - uint32_t flags, DWORD start, DWORD count, PALETTEENTRY *entries); + uint32_t flags, unsigned int start, unsigned int count, PALETTEENTRY *entries); void __cdecl wined3d_palette_apply_to_dc(const struct wined3d_palette *palette, HDC dc); ULONG __cdecl wined3d_palette_incref(struct wined3d_palette *palette); HRESULT __cdecl wined3d_palette_set_entries(struct wined3d_palette *palette, - uint32_t flags, DWORD start, DWORD count, const PALETTEENTRY *entries); + uint32_t flags, unsigned int start, unsigned int count, const PALETTEENTRY *entries);
HRESULT __cdecl wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query);
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/palette.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/palette.c b/dlls/wined3d/palette.c index 1c18ca4dbbc..96e3fec57e1 100644 --- a/dlls/wined3d/palette.c +++ b/dlls/wined3d/palette.c @@ -18,7 +18,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_NO_LONG_TYPES /* temporary */
#include "wined3d_private.h"
@@ -152,7 +151,7 @@ static HRESULT wined3d_palette_init(struct wined3d_palette *palette, struct wine
if (FAILED(hr = wined3d_palette_set_entries(palette, 0, 0, entry_count, entries))) { - WARN("Failed to set palette entries, hr %#x.\n", hr); + WARN("Failed to set palette entries, hr %#lx.\n", hr); return hr; }
@@ -173,7 +172,7 @@ HRESULT CDECL wined3d_palette_create(struct wined3d_device *device, uint32_t fla
if (FAILED(hr = wined3d_palette_init(object, device, flags, entry_count, entries))) { - WARN("Failed to initialize palette, hr %#x.\n", hr); + WARN("Failed to initialize palette, hr %#lx.\n", hr); heap_free(object); return hr; }
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/directx.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index e0f8cca2845..9d7c4769cb8 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -20,7 +20,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_NO_LONG_TYPES /* temporary */
#include "wined3d_private.h" #include "winternl.h" @@ -110,7 +109,7 @@ HRESULT CDECL wined3d_output_take_ownership(const struct wined3d_output *output, case STATUS_SUCCESS: return S_OK; default: - FIXME("Unhandled error %#x.\n", status); + FIXME("Unhandled error %#lx.\n", status); return E_FAIL; } } @@ -725,7 +724,7 @@ bool wined3d_driver_info_init(struct wined3d_driver_info *driver_info, } else { - TRACE("OS version %u.%u.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); + TRACE("OS version %lu.%lu.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); switch (os_version.dwMajorVersion) { case 2: @@ -763,7 +762,7 @@ bool wined3d_driver_info_init(struct wined3d_driver_info *driver_info, { if (os_version.dwMinorVersion > 3) { - FIXME("Unhandled OS version %u.%u, reporting Windows 8.1.\n", + FIXME("Unhandled OS version %lu.%lu, reporting Windows 8.1.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); } driver_os_version = 10; @@ -777,7 +776,7 @@ bool wined3d_driver_info_init(struct wined3d_driver_info *driver_info, break;
default: - FIXME("Unhandled OS version %u.%u, reporting Windows 7.\n", + FIXME("Unhandled OS version %lu.%lu, reporting Windows 7.\n", os_version.dwMajorVersion, os_version.dwMinorVersion); driver_os_version = 8; driver_model = DRIVER_MODEL_NT6X; @@ -1532,7 +1531,7 @@ HRESULT CDECL wined3d_output_get_display_mode(const struct wined3d_output *outpu *rotation = WINED3D_DISPLAY_ROTATION_270; break; default: - FIXME("Unhandled display rotation %#x.\n", m.u1.s2.dmDisplayOrientation); + FIXME("Unhandled display rotation %#lx.\n", m.u1.s2.dmDisplayOrientation); *rotation = WINED3D_DISPLAY_ROTATION_UNSPECIFIED; break; } @@ -1623,7 +1622,7 @@ HRESULT CDECL wined3d_restore_display_modes(struct wined3d *wined3d) ret = ChangeDisplaySettingsExW(NULL, NULL, NULL, 0, NULL); if (ret != DISP_CHANGE_SUCCESSFUL) { - ERR("Failed to restore all outputs to their registry display settings, error %d.\n", ret); + ERR("Failed to restore all outputs to their registry display settings, error %ld.\n", ret); return WINED3DERR_NOTAVAILABLE; } } @@ -2911,7 +2910,7 @@ static HRESULT adapter_no3d_create_device(struct wined3d *wined3d, const struct if (FAILED(hr = wined3d_device_init(&device_no3d->d, wined3d, adapter->ordinal, device_type, focus_window, flags, surface_alignment, levels, level_count, adapter->gl_info.supported, device_parent))) { - WARN("Failed to initialize device, hr %#x.\n", hr); + WARN("Failed to initialize device, hr %#lx.\n", hr); heap_free(device_no3d); return hr; } @@ -3071,7 +3070,7 @@ static HRESULT adapter_no3d_create_swapchain(struct wined3d_device *device, if (FAILED(hr = wined3d_swapchain_no3d_init(swapchain_no3d, device, desc, state_parent, parent, parent_ops))) { - WARN("Failed to initialise swapchain, hr %#x.\n", hr); + WARN("Failed to initialise swapchain, hr %#lx.\n", hr); heap_free(swapchain_no3d); return hr; } @@ -3103,7 +3102,7 @@ static HRESULT adapter_no3d_create_buffer(struct wined3d_device *device,
if (FAILED(hr = wined3d_buffer_no3d_init(buffer_no3d, device, desc, data, parent, parent_ops))) { - WARN("Failed to initialise buffer, hr %#x.\n", hr); + WARN("Failed to initialise buffer, hr %#lx.\n", hr); heap_free(buffer_no3d); return hr; } @@ -3149,7 +3148,7 @@ static HRESULT adapter_no3d_create_texture(struct wined3d_device *device, if (FAILED(hr = wined3d_texture_no3d_init(texture_no3d, device, desc, layer_count, level_count, flags, parent, parent_ops))) { - WARN("Failed to initialise texture, hr %#x.\n", hr); + WARN("Failed to initialise texture, hr %#lx.\n", hr); heap_free(texture_no3d); return hr; } @@ -3199,7 +3198,7 @@ static HRESULT adapter_no3d_create_rendertarget_view(const struct wined3d_view_d
if (FAILED(hr = wined3d_rendertarget_view_no3d_init(view_no3d, desc, resource, parent, parent_ops))) { - WARN("Failed to initialise view, hr %#x.\n", hr); + WARN("Failed to initialise view, hr %#lx.\n", hr); heap_free(view_no3d); return hr; } @@ -3421,7 +3420,7 @@ static BOOL wined3d_adapter_create_output(struct wined3d_adapter *adapter, const if (FAILED(hr = wined3d_output_init(&adapter->outputs[adapter->output_count], adapter->output_count, adapter, output_name))) { - ERR("Failed to initialise output %s, hr %#x.\n", wine_dbgstr_w(output_name), hr); + ERR("Failed to initialise output %s, hr %#lx.\n", wine_dbgstr_w(output_name), hr); return FALSE; }
@@ -3452,11 +3451,11 @@ BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal, WARN("Allocating a random LUID.\n"); if (!AllocateLocallyUniqueId(&adapter->luid)) { - ERR("Failed to allocate a LUID, error %#x.\n", GetLastError()); + ERR("Failed to allocate a LUID, error %#lx.\n", GetLastError()); return FALSE; } } - TRACE("adapter %p LUID %08x:%08x.\n", adapter, adapter->luid.HighPart, adapter->luid.LowPart); + TRACE("adapter %p LUID %08lx:%08lx.\n", adapter, adapter->luid.HighPart, adapter->luid.LowPart);
open_adapter_desc.AdapterLuid = adapter->luid; if (D3DKMTOpenAdapterFromLuid(&open_adapter_desc))
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/context_gl.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 689b76fe64e..65d40f05ab2 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -23,7 +23,6 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#define WINE_NO_LONG_TYPES /* temporary */
#include "wined3d_private.h"
@@ -1240,7 +1239,7 @@ static BOOL wined3d_context_gl_set_pixel_format(struct wined3d_context_gl *conte else if (!SetPixelFormat(dc, format, NULL)) { /* This may also happen if the dc belongs to a destroyed window. */ - WARN("Failed to set pixel format %d on device context %p, last error %#x.\n", + WARN("Failed to set pixel format %d on device context %p, last error %#lx.\n", format, dc, GetLastError()); return FALSE; } @@ -1273,7 +1272,7 @@ static BOOL wined3d_context_gl_set_gl_context(struct wined3d_context_gl *context
if (backup || !wglMakeCurrent(context_gl->dc, context_gl->gl_ctx)) { - WARN("Failed to make GL context %p current on device context %p, last error %#x.\n", + WARN("Failed to make GL context %p current on device context %p, last error %#lx.\n", context_gl->gl_ctx, context_gl->dc, GetLastError()); context_gl->valid = 0; WARN("Trying fallback to the backup window.\n"); @@ -1305,7 +1304,7 @@ static BOOL wined3d_context_gl_set_gl_context(struct wined3d_context_gl *context
if (!wglMakeCurrent(context_gl->dc, context_gl->gl_ctx)) { - ERR("Fallback to backup window (dc %p) failed too, last error %#x.\n", + ERR("Fallback to backup window (dc %p) failed too, last error %#lx.\n", context_gl->dc, GetLastError()); wined3d_context_gl_set_current(NULL); return FALSE; @@ -1322,7 +1321,7 @@ static void context_restore_gl_context(const struct wined3d_gl_info *gl_info, HD { if (!wglMakeCurrent(dc, gl_ctx)) { - ERR("Failed to restore GL context %p on device context %p, last error %#x.\n", + ERR("Failed to restore GL context %p on device context %p, last error %#lx.\n", gl_ctx, dc, GetLastError()); wined3d_context_gl_set_current(NULL); } @@ -1910,7 +1909,7 @@ HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, ctx_attribs[ctx_attrib_idx] = 0; } if (!(ctx = gl_info->p_wglCreateContextAttribsARB(hdc, share_ctx, ctx_attribs))) - WARN("Failed to create a WGL context with wglCreateContextAttribsARB, last error %#x.\n", + WARN("Failed to create a WGL context with wglCreateContextAttribsARB, last error %#lx.\n", GetLastError()); } } @@ -2065,10 +2064,10 @@ static BOOL wined3d_context_gl_create_wgl_ctx(struct wined3d_context_gl *context
if (share_ctx && !wglShareLists(share_ctx, ctx)) { - ERR("wglShareLists(%p, %p) failed, last error %#x.\n", share_ctx, ctx, GetLastError()); + ERR("wglShareLists(%p, %p) failed, last error %#lx.\n", share_ctx, ctx, GetLastError()); context_release(context); if (!wglDeleteContext(ctx)) - ERR("wglDeleteContext(%p) failed, last error %#x.\n", ctx, GetLastError()); + ERR("wglDeleteContext(%p) failed, last error %#lx.\n", ctx, GetLastError()); return FALSE; } } @@ -2179,7 +2178,7 @@ HRESULT wined3d_context_gl_init(struct wined3d_context_gl *context_gl, struct wi ERR("Cannot activate context to set up defaults.\n"); context_release(context); if (!wglDeleteContext(context_gl->gl_ctx)) - ERR("wglDeleteContext(%p) failed, last error %#x.\n", context_gl->gl_ctx, GetLastError()); + ERR("wglDeleteContext(%p) failed, last error %#lx.\n", context_gl->gl_ctx, GetLastError()); goto fail; }
@@ -2707,7 +2706,7 @@ void wined3d_context_gl_submit_command_fence(struct wined3d_context_gl *context_ f = &context_gl->submitted.fences[context_gl->submitted.fence_count++]; f->id = device_gl->current_fence_id; if (FAILED(hr = wined3d_fence_create(&device_gl->d, &f->fence))) - ERR("Failed to create fence, hr %#x.\n", hr); + ERR("Failed to create fence, hr %#lx.\n", hr); wined3d_fence_issue(f->fence, &device_gl->d);
/* We don't expect this to ever happen, but handle it anyway. */
From: Eric Pouech eric.pouech@gmail.com
Note: I kept UINT's type for consistency with caller and caller's caller. --- dlls/wined3d/buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index f76a9f6fcfc..5896fbcc20a 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -242,7 +242,7 @@ static BOOL wined3d_buffer_gl_create_buffer_object(struct wined3d_buffer_gl *buf
static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, const enum wined3d_buffer_conversion_type conversion_type, - const struct wined3d_stream_info_element *attrib, DWORD *stride_this_run) + const struct wined3d_stream_info_element *attrib, UINT *stride_this_run) { const struct wined3d_format *format = attrib->format; BOOL ret = FALSE; @@ -299,7 +299,7 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *buffer, #define WINED3D_BUFFER_FIXUP_XYZRHW 0x02
static BOOL buffer_check_attribute(struct wined3d_buffer *This, const struct wined3d_stream_info *si, - const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, DWORD *stride_this_run) + const struct wined3d_state *state, UINT attrib_idx, DWORD fixup_flags, UINT *stride_this_run) { const struct wined3d_stream_info_element *attrib = &si->elements[attrib_idx]; enum wined3d_format_id format;
From: Eric Pouech eric.pouech@gmail.com
--- dlls/wined3d/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 5896fbcc20a..2f6c52ef36f 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -21,7 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA * */ -#define WINE_NO_LONG_TYPES /* temporary */
#include "wined3d_private.h"
@@ -1288,7 +1287,7 @@ static HRESULT wined3d_buffer_init(struct wined3d_buffer *buffer, struct wined3d WINED3D_MULTISAMPLE_NONE, 0, desc->usage, desc->bind_flags, access, desc->byte_width, 1, 1, desc->byte_width, parent, parent_ops, &buffer_resource_ops))) { - WARN("Failed to initialize resource, hr %#x.\n", hr); + WARN("Failed to initialize resource, hr %#lx.\n", hr); return hr; } buffer->buffer_ops = buffer_ops;
This merge request was approved by Zebediah Figura.