Compare commits

...

420 Commits

Author SHA1 Message Date
Michael Stefaniuc 0aceab5884 Release 4.0.4.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 22:00:01 +02:00
Isira Seneviratne 3c16e4a7d0 jscript: Replace '%pure-parser' with '%define api.pure'.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e0e57b140a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-20 21:49:15 +02:00
Ken Thomases ed092ee074 winemac: Only manipulate an NSOpenGLContext's view on the main thread.
I was seeing a crash due to an assert about manipulating it on a
background thread. I can't recall where I was seeing that. I think it's
new in Catalina.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1261589c2c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Piotr Caban 67672080ba ntdll: Work around futimens weak linking problem in set_file_times.
Newer XCode versions are weak linking to futimens function. Because of
that Wine will crash trying to execute the function on Mac OS <= 10.12.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b4ec402859)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Zebediah Figura 1c47ee7afa qedit/mediadet: Check for failure from IEnumPins::Next().
Fixes a test crash when gstreamer is not present.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9defa529fc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Chip Davis a6dde4d38b winemac.drv: Pass the CAMetalLayer to MoltenVK.
It isn't safe to access the view object from any thread other than the
main thread. In fact, if you try to call vkCreateMacOSSurfaceMVK() from
any other thread, MoltenVK prints out a big, scary warning telling you
not to do this! Instead, get the layer from the view ourselves and pass
that to MoltenVK. Recent versions of MoltenVK can accept either the view
or the layer.

Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 606424bbbc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Alexandre Julliard 39d3c93162 wbemprox: Use %define api.pure instead of %pure-parser.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7026b59b48)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Alexandre Julliard 6d2df2328f vbscript: Use %define api.pure instead of %pure-parser.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 003a5f7c98)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Alexandre Julliard 0cc00dfb4e msxml3: Use %define api.pure instead of %pure-parser.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 096eda01cc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Alexandre Julliard 3b50c56fd3 msi: Use %define api.pure instead of %pure-parser.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d977c55bb4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Rémi Bernon 55d1a591ef opencl: Define CL_TARGET_OPENCL_VERSION 220 to fix a header warning.
This is going to be the value used anyway, as we didn't specify it.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 97e47fe066)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Paul Gofman 9d42b179a9 d3dx9: Pass D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY when appropriate.
Manual testing shows that the backward compatible compilation is used
in d3dx9 versions below 37.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48302
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 13880f8e6a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Ethan Lee fc274645cf wined3d: Add Intel HD 615 PCI id and device description.
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 46556c2f8c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Andrew Sheldon 0355ca9e2b wined3d: Add Navi 10 PCI id and device description.
Signed-off-by: Andrew Sheldon <asheldon55@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit da5a80879f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Patrick Hibbs 4d18a7f237 wtsapi32: Make WTSRegisterSessionNotificationEx's return consistent with WTSRegisterSessionNotification.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47433
Signed-off-by: Patrick Hibbs <hibbsncc1701@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f870aa4988)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Rémi Bernon e11718fba0 dinput: Increase device buffer size to 1024.
The buffer size was previously limited to 20 in:

  8d05256172

Testing shows that it is somewhere around 1024 on Windows, and using a
smaller buffer causes some input data to be lost with high polling rate
mouses. It can be spotted in Wolfenstein II: New Colossus menus.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 50440e28bb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-17 00:45:51 +02:00
Alistair Leslie-Hughes b37845dbcc dinput: Cap the buffer size to 20.
When a program calls SetProperty with DIPROP_BUFFERSIZE, dinput records
this value for GetProperty but only uses it when the device can support
that number of buffers otherwise a max value.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45732
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8d05256172)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Jeff Smith 4818f65c04 user.exe16: Releasing DC does not disable it.
ReleaseDC in user32 marks cache DCs as disabled.  For user.exe (the
16-bit equivalent), this causes DCs to become inaccessible after
release.  On Windows, they are still accessible after release.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44408
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0778945e34)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Michael Müller 501eb50def setupapi: Add support for IDF_CHECKFIRST flag in SetupPromptForDiskW.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=20465
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0422c6c4d0)
Conflicts:
        dlls/setupapi/dialog.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Louis Lenders 6520a17987 combase: Add GetRestrictedErrorInfo and RoOriginateLanguageException stubs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46972
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 774aaa1d30)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Jacek Caban 01256bcaa9 include: Add roerrorapi.h header.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c1e7358311)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Louis Lenders ec1cd2e6c7 include: Add restrictederrorinfo.idl.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a619828053)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Jacek Caban 55adc43492 kernel32: Terminate process in unhandled exception handler.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4f1185d21e)
Conflicts:
	dlls/kernel32/tests/debugger.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Alistair Leslie-Hughes c74ab1766f dmime: IDirectMusicSegment8 SetLoopPoints support zero start/end.
Both end and start set to zero loop the whole segement.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25728
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 01d521e5af)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Louis Lenders 84f800e96b wine.inf: Install powershell.exe in WindowsPowerShell/v1.0/.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47820
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a2aa1b01f0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Alex Henrie 883e8e8580 ntoskrnl: Add KeSetImportanceDpc stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48358
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f307e94c0e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Damjan Jovanovic b3f5764fb8 winex11.drv: Ignore .dwAspect in FORMATETC during XDnD.
Some applications pass FORMATETC.dwAspect=0 to
IDataObject_[Query]GetData() during drag and drop, which
is not a valid DVASPECT_* value. Tests show that Windows
Explorer completely ignores .dwAspect for CF_HDROP when
it is the drag source, treating all values as
DVASPECT_CONTENT instead. Do the same.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43368
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 523fb9496c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Dmitry Timoshkov 499b8465c8 mshtml: Add support for DIID_HTMLDocumentEvents2 connection point sink.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ec29d40e4e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Alexandre Julliard 08bededc30 configure: Disable gssapi also when linking with kerberos doesn't work.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48314
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 382df5d14d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Alexandre Julliard a21082bf04 winex11: Use the default color table for window surfaces on 8bpp displays.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48088
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 458e0ad513)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-04-08 23:31:16 +02:00
Piotr Caban 03ba98305e msi: Fix component Action for shared components in CostFinalize.
Fixes regression in wow .NET4.6.2 installation.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d95bffdadb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic b4e12ea07f gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.
All sample code in the Python Pyglet library suffers from terrible
text corruption, caused by the inability to erase the background
between rendering sequential font glyphs, resulting in leftovers
from previous letters mixing with the image of new letters.

This is because it attempts to erase the background by calling
GdipGraphicsClear() with ARGB color 0x00000000 (completely
transparent black), and in our gdiplus alpha blending that into
the background has no effect. It should be using
CompositeModeSourceCopy to overwrite the background with that brush
instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30506
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3c8784bf9c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Dmitry Timoshkov aad05a928f gdiplus/tests: Add some tests for GdipInitializePalette.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b7aa42c008)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 2a3f639372 msxml3: All string passed to IXMLDOMDocument_load() need to be URL-unescaped.
msxml3 allows URL escape sequences even for C:\ style paths.
eg. C:\Program%20Files\...

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48242
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e2f2ad0e81)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Gijs Vermeulen 2d6f581595 shell32: Implement PathResolve.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48082
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a5a2749cfe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Paul Gofman bc846f4b8d ntdll: Add DECLSPEC_HOTPATCH to NtProtectVirtualMemory().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48077
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 923e62eb55)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Nikolay Sivov 8fa08b8490 user32/listbox: Update caret index on LB_SETSEL.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47459
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 832b748b06)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Louis Lenders 861d7d51de kernel32: Return S_OK in RegisterApplicationRecoveryCallback stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43817
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 626162f7db)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Michael Müller 63cd49cb2a ole32: Fix property name handling for dictionary entries in CP_UNICODE case.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42046
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3cb18cc656)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Byeongsik Jeon 54cdf4c92d gdi32: Add a workaround for Freetype < 2.8.1 using v40 FT_LOAD_TARGET_MONO.
Freetype < 2.8.1 v40 has incorrect advance widths and rendering issues.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41639
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c666a45560)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Byeongsik Jeon ef857c3d80 gdi32: Add a helper macro for FreeType version check.
Signed-off-by: Byeongsik Jeon <bsjeon@hanmail.net>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9d92acaa56)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Rémi Bernon a46bdec8eb widl: Cast freed pointers to void* to fix discarded-array-qualifiers warning.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1491453ea9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Nikolay Sivov ccb9b6bbe8 explorerframe: Return success from ThumbBarSetImageList().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 27eee2d9ac)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 08f0db251e ieframe: Implement COM aggregation in WebBrowser.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12406
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a14281c089)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Vijay Kiran Kamuju be712881ee shcore: Add stub for GetScaleFactorForMonitor.
Based on a patch by Esdras Tarsis.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48016
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bbdc670931)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Nikolay Sivov 3c249a2c63 comctl32/rebar: Fix invalid band index access.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47991
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d6c0f9f22a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Joseph Kogut 8f1a46c73c iphlpapi: Report success in NotifyIpInterfaceChange.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47935
Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 713f4568e6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Myah Caron 825d60d32f kernel32: Allow NtQueryDirectoryFile underfilling FileInformation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47832
Signed-off-by: Myah Caron <qsniyg@mail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1658d5a20d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Jeff Smith 29e934979e kernel32: Quote first command line arg in process paramenters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47790
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ceb32f6683)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Alistair Leslie-Hughes c3a9c35499 dmstyle: Add GUID_IDirectMusicStyle support in Style Track GetParam.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit de11d172dc)
Conflicts:
	dlls/dmstyle/styletrack.c
	dlls/dmstyle/tests/dmstyle.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Kevin Puetz 6cc918ac62 winegcc: Correctly pass the '-' file name (stdin) to the compiler.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38300
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d5e175e32b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 4fcde9a3c9 comctl32: Allocate the right wstr size for the TVN_GETDISPINFOW reply.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25264
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d558896fff)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Alistair Leslie-Hughes 4e52083781 dmloader: Stop after find first matching object.
This stops a crash in Legoland on startup when finding cached objects.
Placing a break in each of the if's causes the wrong object to be loaded.

The help states it looks at each type in order. So, we might have to loop
the cache multiple times to ensure that when an object has flag DMUS_OBJ_OBJECT,
it's preferred over a DMUS_OBJ_FILENAME | DMUS_OBJ_FULLPATH match.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4aee9ba5ad)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Fabian Maurer ce50dc4a3e user32/combo: Properly handle WM_CTLCOLOR* messages.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fbec0ba9ee)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Fabian Maurer 641f9344ef user32/tests: Add combo tests for WM_CTLCOLOR*.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2feab9b99d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Fabian Maurer bfda873b38 comctl32/combo: Properly handle WM_CTLCOLOR* messages.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46417
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1dc3ec2cdc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Fabian Maurer 73e1415b8a comctl32/tests: Add combo tests for WM_CTLCOLOR*.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e95873997f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Liam Middlebrook 8743e7a303 d3dx11: Add D3DX11SaveTextureToFileA/W() stub.
Signed-off-by: Liam Middlebrook <lmiddlebrook@nvidia.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit adef99a21c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Louis Lenders 42594c785d wine.inf: Add value for DigitalProductId.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24529
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 51c297afa5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 2cf27cba96 comctl32: Implement treeview edit control text trimming and overwriting.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 80bd7fdd56)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 0a1ba97b04 comctl32: Test overwriting of pszText pointer in TVN_ENDLABELEDIT.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 59bb622088)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic c3399383e4 comctl32: Test overwriting of pszText contents in TVN_ENDLABELEDIT.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1fa32f9a53)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 016bcb6f57 comctl32: Test text buffer passed to TVN_ENDLABELEDIT is always MAX_PATH chars long.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 565b0f5d50)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 7abfa62850 comctl32: Test treeview text trimming after label editing is complete.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8fd0ecc6cd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic a9b3fe4f87 comctl32: Implement treeview edit control EM_SETLIMITTEXT.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5e2e794ad6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Damjan Jovanovic 13f43c319d comctl32: Test the treeview edit control EM_LIMITTEXT.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6fb210d7b4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Alex Henrie 01269a0b00 ntoskrnl: Implement IoCreateUnprotectedSymbolicLink.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47986
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 380d31b17a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Alexandre Julliard 3c91375533 ntdll: Always add path separator when looking for a relative path name.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47979
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e4595a0ce8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Fabian Maurer c6dcd26025 ws2_32: Handle more IGMP socket options.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47956
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bf24c316f4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:15:34 +02:00
Vincent Povirk b9ded7e871 regsvr32: Re-exec as 32-bit or 64-bit if necessary.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47075
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e90cca8e7a)
Conflicts:
        programs/regsvr32/regsvr32.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-03-29 16:12:58 +02:00
Paul Gofman 9f35b60840 user32: Fix coords in WINDOWPOS for WM_NCCALCSIZE sent from SetWindowPos().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40777
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2ac268436b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 22:19:38 +01:00
Paul Gofman 6c6b34839d d3d8: Fix stream data skip count in convert_to_wined3d_declaration().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40364
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5e10f1d339)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 22:16:29 +01:00
Nikolay Sivov ca86f49f51 po: Fix Russian strings for page setup dialog.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9314086988)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 22:13:48 +01:00
Paul Gofman 596945d4a3 ddraw: Fix vertex buffer offset in d3d_execute_buffer_execute().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34666
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2e4b8eaf62)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 22:04:34 +01:00
Paul Gofman 63cf5771a8 ddraw: Enable lighting only if material is set in d3d_execute_buffer_execute().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ae2696c992)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 22:04:23 +01:00
Felix Hädicke d20c3d3f1a msvcrt: Use memmove() instead of memcpy() puts_clbk_str().
memcpy() must not be used here, because results are undefined if the
memory areas overlap. This can cause problems, particularly if
particular compiler optimisations are enabled.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47918
Signed-off-by: Felix Hädicke <felixhaedicke@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 90e520b418)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 00:51:37 +01:00
Alistair Leslie-Hughes 7af7189c28 kernel32: FindFirstFileExW needs to open the directory with FILE_OPEN_FOR_BACKUP_INTENT flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47833
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ee266aba74)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 00:39:37 +01:00
Piotr Caban bf8638c41b msvcrt: Fix _putws implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47615
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3577f06f71)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-20 00:28:50 +01:00
Paul Gofman fbe718f24c wined3d: Allow loading buffers mapped through system memory.
Fixes rendering dirt on the wind shield and GL_INVALID_OPERATION
errors in "Need For Speed Shift 2".

The test succeeds on Windows with retail Direct3D 9, but fails
with debug Direct3D 9 if selected in DirectX SDK control panel:
error code is returned from _DrawIndexedPrimitive() and the
triangle is not rendered.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit df509be8c6)
Conflicts:
	dlls/d3d9/tests/visual.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 23:35:04 +01:00
Gijs Vermeulen e6b07d2159 msvcrt: Add Concurrency::details::_Context::_Yield stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46279
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 170ab94bde)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 23:14:24 +01:00
Zebediah Figura cd13f18f11 winex11: Track the client colormap separately.
If a window with an OpenGL surface attached is reparented as a child window,
and then reparented as a top-level window, so that its whole window is
destroyed and then recreated, it will be recreated with the colormap of its
child window, which more than likely has a different visual. This violates
the X11 specification, which states that a window's colormap must have the
same visual as the window itself, and causes the X server to return BadMatch
to the CreateWindow request.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 22993aff94)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 23:13:15 +01:00
Matteo Bruni a709cfe061 d3dx9: Handle non-zero source rect position in D3DXLoadSurfaceFromMemory().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41936
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 88d8ae3839)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 23:11:09 +01:00
Alistair Leslie-Hughes 017a0173ac dsound: Primary buffer doesn't support flag DSBCAPS_CTRLFX.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40740
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit eabb3d444c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 23:03:27 +01:00
Michael Müller 7b03029f7d wine.inf: Create the WindowsMediaVersion key and set its default value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47779
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit acd5358f5b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:55:15 +01:00
Zhiyi Zhang 2f2ee0cde0 kernelbase/tests: Add more PathAllocCanonicalize tests.
Contains tests added by Jeff Smith <whydoubt@gmail.com>

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 80fd28c7f2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:51:36 +01:00
Jeff Smith 5278fb29ac kernelbase: Fix PathAllocCanonicalize handling segments that contain dots.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47766
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c13a8f60bd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:51:23 +01:00
Andrew Eikum 01ea6a5b63 winex11.drv: Throttle calls to XResetScreenSaver.
Frequent calls to XResetScreenSaver cause performance problems on some
GPU drivers, see https://bugs.freedesktop.org/show_bug.cgi?id=110659

Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cb703739e5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:46:29 +01:00
Fabian Maurer 22d4fbae9d shell32: Prevent text truncation inside the old "browse folder" dialog.
We use the same height for the title as in the new "browse folder" dialog.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46404
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b7bca1be24)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:43:28 +01:00
Piotr Caban 8aab6644c0 wbemdisp: Handle NULL signatures in init_members.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47709
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5e4472d425)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:22:01 +01:00
Akihiro Sagawa 8ce3f98888 msvcrt: Reimplement _mbsspnp using _mbsspn.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47693
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ab525d3f6f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:17:26 +01:00
Akihiro Sagawa ce8d7855f2 msvcrt: Fix _mbsspn implementation.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f0f93c791f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:17:10 +01:00
Akihiro Sagawa ed576ab2f9 msvcrt/tests: Add more tests for _mbsspn and _mbsspnp.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c62c51c04a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:16:22 +01:00
Bernhard belacker f94d88e8a9 cmd.exe: Command type with multiple files should print filenames to stderr.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46983
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4684e1a9c6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:08:29 +01:00
Fabian Maurer 583feb4b7c comctl32/syslink: Properly handle '\r'.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46421
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 04f75040ec)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 22:00:25 +01:00
Akihiro Sagawa 17c72ce2ca comctl32/updown: Suppress the NM_RELEASEDCAPTURE notification.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47427
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9dbe886e3f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 19:31:39 +01:00
Akihiro Sagawa 46a10a18a3 comctl32/tests: Add tests to show no NM_RELEASEDCAPTURE notifications in the updown control.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5555044aa6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 19:31:27 +01:00
Richard Pospesel c1f2e4ae76 widl: Use FC_CHAR rather than FC_BYTE for boolean typedef to match midl.exe output.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47041
Signed-off-by: Richard Pospesel <richard@torproject.org>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 28715ce34e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 19:25:41 +01:00
Chip Davis e42d4b5634 ntdll: Implement RtlCaptureStackBackTrace() for x86_64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40868
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47101
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4e4aa46775)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2020-01-19 19:18:24 +01:00
Michael Stefaniuc ab71182fbe Release 4.0.3.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 16:10:40 +01:00
Andrey Gusev f990ce8652 d3dx11: Fix D3DX11CreateShaderResourceViewFromMemory spec entry.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42078
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8bf63a4c37)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-15 00:01:59 +01:00
Owen Rudge 00fd2319ff wininet/tests: Fix http tests to reflect current state of winehq test server.
Signed-off-by: Owen Rudge <orudge@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5b406e1446)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-15 00:00:12 +01:00
Zebediah Figura 6df7d78f51 d3d9/tests: Add another flush to work around an intermittent test failure on fvwm2.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit eb13c3286f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:58:54 +01:00
Zebediah Figura 21734aa3c0 d3d8/tests: Flush events after sending SC_MAXIMIZE.
For some reason, on fvwm2 sometimes focus_window will be restored and activated
between the subsequent call to SetForegroundWindow() and the next call to
ShowWindow(SW_RESTORE), causing the next test to fail. Flushing first seems to
reliably work around this.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2b29d02aa5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:58:37 +01:00
Hans Leidekker e9ee9a9149 wininet/tests: Fix FTP test failures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bbf74ea22a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:57:04 +01:00
Hans Leidekker 249ee6f278 winhttp: Propagate request errors in request_wait.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8de2369dcf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:53:40 +01:00
Hans Leidekker f6a0f02970 winhttp/tests: Fix some test failures.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 310620c072)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:52:02 +01:00
Nikolay Sivov b8ce8e48ab kernel32/nls: Add locale data for positive and negative infinity.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e14249a364)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Nikolay Sivov 0abdeffeb0 kernel32/nls: Add percent formatting values.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5d2914b2c2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Nikolay Sivov 2ffe8fd64d kernel32/nls: Add LOCALE_SPERMILLE data.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ce82e5e883)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Nikolay Sivov d9314b5d21 kernel32/nls: Add LOCALE_SPERCENT locale data.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c9b135cc88)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Enol Puente 01d16cc01a kernel32: Add Asturian locale.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ff8dcba466)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Enol Puente 62edbf6624 wmc: Support Asturian.
Signed-off-by: Enol Puente <enolp@softastur.org>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit af5f7a8785)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Enol Puente 113f49c38e wrc: Add Asturian locale.
Signed-off-by: Enol Puente <enolp@softastur.org>
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ec3181633b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju ec1d0af95c kernel/nls: Fix LOCALE_SABBREVCTRYNAME for Serbian.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 57d6c541b9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 5ff99b30a6 kernel32: Add implementation for CAL_SMONTHDAY.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9ed363a1fe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju b9903ce0ce kernel32: Add implementation of CAL_SSHORTESTDAYNAME*.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ded7efd27c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 3acd748808 kernel/nls: Fix LOCALE_SLONGDATE and LOCALE_SYEARMONTH for some chinese locales.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 568609f051)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju d35194d7df kernel/nls: Add LOCALE_SMONTHDAY to all supported languages.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7a62bdc0d8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 9c37afae2a kernel/nls: Fix country name in Manx Gaelic locale.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b243331550)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju fd9303dd40 kernel/nls: Fix country name and sname in English-Caribbean locale.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d3cdff985f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 0e72518a04 kernel/nls: Fix LOCALE_SNAME for Serbian (Cyrillic).
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 982ec5fcd6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju c130bbfd06 kernel/nls: Fix LOCALE_SNAME for Uzbek (Cyrillic).
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1a759b792a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 84868a0adb kernel/nls: Fix LOCALE_SNAME for Azeri (Cyrillic).
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ba7144bfae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Vijay Kiran Kamuju 83b75de9c5 kernel/nls: Fix country name in Tatar locale.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3c45bfc7da)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Ken Thomases add7aa1a3c winemac: Fix failure to render OpenGL on macOS 10.14 (Mojave).
For programs linked against the macOS 10.14 SDK, Mojave makes all view
hierarchies layer-backed.  For views to which OpenGL contexts have been
attached this caused a regression where they sometimes failed to render and
just remain black.  Updating the OpenGL context after the framework has
assigned a layer to our view works around the problem.  Thanks to Elviss
Strazdins on Stack Overflow for the solution
<https://stackoverflow.com/a/52938517/1312143>.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 654b27823d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Alistair Leslie-Hughes be4553a807 advapi32: Don't read a value that might be uninitialized (Coverity).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1b714ca088)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Alistair Leslie-Hughes 39f5c0ff2b dinput: Ensure buffer doesn't overflow (Coverity).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 55edfc8837)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 9b2afce2b7 shell32: Fix a use after free (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e6ce281d30)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 026af56dba d3dx9: Always free samplers (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7dc42119b4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 40f8298659 d3dx9: Release the full parameter name when a parameter is released (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 63443f249f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 8a6f5f958f comctl32: Always free the tooltip text before setting it (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2b32bac5c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Jeff Smith 1d787b707b d3drm: Fix reference leak in d3drm_viewport2_Clear().
Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8fb032916d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 191f5e03ae msrle32: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e5857da273)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars f41154ce7f user32: Fix some leaks on error path (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 381c4e7b66)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 86b5e684a4 shell32: Fix an item identifier list leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0d0fa46553)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:58 +01:00
Sven Baars 7d8a34d6a1 wmp: Fix a crash in put_volume when basic_audio is NULL.
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9e8cf8082c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Zhiyi Zhang cc0b0b9fcf msctf: Add ITfContextOwnerCompositionServices stub.
Fix crash at launch for games that use Unreal Engine 4.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ef542fc797)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Jacek Caban 04dce9bc0b msxml3: Fix string length handling in I[VB]SAXContentHandler::characters.
Windows crashes when -1 length is passed. Escaping should just copy
embedded null bytes.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 73af53c4bc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Zebediah Figura 2a6171fce9 ucrtbase: Write the %hh prefix as a single char.
This fixes a crash in Planet Coaster on startup.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9445bed298)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Zebediah Figura 090c7ad438 ucrtbase/tests: Add some tests for __stdio_common_vsscanf().
Based on msvcrt:scanf tests.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 353ea070f3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Aric Stewart d0a450a32c dinput: Handle case where IOHIDDeviceGetValue fails.
This prevents crashes if a controller disconnects from OS/X.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c5283300e1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Piotr Caban beeadfb055 services: Don't double release process in service_start.
Fixes a crash while running ntoskrnl tests.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 496380709d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alexandre Julliard c277654c3b wbemprox: Use %define parse.error verbose instead of %error-verbose.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6d4cdeb658)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alexandre Julliard 09f48cc249 d3dcompiler: Use %define parse.error verbose instead of %error-verbose.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2d27c13d5e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alexandre Julliard 87e7425820 widl: Use %define parse.error verbose instead of %error-verbose.
The latter is deprecated and causes warnings.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5ea4d5971b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alex Henrie 85dfdc2eb5 server: Fix use after free in add_committed_range (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f3c9fdf852)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alexandre Julliard ef2cf798b3 server: Fix the returned error code for an invalid NT header offset.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47359
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f59d05223d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Stefan Dösinger 1ea857f188 include: Remove backslashes from D3D12_COLOR_WRITE_ENABLE_ALL.
Fixes building this .idl file with midl.exe.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7d77d330a5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Rémi Bernon 9475480548 wined3d: Add GPU information for Intel UHD Graphics 620.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 08141ee9bd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Henri Verbeet 08e6c3ef21 wined3d: Add GPU information for AMD VEGA12.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d00477e5ea)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Kai Krakow 1883742248 wined3d: Add GPU information for NVIDIA GTX 1660 Ti.
Signed-off-by: Kai Krakow <kai@kaishome.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 682805ec6a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Kristján Gerhardsson 4e87fbc1e0 wined3d: Add GPU information for a few more Intel KBL GPUs.
Signed-off-by: Kristján Gerhardsson <kristjang@ccpgames.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8003f1fd64)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Kristján Gerhardsson 11a806edac wined3d: Add GPU information for AMD VEGA20.
Signed-off-by: Kristján Gerhardsson <kristjang@ccpgames.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 29172fb7e2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Kristján Gerhardsson 3a3deb4d98 wined3d: Add GPU information for various Mac GPUs.
Signed-off-by: Kristjan Gerhardsson <kristjang@ccpgames.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f49b27ce22)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Michael Müller 7e18c69962 msvidc32: Fix calculation of stride and size.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23175
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25180
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fb7f937305)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Michael Müller f4cdd56192 msvidc32: Add support for converting 16 bit depth to 24 bit.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=14695
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e287917a3a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Michael Müller 0c2e7e2d5b iccvid: Fix calculation of stride and size.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bc389cff39)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Paul Gofman 14a0ed92fb ddraw/tests: Test restoring attached surface for ddraw1.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aa6517cf87)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Paul Gofman dfa69cd6e3 ddraw/tests: Test restoring attached surface for ddraw2.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d8812edc65)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Paul Gofman 6b1406e11f ddraw/tests: Test restoring attached surface for ddraw4.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit da2fdc4cd3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Paul Gofman b0beb1c992 ddraw: Restore complex attached surfaces when restoring surface.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47586
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5c9a7b0986)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Paul Gofman 3490957b74 ddraw: Return DDERR_SURFACELOST from _GetAttachedSurface() if surface is lost.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7361c7f2cd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Akihiro Sagawa 7bad7c1387 shell32: Fix return value for DragQueryPoint.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47514
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4c6aa8b2fa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Akihiro Sagawa 721e319aed shell32/tests: Add DragQueryPoint tests.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 865fe9cf97)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Alex Henrie 08a38b915a ntoskrnl: Add MmIsThisAnNtAsSystem().
This function returns FALSE on all server and non-server versions of
Windows since XP except for Windows Server 2003.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47578
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 433c14b064)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Gijs Vermeulen 7cc0e254a3 wine.inf: Update E. South America Standard Time.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47564
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2859c22cc6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Vincent Povirk 0d620861ce mscoree: Add diagnostic CorGetSvc stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45449
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6e3d68b141)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Qian Hong dce4b41cfd advapi32: Initialize the LsaLookupSids() LSA_TRANSLATED_NAME.Name string properly.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39129
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2e53f8bccb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Ethan Lee 0508ac9c79 xaudio2: Export functions by ordinal.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47437
Signed-off-by: Ethan Lee <elee@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 92a5299b1d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Hans Leidekker 9899acf0d8 bcrypt: Ignore the size parameter in BCRYPT_CHAINING_MODE setters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47432
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 691fcebf3d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Damjan Jovanovic f2a4c06ce5 ws2_32: WSARecvMsg allows a NULL control buffer when no control messages arrive.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43286
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aa2c84a9db)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Zebediah Figura 3c8c47b1fb ntdll: Correctly fill DataTransferLength in SCSI_PASS_THROUGH and SCSI_PASS_THROUGH_DIRECT.
DataTransferLength specifies the number of bytes transferred, but
sg_io_hdr_t.resid gives the number of bytes *not* transferred:
https://www.tldp.org/HOWTO/SCSI-Generic-HOWTO/x356.html

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47424
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bf891f34af)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Zebediah Figura a2ea837849 msi: Close all handles opened by a custom action thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47418
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e4e7e956bd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:57 +01:00
Dmitry Timoshkov aa2bc95362 msvcrt: Fix handling of dst == src in wcscpy_s.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9ade30d0ce)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Henri Verbeet 508b45c463 wined3d: Handle Windows 8.1 in wined3d_driver_info_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0bcb2de66a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Alistair Leslie-Hughes b9a24ae16e wininet: Always set last error in InternetReadFile.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47352
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8f5b9f4d4b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Alistair Leslie-Hughes ba957cd2e4 winebus.sys: Increase buffer size to match max length available.
The current buffer is 1024, however the ioctl call can handle
a max length of 8191.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47013
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 90a1e5d943)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Michael Müller feae008b95 wininet: Allow to set INTERNET_OPTION_HTTP_DECODING on sessions and connections.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6e97461580)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura 03aca2e96b quartz/memallocator: Clear some sample properties when freeing the sample.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38421
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b9073b1e94)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura 020990b77d quartz/tests: Add more tests for standard media samples.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1964051f77)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura 8c60e37443 quartz/tests: Clean up CommitDecommitTest().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 83dc66730e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Akihiro Sagawa 12fb7e9a75 usp10: Fix advance width when glyph is missing.
This fixes a regression introduced by 8d018d8d1d.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47327
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ac0c1d41d1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Akihiro Sagawa 5b810ec3bd usp10/tests: Add advance width tests with CJK bitmap font.
We should use associated glyph's advance width instead of the default one.
Because, when using CJK bitmap system font, full-width character
(e.g. Hiragana) is rendered with associated font. The glyph is different from
the default glyph.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9dabf7b013)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Andrew Eikum 318a41030e ntdll: Fix memory region check in NtQueryVirtualMemory.
Patch by buggy@ifel.se.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45218
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 12be24af8c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Gabriel Ivăncescu e049888541 user32/listbox: Fix mouse wheel scrolling for multi-column listboxes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22253
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b95bc84273)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Gabriel Ivăncescu 786a246aa6 comctl32/listbox: Fix mouse wheel scrolling for multi-column listboxes.
Multi-column listboxes scroll horizontally, so each wheel tick must go an
entire page at a time instead of an item at a time. But we have to limit
the amount of scrolling in this case to avoid "jumping over" columns,
if the window is too small.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22253
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1f37875194)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Paul Gofman dc3cb001af wined3d: Use 3 component norm for 'nrm' opcode in GLSL backend.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8848
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 447c9523f8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura f46d69c9bb widl: Mark unions, user types, and ranges as IsSimpleRef.
This fixes a regression introduced by 02976b655a.
That patch should only have affected arrays.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0afbcee924)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura dff0bc91cd widl: Also allocate top-level pointers to arrays as on-stack in -Oicf mode.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3c4d0bf4e3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Zebediah Figura 22b6b13efb widl: Use IsSimpleRef only for explicitly declared arrays.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47285
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 02976b655a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Piotr Caban 1b925afd24 msvcp: Add _Strxfrm implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1ad48d1b3c)
Conflicts:
	dlls/msvcp90/locale.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Nikolay Sivov d049e4965d comctl32/trackbar: Do not consider window size when initializing fixed length thumb.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47143
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d5f8eb333c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Louis Lenders a456415d73 gdiplus: Add version resource.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47137
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 89c1f51151)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Jacek Caban 5687d66c68 ieframe: Keep Busy property in sync with download state.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47069
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d535df42f6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Vincent Povirk 0efc5086a2 windowscodecs: Treat 16-bit channels as little endian.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2b7b3abc5b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Bryon Roche 5afbcf16ab windowscodecs: Byte swap png read/write for 16-bpp data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46558
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0c0def962f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Dmitry Timoshkov df2aaade92 windowscodecs: Add support for 32bppRGB, 32bppRGBA and 32bppPRGBA to format converter.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4cbea6a5c2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:56 +01:00
Dmitry Timoshkov c37a2384d2 windowscodecs/tests: Add a bunch of new tests for indexed format conversions.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4883556add)
Conflicts:
	dlls/windowscodecs/tests/converter.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:44:00 +01:00
Gabriel Ivăncescu e45081fd2e winepulse.drv: Adjust the buffer volume before sending it to PulseAudio.
Only fixes the PulseAudio driver for the first bug, not ALSA.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38182
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46450
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cad249b688)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Gabriel Ivăncescu 5b45b6232f winealsa.drv: Adjust the buffer volume before sending it to ALSA.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38182
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9d48b3294c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Fabian Maurer 29407887be setupapi: Correct function parameter for CM_Set_Class_Registry_PropertyA/W.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47249
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c77ba713d2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Zebediah Figura 7ddb1120ec msxml3: Load the version 1 typelib before trying to access it.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47214
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7edbbe1ed3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Dmitry Timoshkov 146f2f6087 urlmon: If ProtocolCF_CreateInstance doesn't support aggregation retry without it.
This patch fixes a regression caused by 097811f251.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47190
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 43c1992821)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Dmitry Timoshkov 7978df132a urlmon/tests: Add a test for ProtocolCF_CreateInstance not supporting aggregation.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 97529298a1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Tim Schumacher e948441070 services: Allow reading binary registry values as DWORDs.
Some programs/services actually save those values as a registry
value of the type REG_BINARY.

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7b139bbb5c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Fabian Maurer f91928eb69 gdi32: CreatePolyPolygonRgn() returns an empty region when the area is empty.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46655
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9bc6f004ce)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Jactry Zeng 2845efb524 msscript: Partially implement IScriptControl::Eval().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=41657
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 21ae9ba1ba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:19 +01:00
Vincent Povirk 980ce34096 mscoree: Accept old framework build in exe metadata.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=27185
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6ee29c048c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:18 +01:00
Alexandre Julliard b2e3d387af ntdll: Use the correct type for %llu scanf format.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 70d17d3929)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:18 +01:00
Paul Gofman 03222a8dad ddraw: Fix vertex count in d3d_device3_DrawIndexedPrimitiveVB().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47129
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 08d630e250)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-11-14 23:43:18 +01:00
Alistair Leslie-Hughes 340d95a1af authz: Add AuthzFreeResourceManager stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47082
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d425d519ff)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:49:11 +02:00
John Thomson acd57c7d44 shell32: Do not fail in SHCreateDirectoryExW for ERROR_ALREADY_EXISTS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47023
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9b6d198a3c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:46:18 +02:00
Austin English 80b0fb95e8 advapi32: In ReadEventLogA/W, return ERROR_HANDLE_EOF instead of ERROR_CALL_NOT_IMPLEMENTED.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46905
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1a5ad9e65d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:43:56 +02:00
Vijay Kiran Kamuju f94821e59e virtdisk: Add stub and tests for OpenVirtualDisk.
Based on patch from Louis Lenders.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45947
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 081fd1e997)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:41:51 +02:00
Dmitry Timoshkov 70f00e6246 crypt32: CryptMsgUpdate should skip broken certificates.
CertOpenStore() already verifies the certificate before adding it
to the memory store from the file, this patch makes CryptMsgUpdate()
behave in a similar way.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45757
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1875620466)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:36:56 +02:00
Nikolay Sivov d10f213840 ntdll: Initialize critical section debug info with correct pointer value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fe0f8a150f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:28:00 +02:00
Nikolay Sivov 0a77cef2ee kernel32/tests: Add a test for critical section DebugInfo initial value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bf174815ba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:27:47 +02:00
Erich E. Hoover 97cf4f154d advapi32: Fix the initialization of combined DACLs when the new DACL is empty.
Wine-Bug:  https://bugs.winehq.org/show_bug.cgi?id=38423
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 92ee3543e5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:25:49 +02:00
Erich E. Hoover dfcef81b5b advapi32: Move the DACL combining code into a separate routine.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9aac7ca191)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 22:25:15 +02:00
Martin Liska a4aedec7f5 include: Avoid compound literals for WCHAR strings.
Starting from GCC 9, compound liferal's scope has changed:
https://www.gnu.org/software/gcc/gcc-9/porting_to.html#complit

Signed-off-by: Martin Liska <mliska@suse.cz>
Signed-off-by: Marcus Meissner <meissner@suse.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9afc341c4f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 21:49:08 +02:00
Hans Leidekker 329ef8cebd bcrypt: Implement BCryptGenerate/FinalizeKeyPair for ECDH P256.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46564
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 73b695f059)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 21:45:05 +02:00
Louis Lenders 00902009d0 dwmapi: Return DWM_E_COMPOSITIONDISABLED instead of E_NOTIMPL in DwmGetTransportAttributes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31350
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit abee97e469)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 01:53:49 +02:00
Zhiyi Zhang 3bdadd4ab4 wined3d: Truncate stencil reference values to the stencil component size.
As opposed to OpenGL, which clamps them. This fixes a regression introduced by
commit a9e199e5ad.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 124f48d311)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 01:10:04 +02:00
Zhiyi Zhang ee5d3beda5 d3d9/tests: Add a test for stencil reference value truncation.
With suggestions by Paul Gofman.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c67a27c87f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 01:09:37 +02:00
Paul Gofman 93caaebd39 wined3d: Apply stencil mask to stencil reference value.
This is consistent with the docs and confirmed by the test.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28196
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a9e199e5ad)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-09 01:07:07 +02:00
Michael Müller 0135e88483 avifil32: Correctly handle compressed frames when desired format is specified.
From: Michael Müller <michael@fds-team.de>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit da0f196c93)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-08 23:20:48 +02:00
Zebediah Figura 91fdecbd95 setupapi: Add magic bytes to struct file_queue and validate them in SetupCloseFileQueue().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=12332
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c65d98065c)
Conflicts:
	dlls/setupapi/tests/install.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-10-08 23:18:45 +02:00
Paul Gofman 7feef68ff1 d3dx9: Pass rectangle to {lock|unlock}_surface().
This fixes regressions introduced by commits
65956ae50a, 092c14b9d8.
Surface source or destination rectangles were left behind.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47546
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 378204527e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Paul Gofman 31487700d4 d3dx9: Use {lock|unlock}_surface() in D3DXLoadSurfaceFromMemory().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 65956ae50a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Paul Gofman cbff05e6c9 d3dx9: Use temporary surface in D3DXSaveSurfaceToFileInMemory() for unmappable textures.
Fixes a regression triggered by commit
949dbbd31f.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 092c14b9d8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Paul Gofman 056e171352 d3dx9: Do not ignore surface map failure in D3DXSaveSurfaceToFileInMemory().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ce09011434)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Paul Gofman f0d4f1b5c7 d3dx9: Use temporary surface in D3DXFillTexture() for unmappable textures.
Fixes a regression triggered by commit 949dbbd31f.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46453
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4e44d74afb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Paul Gofman f61d1b1d7b d3dx9: Factor out {lock|unlock}_surface() functions.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 33be8439fc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 16:36:59 +02:00
Michael Stefaniuc acfa1c8c9f Release 4.0.2.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-23 16:29:32 +02:00
Alistair Leslie-Hughes 6d7c890e83 vbscript: Move variable declaration outside of for.
This stops a compile error under gcc 4.8.4.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b75627ec10)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-23 14:43:11 +02:00
Alistair Leslie-Hughes 88316ea811 dinput: Handle setting DIPROP_CALIBRATIONMODE mode in generic implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47183
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 132cf25ed6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Alistair Leslie-Hughes 20f2d0726b dinput: Allow enumeration of joysticks with DirectX 3.
Star Wars: Rogue 3D requests a DirectX 3.0 version
0108:trace:dinput:DirectInputCreateEx (0x400000,0300,{9a4cb684-236d-11d3-8e9d-00c04f6844ae},0x7acfa0,(nil))
and then tries to interate over all Joysticks.

When using modern windows, the current tests show that this is the correct behaviour.

However, it's possible to use a shim to allow older games, like the
one above, to interate over joysticks.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fe4db5309e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Alistair Leslie-Hughes b09a3bd621 dinput: Ensure Cursor is visible on config dialog.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9bcaf9769c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Tim Schumacher 313dc20036 dinput: Map wheel, gas, and brake axes as well.
The axes wheel, gas, and brake are just differently named replacements
for X, Y, and Z when using wheel-like joysticks.

Make those accessible by remapping them to X, Y, and Z internally.

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1a6458bad8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Tim Schumacher 4fcf59e0f2 winejoystick: Add support for wheel axes.
Wheel, gas, and brake are replacements for X, Y and Z in wheel-like
joysticks. Remap them internally to send inputs as X, Y, and Z.

Signed-off-by: Tim Schumacher <timschumi@gmx.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 905e7b0e2e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Zhiyi Zhang cf4883de13 dinput: Fix a possible deadlock at exit.
This fix another deadlock issue with dinput.

The old implementation of dinput waits for a hook thread to exit
during its uninitialization, which will never return during DLL_THREAD_DETACH.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 886d28de97)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Paul Gofman f7e395df32 xaudio2_7: Also preserve %ebx in call_on_voice_processing_pass_start().
It is tested that EBX register is not preserved by
IXAudio2VoiceCallback_OnVoiceProcessingPassStart callback
in League of Legends. It doesn't lead to crash in the
present xaudio, while it might still be a potential issue.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46870
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a5b22c86b4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Matteo Bruni c203334c05 wined3d: Avoid a GCC 8 warning.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3724e9c4ab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:26 +02:00
Alexandre Julliard 963ec4699f ntdll: Check for time conversion error to silence a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7c0385bdb4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Vijay Kiran Kamuju 551cba7c31 wpcap: Fix compile warnings for redefinition of PCAP_OPENFLAG_PROMISCUOUS.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 660399b8fd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Hans Leidekker b1f4c5ea0c wbemprox: Implement Win32_OperatingSystem.SystemDrive.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47065
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fb26388b0a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Louis Lenders 6c8534b5e9 kernel32: Add DECLSPEC_HOTPATCH to CreateActCtx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47051
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d4421f9c0b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 20a434478a widl: Correctly set the import library offset for all imported types.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47031
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6c64d02117)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Vijay Kiran Kamuju 95f9456815 ntdll: Report system information SystemPerformanceInformation info class.
Based on patch from Michael Müller.

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 99ba65a1ea)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Nikola Pavlica 43f2cc6372 dsound: Added 7.1 to stereo downmix.
Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fc84b8675a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Nikola Pavlica 6c105094e4 dsound: Revised 5.1 to stereo downmix.
Signed-off-by: Nikola Pavlica <pavlica.nikola@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 87eaa2f593)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Andrey Gusev 8e62ef4ca0 setupapi: Add DECLSPEC_HOTPATCH to SetupDiEnumDeviceInfo().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46971
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5466df6957)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Andrey Gusev e3539df7a9 dxgi: Add DECLSPEC_HOTPATCH to d3d11_swapchain_Present().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46953
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46971
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 29cd7dd072)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Józef Kucia f8795125cd dxgi: Do not forward d3d11_swapchain_Present() to d3d11_swapchain_Present1().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e88084f650)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Gijs Vermeulen 0cfe81859c riched20: Handle tomEnd in ITextRange::ScrollIntoView.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46899
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 840af642db)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Vlad Bespalov 788ef367cc user32: Make LoadString[AW] patchable.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46626
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Vlad Bespalov <vlad.botanic@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit fd5f03035c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Louis Lenders ef4bf0885d ntdll: Add DECLSPEC_HOTPATCH to NtQueryValueKey.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45703
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 89bfcfc645)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Louis Lenders b27c6672ac ntdll: Add DECLSPEC_HOTPATCH to NtQueryDirectoryFile.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45703
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3a0ffe5a37)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Nikolay Sivov f757ea635c dwrite/layout: Fix invalid index access to cluster array.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45543
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 571ffaf380)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Bruno Jesus b9333b02f6 mciavi32: Add Support for MCI_MCIAVI_PLAY_FULLSCREEN.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15934
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 08af837a8c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Austin English caade2f611 propvarutil.h: Add extern "C" if __cplusplus is defined.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46939
Signed-off-by: Austin English <austinenglish@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit da998cb206)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Piotr Caban 4972b18632 msvcr110: Fix __crtGetShowWindowMode implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46928
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b353ad7db8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Gijs Vermeulen e5cc66718d mssign32: Implement SignerFreeSignerContext.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46903
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e71bb692f3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Gijs Vermeulen 0834006ce9 mssign32: Add SignerSignEx stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46903
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ec814c1074)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Gijs Vermeulen 148d3545f3 msvcrt: Implement _wcsnset_s.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46902
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 92ba9e7b6d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Thomas J. Moore 2fae324cc4 ntdll: Also try to stat() the drive root.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46863
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 071e729969)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Piotr Caban bbb4f68684 msvcp140: Don't forward __ExceptionPtrDestroy to msvcr120.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46800
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e7bd1b03da)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Matteo Bruni 2305f7966f d3d8: Validate vertex stride in Draw[Indexed]PrimitiveUP().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 59e32ecbbe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 0f4e5ca849 d3d8/tests: Port test_draw_primitive() from d3d9.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 38fb14a688)
Conflicts:
	dlls/d3d8/tests/device.c
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Matteo Bruni 865563e065 d3d9: Validate vertex stride in Draw[Indexed]PrimitiveUP().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46713
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 758cdfa02d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 2497c5e781 d3d9/tests: Add more tests for reset state after DrawIndexedPrimitiveUP().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ca86c2ed84)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura d63079f2c7 devenum: Return S_FALSE from CreateClassEnumerator() if no devices exist.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46316
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e0da0b777a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Alexandre Julliard 9c41c5aa46 kernel32: Validate handle before freeing a LOAD_LIBRARY_AS_DATAFILE module.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46019
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 35d202fc09)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Alistair Leslie-Hughes 599e8995c6 hid: Implement HidD_FlushQueue().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45878
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 718b1bc542)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 307ce18efe hid: Implement HidD_GetIndexedString().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46711
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5ae3910e93)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 239c6e4449 winebus.sys: Retrieve hidraw device strings from the parent USB device.
This partially reverts 164517fe57. The
manufacturer, product, and serial string attributes are not exposed by the
HID device on Linux, but by its parent USB device.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46711
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cc3820ca99)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Paul Gofman d1423d4f7c ddraw: Improve d3d_device7_GetClipStatus() stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43411
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 38bdd6fc5c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Sebastian Lackner d756bb7f6b dinput: Avoid deadlock when CS are acquired in different order.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43356
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 02f0342833)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Paul Gofman 7bbec8bf22 ddraw: Fix ddraw[1-4] light activation / deactivation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42572
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit addc611b2a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Zebediah Figura 5c50407f7f msi: Fix handling of architecture in MSIREG_{Open, Delete}UninstallKey().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47009
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3d9363446f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:25 +02:00
Vincent Povirk 18151cbd1a uninstaller: Re-exec as 64-bit in wow64.
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 88580a3ad6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Vijay Kiran Kamuju e06b8d3e8d d3dx9: Generate ID3DXSkinInfo in D3DXLoadSkinMeshFromXof() when needed.
Based on a patch by Michael Müller.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33904
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 70d722340a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Michael Müller ec32204921 d3dx9/tests: Add initial tests for dummy skin info interface.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aec8e12a3d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Zhiyi Zhang b87334d6a9 kernel32: Open replaced file without GENERIC_WRITE in ReplaceFileW().
As MSDN says, the replaced file is opened with the GENERIC_READ, DELETE,
and SYNCHRONIZE access rights. If GENERIC_WRITE is added, then it will
fail with previous file opens without FILE_SHARE_WRITE.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33845
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 04ccd995b1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Sebastian Lackner 6eb596c5e8 dinput: Do not wait for hook thread startup in IDirectInput8::Initialize.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=21403
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 890d1b812a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Claudio Fontana 346b743bc1 kernel32: Allow empty profile section and key name strings.
Consider "" a normal section, and fix calculation for zero
length section name string and key name string.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8036
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18099
Signed-off-by: Claudio Fontana <claudio.fontana@gmail.com>
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit be678a52e1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-08-14 22:34:24 +02:00
Henri Verbeet 4a6314363e wined3d: Also update the "src_texture_gl" pointer when using a staging texture in the blitter.
Astutely spotted by Józef Kucia.
This fixes a regression introduced by commit
961a94ac04.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a5279a5fba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Piotr Caban 9e5541cbfb msvcp90: Add support for more creation flags in _Mtx class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46908
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8a82912b28)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Gijs Vermeulen d614927a10 hnetcfg: Initialize INetFwRules::get__NewEnum out parameter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46906
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 16803516ef)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Hans Leidekker fee0e11d36 wbemprox: Implement Win32_OperatingSystem.OperatingSystemSKU.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46895
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5b2113de2d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Hans Leidekker 7748bc4e34 wbemprox: Implement Win32_PhysicalMemory.DeviceLocator.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46894
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 66b2b3ea68)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Louis Lenders 8dbcf21fcf msi: Add MsiSourceListForceResolution{A,W} stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46881
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 2e95d2247d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Gijs Vermeulen d8116f5a6e msvcr120: Add [to]wctrans.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46848
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3229074824)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Piotr Caban ff1ce89f62 msvcrt: Use correct locale when comparing strings in getenv.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b633777ed4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Piotr Caban d3eecb9bf2 msvcrt: Don't detect overflow in atol implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46845
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8c1684a50a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Zebediah Figura b77e677474 msi: Return MSIDBSTATE_ERROR when MsiGetDatabaseState() is called from a custom action.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46812
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 60b1fd7e87)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Zebediah Figura f462faf675 msi/tests: Test calling more functions from custom actions.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ae0298d46e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Paul Gofman c64f450e6e ddraw: Deny adding the same light to viewports multiple times.
According to the logs attached to the bug, the application seems to
spin in endless LIST_FOR_EACH_ENTRY() in viewport_activate(), which
is the result of adding the same light structure to the list twice.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46807
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9bd6b2c2bf)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Louis Lenders 788137f838 explorerframe: Return S_OK in ITaskbarList3 ThumbBarUpdateButtons method.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45429
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit be6a113190)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Louis Lenders b49784271f explorerframe: Return S_OK in ITaskbarList3 ThumbBarAddButtons.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45429
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 570ea01477)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Louis Lenders 7bb2f00bc5 explorerframe: Return S_OK in ITaskbarList3 SetThumbnailTooltip method.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45429
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 978b7c3474)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Sebastian Lackner 9e5e27a7d2 winex11: Forward all clipping requests to the right thread.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38087
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e2389c015c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Alistair Leslie-Hughes 6a5ecfedbc urlmon: Pass unescaped URLs to InternetOpenUrl in ftp protocol handler.
Based on a patch by André Hentschel.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26445
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d99605d714)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Michael Müller 0dd77b7c07 imagehlp: Implement ImageLoad and cleanup ImageUnload.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 55a62c739c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Mark Jansen 52bcfdefdd imagehlp/tests: Add tests for ImageLoad, ImageUnload, GetImageUnusedHeaderBytes.
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3eca7c1f8e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Alistair Leslie-Hughes a5079be68f regedit: Grow the buffer when modifying a DWORD value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=19098
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 75d8081dc6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Zebediah Figura c26d4c91cd hid: Fix length argument to GetOverlappedResult().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a0a3b6b90e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Zebediah Figura 2e94bb648f vbscript: Handle carriage return in more places.
This fixes a regression introduced by 5800c9ed23.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46772
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1bd7dbfbc4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Gijs Vermeulen ddec4bd912 ntoskrnl.exe: Add MmBuildMdlForNonPagedPool stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46761
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 199b5d2ca2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Nikolay Sivov 901742c35a wshom.ocx: Fix string length returned from Check returned BSTR length.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46754
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1866fd659a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Brendan McGrath bf1098a30a kernel32: Allow double quote style escape in argv.
Two quotes together (within outer quotes) represents a single
quote (with the first quote acting as an escape character)

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46721
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 87917df887)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Nikolay Sivov 0c76e18c36 user32: Make GetWindowLong() fail for some values on 64-bit.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c2f4e2b338)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Nikolay Sivov 853731b3a8 user32: Do not touch some of the values on 64-bit with SetWindowLong().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d00ed8e7b9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Louis Lenders 7609f0a253 bthprops.cpl: Add BluetoothFindDeviceClose stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46706
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f59e7f8391)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Matteo Bruni d08c25cfc2 wined3d: Set display mode to a suitable adapter format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46792
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9fc282d682)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Matteo Bruni 97239e6de5 d3d8: Return failure in CheckDeviceFormat() for unsupported adapter formats.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ff92a993ad)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Matteo Bruni 2812878727 d3d9: Return failure in CheckDeviceFormat() for unsupported adapter formats.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46579
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bd7a48c251)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Matteo Bruni bab36ab3b6 d3d8: Release system memory wined3d buffer only after the draw buffer is destroyed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46371
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 873178c03a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:56 +02:00
Matteo Bruni a7bbfcbe40 d3d9: Release system memory wined3d buffer only after the draw buffer is destroyed.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7052e8e390)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-20 21:13:55 +02:00
Zebediah Figura 1b9ff0e8ec mshtml: Open pages in the native browser in HlinkTarget_Navigate().
This matches native Windows behaviour as well, as demonstrated by
running the interactive hlink:hlink tests.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44423
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f29317dcc2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-12 22:34:04 +02:00
Sebastian Lackner f516b26916 server: Improve handling of cursor position clipping for empty rectangle.
Based on a patch by Kevin Buhr.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38791
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42631
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5ff6a11697)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-12 22:30:26 +02:00
Dmitry Timoshkov a8aafa4c27 wininet: Return proper cache path from GetUrlCacheConfigInfo.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0cdca521e9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-12 00:05:53 +02:00
Gijs Vermeulen 47d9d43974 wmvcore: Upgrade to IWMProfileManager2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28847
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3106cef400)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-06-11 23:55:18 +02:00
André Hentschel 89046193dc ntdll: Translate signal to trap when trap code is 0 on ARM.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46187
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 4bfc2c32ff)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-05-15 22:08:48 +02:00
André Hentschel ce799d6b15 include: Fix vararg standard call types for ARM.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 49abdbcda9)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-05-15 22:08:48 +02:00
André Hentschel b692b9def1 kernel32: Add forward for RtlInstallFunctionTableCallback on ARM/ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 63352b5cce)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-05-15 22:08:48 +02:00
André Hentschel 7b61745e38 ntdll: Adjust PC according to THUMB/ARM flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46189
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit abca25b30f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-05-15 22:08:48 +02:00
André Hentschel 553368ff50 ntdll: Add stub for RtlInstallFunctionTableCallback on ARM/ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0e26aaa3ed)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-05-15 22:08:48 +02:00
Michael Stefaniuc d444288268 Release 4.0.1.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 21:30:42 +02:00
Michael Stefaniuc 635d2417a9 tools: Get the ANNOUNCE bug list from the stable-notes git notes.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-27 22:40:40 +02:00
Ken Thomases 9ebf93be20 loader: On Mac, move the top-down allocations area down to avoid regions reserved by the system.
On macOS 10.14 (Mojave), there's a system-wide VM mapping for common system
libraries starting at 0x00007fff00000000.

Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 07d80641d0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne b65f69b3cf kernel32/nls: Change Sinhala sublang identifier to SUBLANG_SINHALESE_SRI_LANKA.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit eb3988f080)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne a90112d178 kernel32/nls: Fix some values in Sinhala NLS file.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a6ca2001eb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne 60203f4aad kernel32: Fix LOCALE_SSCRIPTS value for Sinhala.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 057df12738)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne 0be34e5a0d kernel32: Add the Sinhala NLS file.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b40c14d8aa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne 6cec111568 po: Update Tamil translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a8304e77fb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne 3edfc2d452 po: Update Tamil translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ed408d8def)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne bb93efc3f5 po: Add Tamil translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9e0040b3d1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne a1f5a2903a po: Update Sinhala translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 08d6df5f81)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne f3e1448614 po: Update Sinhala translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c0a503c354)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Isira Seneviratne 2b895a8860 po: Update Sinhala translation.
Signed-off-by: Isira Seneviratne <isirasen96@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit b37c1d83e4)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Paul Gofman b364e0b0e3 user32: Select more appropriate stretch mode for colored images interpolation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46375
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bfe1ea26dd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars ffc5659373 dsound: Add missing SetEventHandle error handling (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9689d6e29e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars 1ff87a653f setupapi: Add a missing return statement (Coverity).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit afe83a7bbe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars fc0f5548e7 windowscodecs: Add missing source_bpp initialization (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1d8882e04b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars 93a396f4de ws2_32: Use heap_realloc instead of HeapReAlloc to avoid an invalid realloc (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 651c446217)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars 2eac88925a riched20: Fix IRichEditOle COM aggregation (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d917f0ef09)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars ab61ff13b1 dinput: Free the device after a callback (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit cf1b9fe2c7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Mark Jansen 2e87908e00 msi: Do not leak rootkey.
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c91f254a77)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars 1d47e2bc99 taskschd: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bff3918553)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars c9dad2c6ce mstask: Move memory allocation to avoid a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e4f15a297f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:18 +02:00
Sven Baars cf05d6679d mstask: Fix some memory leaks on error path (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3804b99e72)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sven Baars ddc0167d6a ole32: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e32b30c323)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sven Baars 427b8c6791 strmbase: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c7f51d85ec)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sven Baars a754861ef7 wsdapi: Fix some memory leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 18ac7e15aa)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sven Baars 66529e3f22 gdiplus: Fix a memory leak on error path (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 85630593b8)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sven Baars 2b0d945252 windowscodecs: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 1f132865ec)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Zhiyi Zhang f0b022bdf5 user32: Fix a memory leak.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7c8cf96e9c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Zebediah Figura e4b249f2e1 ntdll: Avoid crashing while tracing parameters to NtCreateNamedPipeFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7dc459f3d1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Hans Leidekker 8ebf718134 msi: Avoid a crash in RemoveFiles if the component directory is invalid.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46907
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit c7f323107b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Zebediah Figura 3b051c8e4e hid: Handle overlapped file handles.
This fixes a crash in the hid:device tests for me, and likely helps
with bug 46711.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ea7b8ad924)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Andrew Eikum 4614f5acb6 winhttp: Don't crash setting up secure proxy.
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e87f2c399d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Alexandre Julliard 7973e1374a dinput: Add error check to silence a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6925fb0bb6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Zhiyi Zhang d76718e438 d3d8: Fix building on Mac.
bool is a reserved word in c99.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 13cca44d20)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Dmitry Timoshkov 2a532f4809 wpcap: Fix compilation with recent pcap/pcap.h versions.
Recent libpcap versions have added inclusion of pcap/socket.h
to pcap.h that includes sys/socket.h and other system .h files
that lead to conflicts with winsock2.h.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 40c9b46500)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Paul Gofman ea33e9e51b kernel32: Add DECLSPEC_HOTPATCH to FindClose().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28140
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d62187105e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Gijs Vermeulen 97b0486be7 kernel32: Add DECLSPEC_HOTPATCH to SizeofResource().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28140
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 002a19599b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Zhiyi Zhang 1d6a633a26 kernel32: Add DECLSPEC_HOTPATCH to VirtualAllocEx().
Fix Tom Clancy's The Devision uplay version startup crash.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit df3dd6612c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Sveinar Søpler 1ad3a179f6 wined3d: Add GPU information for the NVIDIA RTX series.
Signed-off-by: Sveinar Søpler <cybermax@dexter.no>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ad907fd12e)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Gijs Vermeulen dcd7bf05c1 ntdll: Validate len in NtQueryVirtualMemory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45632
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2d52717af)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Vijay Kiran Kamuju 7372c59d78 wmvcore: Add stub for WMCheckURlExtension.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44300
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 474a6771ba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Nikolay Sivov 3838bc9698 ucrtbase: Add ilogb* functions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 8c8d8e80f5)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Alistair Leslie-Hughes a532a9f7f7 oleaut32: Support VT_DECIMAL in VarRound.
Based on a patch by Carlos Chiriboga Calderon.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=26653
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0c738d900a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Vijay Kiran Kamuju 380d97406f user32: Add DlgDirList wildcard checks.
Based on a patch from Christian Lupien.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=8226
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7a6b00dc25)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Alexandre Julliard 144db807a5 server: Report a 64-bit CPU for IL-only binaries.
Based on a patch by Brendan McGrath.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46319
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9381da9f1c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Piotr Caban b26f35d9ef msvcrt: Fix buffer overflow in _get_tzname.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46481
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 79188582f0)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Paul Gofman 9d66116b9c ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of no buffering.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31954
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7ce2a8e0ae)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Paul Gofman a2b99898e9 ntdll/tests: Add more tests for overlapped file read.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9dc63ca981)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Paul Gofman 984f2a75b2 kernel32/tests: Add test for overlapped file read.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 3117370acc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Paul Gofman 8b7fad0648 wined3d: Only use the LSB of the _SAMP_SRGB_TEXTURE state value.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37705
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 225fdc3558)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Nikolay Sivov d185fc2f1e usp10: Use single path for all fonts in ScriptGetCMap().
Testing tmPitchAndFamily bitmask does not tell if font has mappings defined.
Besides that, GetGlyphIndices() handles bitmap system fonts exactly the same
way alternate path did.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46678
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit df4aaff7a3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Nikolay Sivov 502db40962 comctl32/toolbar: Send BN_CLICKED for button that was pressed, not released.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35516
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f3775ed2ac)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Brendan McGrath 717cfe7f63 vbscript: Allow most keywords to be used as 'dot' identifiers.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46318
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 78078b65b2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Brendan McGrath 2c3ab31c55 vbscript: Allow more keywords to be used as identifiers.
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d2937bfff2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Nikolay Sivov ec10ad3dbc comctl32/propsheet: Avoid posting uninitialized data (Valgrind).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46691
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 71004a825f)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Józef Kucia a6c2eadfc8 wined3d: Add GPU information for Intel HD Graphics 620.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 88aaee78fe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:17 +02:00
Alistair Leslie-Hughes 31b05fdc72 oleaut32: Correctly get the Currency separator in VarFormatCurrency.
LOCALE_SCURRENCY allows for 13 chracters including the NULL.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46442
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 29cf8ee8ab)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Zebediah Figura 449e0c5c0a msvcr120: Add nexttoward implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45631
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 28e74af742)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Piotr Caban df2ae75f87 msvcp140: Don't forward __ExceptionPtrCreate to msvcr120.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46583
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit a91c1e054a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Hans Leidekker fc1c668745 mscms: Add a partial implementation of WcsOpenColorProfileA/W.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46708
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit aeec35ab5a)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Alistair Leslie-Hughes afaf8fa10d mfplat: Implement MFGetSystemTime.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46300
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7907ccfdcb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Paul Gofman d141c9428e wined3d: Return 1e10f for MaxVertexW from wined3d_get_device_caps().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23863
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 91b43bca94)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Hans Leidekker 3b03145299 secur32: Return ISC_RET_USED_SUPPLIED_CREDS for schannel contexts if the feature was requested.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46127
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e31bc3dbdb)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Zebediah Figura e822720a1d comsvcs: Create an implicit MTA thread in RegisterDispenser().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46581
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ac1bb45364)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Zebediah Figura 0c60e7a27c comsvcs/tests: Add tests for implicit MTA creation in RegisterDispenser().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 62d67bdebe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Nikolay Sivov 59202a9a6a comctl32/listview: Take care of scrolling offset when repositioning header.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 5b397df631)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Alistair Leslie-Hughes c75d8e66a5 dsound: IDirectSoundNotify is only available when DSBCAPS_CTRLPOSITIONNOTIFY is specified.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45473
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9a258c5dd7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Paul Gofman ac96d882bf wined3d: Use lower 8 bits only from _ALPHAREF state.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38138
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6963fd0bef)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Nikolay Sivov 4e8dc0577c d3d11: Implement d3d11_device_GetImmediateContext1().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46298
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 9ede653d0d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Józef Kucia ea092de37c d3d9: Validate surface parameter in d3d9_device_ColorFill().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46482
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit ac36e446c3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Gabriel Ivăncescu 284049f770 libport: Handle partially overlapping buffers.
Cause of bug discovered by Jason Edmeades.

Some applications partially overlap the two buffers, so don't assume they
don't overlap.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38558
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e84c26cec6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Dmitry Timoshkov bf3ca297c5 windowscodecs: Implement IWICPalette::InitializeFromBitmap.
Based on median cut implementation created by Sebastian Lackner.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d102d6e9f7)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Matteo Bruni 4c37270f0e d3dx9/tests: Avoid some 64-bit test failures.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 699eb8cdba)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Matteo Bruni 212b24164e d3dx9: Improve D3DXMatrixTransformation2D().
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit dba1304bdd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-26 22:41:16 +02:00
Matteo Bruni e36c8d616e d3dx9: Improve D3DXMatrixTransformation() implementation.
Inspired by a patch from David Adam.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33456
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f54260a789)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 20:59:56 +02:00
Nikolay Sivov ed80f1c4e7 user32/dialog: Fix setting negative dialog item ids.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46494
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 47a44e6d9c)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 20:58:14 +02:00
Zhiyi Zhang b357d44e9e user32: Check for null handle in GetRawInputData().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46499
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bd730a5f41)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 20:56:33 +02:00
Fabian Maurer fe771ad8ac ucrtbase: Forward a few functions for dxil.dll and pkgmgr.exe.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44469
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e9c90afc06)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 20:56:20 +02:00
Fabian Maurer 697e9d04b2 api-ms-win-crt-private-l1-1-0: Update to 10.0.17134.12 (WinBuild.160101.0800).
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit d77464d8da)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 20:56:09 +02:00
Sebastian Lackner e98f711639 wtsapi32: Improve WTSQueryUserToken stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39663
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0e89c840a6)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-07 16:17:15 +02:00
Jacek Caban 1ddfedd051 ntoskrnl.exe: Add __C_specific_handler entry.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 496447f03b)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 23:35:57 +02:00
Piotr Caban f788805244 msvcrt: Optimize toupper function when locale was never changed.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6886717631)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 23:29:44 +02:00
Piotr Caban a6debb6796 msvcrt: Optimize tolower function when locale was never changed.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit e867af3bfe)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 23:28:54 +02:00
Józef Kucia 8cb1de4d06 ddraw: Pass correct box when mapping system memory vertex buffers.
This fixes a regression introduced by commit
5a8e430b96.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46536
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 445b97b2a2)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:41:50 +02:00
Nikolay Sivov e8a705b4c8 comctl32/progress: Handle min == max case in PBM_STEPIT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46485
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 620a25ef1d)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:40:50 +02:00
Gijs Vermeulen c9a2aa88e9 msvcp140: Export _Equivalent and port tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46465
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 7e2816d2f1)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:38:47 +02:00
Nikolay Sivov 4843534b28 api-ms-win-core-libraryloader-l1-2-1: Add missing FindResourceW() forward.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 0e094fa9bd)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:35:39 +02:00
David Adam 6b5088b371 ddraw: Fix the "dwMipMapCount" field of texture sub-levels.
Instead of the total count, it indicates the count starting from the current
level.

Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit f5d7d9cccc)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:34:28 +02:00
David Adam 2b941ca0c3 ddraw/tests: Add tests for the "dwMipMapCount" field of texture sub-levels.
Signed-off-by: David Adam <david.adam.cnrs@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit 6ec69f0ee3)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:34:02 +02:00
Zhiyi Zhang 7483a38d4c msacm32: Reference count local drivers.
One local driver can be assigned to multiple driver ids.
When releasing the driver id, check if the reference count
of a local driver is one before actually releasing the local driver.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46520
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
(cherry picked from commit bbdf6d5e21)
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
2019-04-05 22:31:34 +02:00
633 changed files with 29364 additions and 4049 deletions

716
ANNOUNCE
View File

@ -1,19 +1,12 @@
The Wine team is proud to announce that the stable release Wine 4.0
is now available.
The Wine maintenance release 4.0.4 is now available.
This release represents a year of development effort and over 6,000
individual changes. It contains a large number of improvements that
are listed in the release notes below. The main highlights are:
- Vulkan support.
- Direct3D 12 support.
- Game controllers support.
- High-DPI support on Android.
What's new in this release (see below for details):
- Various bug fixes
The source is available from the following locations:
https://dl.winehq.org/wine/source/4.0/wine-4.0.tar.xz
http://mirrors.ibiblio.org/wine/source/4.0/wine-4.0.tar.xz
https://dl.winehq.org/wine/source/4.0/wine-4.0.4.tar.xz
http://mirrors.ibiblio.org/wine/source/4.0/wine-4.0.4.tar.xz
Binary packages for various distributions will be available from:
@ -29,462 +22,247 @@ AUTHORS in the distribution for the complete list.
----------------------------------------------------------------
What's new in Wine 4.0
======================
*** Direct3D
- Initial support for Direct3D 12 is implemented. Direct3D 12 support
requires the vkd3d library, and a Vulkan-capable graphics card.
- The Multi-Threaded Command Stream feature is enabled by default.
- OpenGL core contexts are always used by default when available. In
the previous release, these were already used by default for
Direct3D 10 and 11 applications on AMD and Intel graphics
cards. That has been extended to all graphics cards, and all
versions of Direct3D before 12.
- Among others, the following notable Direct3D 10 and 11 features are
implemented:
- Multi-sample textures and views, as well as multi-sample resolves.
- Per-sample fragment shading.
- Support for 1D textures.
- Draws without render target views or depth/stencil views.
- Multiple viewports and scissor rectangles per draw.
- Depth clipping control.
- Depth bias clamping.
- Stream output without geometry shaders.
- Several more capability queries.
- Several more resource formats.
- The "depth bias clamping" feature mentioned above requires the
ARB_polygon_offset_clamp/EXT_polygon_offset_clamp OpenGL
extension. All Direct3D 10+ capable hardware should be able to
support that extension, but it has come to our attention that some
NVIDIA "Legacy Drivers" do not. We encourage affected users to
explore whether the Free Software Nouveau drivers meet their needs.
- Several Direct3D 11 interfaces have been updated to version 11.2,
and several DXGI interfaces have been update to version 1.6. This
allows applications requiring those newer interfaces to start
working.
- The first steps towards more fine-grained locking in the Direct3D
implementation have been taken. This will be an ongoing effort to
take better advantage of modern high core count CPUs.
- Support for using the correct swap interval is implemented, for both
DXGI and DirectDraw applications.
- Application-configurable frame latency is implemented for Direct3D
9Ex and DXGI applications.
- S3TC-compressed 3D textures are supported. S3TC-compressed 2D
textures were already supported, provided the OpenGL drivers
supported them.
- When the ARB_query_buffer_object OpenGL extension is available,
query results can be polled with lower latency, resulting in a
modest performance improvement in specific cases.
- Validation of Direct3D 8 and 9 resource pool and usage restrictions,
as well as blit restrictions, has been improved.
- The Direct3D graphics card database recognizes more graphics cards.
- New HKEY_CURRENT_USER\Software\Wine\Direct3D registry keys:
- "MultisampleTextures" (REG_DWORD)
Enable (0x1, default) or disable (0x0) support for multi-sample
textures.
- "Renderer" (REG_SZ)
The backend API to target. Possible values are "gl" (default) for
OpenGL and "gdi" for GDI.
- Deprecated HKEY_CURRENT_USER\Software\Wine\Direct3D registry key:
- "DirectDrawRenderer"
This has been superseded by the "Renderer" setting above.
- Removed HKEY_CURRENT_USER\Software\Wine\Direct3D registry key:
- "StrictDrawOrdering"
This feature was previously deprecated in favor of the
multi-threaded command stream feature, and has been completely
removed.
*** Graphics
- A complete Vulkan driver is implemented, using the host Vulkan
libraries under X11, or MoltenVK on macOS.
- A builtin vulkan-1 loader is provided as an alternative to the SDK
loader.
- Icons in PNG format are supported, enabling loading high-resolution
256x256 icons.
- The standard icons include a 256x256 version to take advantage of
the PNG support.
- Many Direct2D interfaces have been updated to version 1.2.
- New HKEY_CURRENT_USER\Software\Wine\Direct2D registry key:
- "max_version_factory" (REG_DWORD)
Limit the interface version of the ID2D1Factory interface to the
specified version. 0x0 for ID2D1Factory, 0x1 for ID2D1Factory1,
etc. By default there is no limit.
- Using an ARGB visual as default X11 visual is supported.
- The old 16-bit DIB.DRV driver is implemented using the DIB engine.
- Polygon drawing in the DIB engine is much faster for large polygons.
- A0, A1 and A2 paper sizes are supported for generic printers.
- Arrows are supported in GdiPlus.
*** Kernel
- Support for running DOS binaries under Wine is removed. When
execution of a DOS binary is requested, an external DOSBox instance
is launched. This doesn't apply to Win16 binaries, which are still
supported internally.
- All the CPU control and debug registers can be accessed by kernel
drivers, including on 64-bit.
- Events, semaphores, mutexes and timers are implemented in kernel
mode for device drivers.
- The WaitOnAddress synchronization primitives are supported.
- Reported processor information correctly distinguishes logical and
physical CPU cores to support hyper-threading.
- Detailed BIOS information can be queried on Linux platforms.
- The various debugger APIs support manipulating a 32-bit Wow64
process from a 64-bit process context.
- Application settings, compatibility information and execution levels
are recognized in application manifests.
- The various file I/O completion modes are implemented.
- Debug registers are supported on NetBSD.
*** User interface
- The infrastructure for setting DPI awareness and scaling of non
DPI-aware applications is implemented. However, actual scaling of
window contents is only supported on Android at this point.
Scaling is disabled by default and can be enabled by setting the
"DpiScalingVer" value under HKEY_CURRENT_USER\Control Panel\Desktop.
- Window class redirection is supported, enabling support of Common
Controls version 6 features for standard USER controls like buttons.
- The standard USER controls Button, Listbox, Combobox, Edit and
Static support version 6 features, including theming.
- The standard Task Dialog is implemented, including support for
icons, hyperlinks, progress bars, and various other UI elements.
- Cue banners are supported in version 6 of the Edit control.
*** Desktop integration
- Exporting MIME-type file associations to the native desktop can be
disabled with a checkbox under the Desktop Integration tab in
winecfg. It can be configured programmatically by setting the
"Enable" value under
HKEY_CURRENT_USER\Software\Wine\FileOpenAssociations.
- The File Dialog can display file properties like size, times and
attributes.
- The File Dialog optionally shows the Places toolbar on the left-hand
side.
- The shell folder Public is used instead of AllUsersProfile to follow
the behavior of recent Windows versions.
- The shell File Browser supports keyboard shortcuts to rename (F2
key) and delete (Delete key) shell folders.
- Many standard icons are added to the Shell library.
- Shell Autocompletion is supported.
- In desktop mode the taskbar won't be displayed on top of fullscreen
windows.
- Additional names are provided for standard cursors to better match
existing X11 cursor themes.
*** Input devices
- HID game controllers are supported in the XInput and Raw Input APIs.
- An SDL driver is implemented to make SDL game controllers
available through the HID interface.
*** Internet and networking
- JScript has an EcmaScript compliant mode, which supports a number of
features not available in legacy mode.
- JavaScript property accessors are supported.
- HTML style object is rewritten to support standard-compliant mode.
- HTML documents respect X-UA-Compatible HTTP header, allowing web
pages to request specific compatibility mode. The
HKEY_CURRENT_USER\Software\Wine\MSHTML\CompatMode key may be used to
override the requested mode.
- MSHTML supports non-HTML elements, allowing limited SVG support.
- A number of new HTML APIs are supported.
- The proxy server can be configured through the Internet Control
Panel applet.
- Stream I/O is implemented in WebServices.
- The Web Services on Devices API (WSDAPI) is implemented, including
sending and receiving the various message types.
- More system information is reported through WBEM, including CPU,
BIOS, video controller, and network adapter properties.
*** Cryptography
- Asymmetric encryption keys, as well as RSA and ECDSA signature
verification are supported.
- The GCM and ECB encryption chaining modes are supported.
- Optimal Asymmetric Encryption Padding (OAEP) is supported in RSA
encryption.
- A Kerberos security provider is implemented, supporting Kerberos
authentication.
- A selection dialog for public key certificates is implemented.
- If available, GnuTLS is used on macOS in preference to the
CommonCrypto framework.
*** Text and fonts
- Character tables are based on version 11.0.0 of the Unicode Standard.
- The new subpixel font rendering of FreeType >= 2.8.1 is supported.
- When a font face is missing, FontConfig is queried to provide
possible substitutions.
- The font selected in the console emulator properly scales with the
display DPI.
- Memory font resources are supported in DirectWrite.
- The builtin Wingdings font contains clock images.
*** Audio
- The Windows Media Player interfaces are implemented and support
media playback.
- An MP3 decoder is provided as DirectX Media Object.
*** macOS
- The preloader is implemented on macOS, for better address space
layout compatibility.
- The Command key can be mapped to Ctrl, by setting the
"LeftCommandIsCtrl" or "RightCommandIsCtrl" values under
HKEY_CURRENT_USER\Software\Wine\Mac Driver.
- The App Nap energy-saving feature is disabled by default in GUI
processes. It can be re-enabled by setting the "EnableAppNap" value
under HKEY_CURRENT_USER\Software\Wine\Mac Driver.
*** Android
- Setting the mouse cursor is supported using the APIs available in
Android >= 7.
- The new version of the Android graphics buffer allocator API is
supported, to enable graphics support on Android >= 8.
- Android x86-64 platforms are supported also in 64-bit mode, however
WoW64 mode is not supported yet in the WineHQ packages.
*** ARM platforms
- Stubless COM proxies are implemented on ARM.
- The Windows calling convention for variadic functions is supported
on ARM64.
- Exception handling and debugging is better supported on ARM64
platforms.
- The MinGW toolchain is supported for cross-compilation to ARM64.
*** Built-in applications
- The Ping program provides actual pinging functionality using
IcmpSendEcho.
- The SchTasks task scheduler program can create and delete tasks.
- The RegEdit registry editor has an improved hex editor for binary
values.
- FOR loops are properly handled in the Command Interpreter.
- The XCopy program supports the /k (keep attributes) option.
*** Internationalization
- The Japanese 106 keyboard is properly supported.
- Translation of timezone names is supported.
- There is a partial translation to the Sinhala language.
- More locales are supported in the Resource Compiler (wrc) and
Message Compiler (wmc).
*** Development tools
- winedbg supports debugging WoW64 processes.
- In gdb proxy mode, winedbg supports a --port option to specify the
port used to connect to gdb.
- winegcc uses better heuristics for finding the appropriate lib
directory for 32/64-bit cross-compiles.
- winegcc supports building native subsystem libraries.
- winegcc also looks for includes in the top-level include directory
of the installation prefix.
- winebuild supports a -mfpu option for specifying the FPU
architecture on ARM platforms.
- winedump supports dumping SLTG-format typelibs.
*** IDL compiler
- Application Configuration Files (ACF) are supported.
- Asynchronous interfaces are supported.
- Type and method serialization using encode/decode attributes is
supported.
- The defaultvalue() attribute is supported for pointer types.
- Generated files are always specific to the target platform. The
target can be specified the same way as with the other tools,
using the cpu-manufacturer-os platform specification.
- Nesting of pointers and arrays works correctly.
- Correct size and alignment are generated for encapsulated unions.
- The __int32 type is supported.
- The -robust command line option is recognized (but ignored) for
compatibility with the Microsoft IDL compiler.
- Multiple typelibs can be generated into a single resource file.
*** .NET
- 32-bit CIL-only .NET binaries are supported on 64-bit.
- The Mono engine is updated to version 4.7.5 with some upstream Mono
fixes.
*** RPC/COM
- The typelib marshaller is reimplemented. It generates format strings
and then uses the standard NDR marshalling routines; this way it
also works on 64-bit and ARM platforms.
*** Installers
- MSI custom actions run in a separate process, enabling proper
support for mixed 32/64-bit installers.
- Deferred installation actions are supported in MSI.
*** Build infrastructure
- The test framework supports building helper dlls inside a test, to
allow testing features that require loading an external library.
- The test framework supports testing Windows kernel drivers.
- It is possible to build and run a WoW64 tree from inside the Wine
source directory. Previously an out-of-tree build was required.
- A .editorconfig file is provided with the recommended indentation
parameters.
*** Miscellaneous
- The Task Scheduler service and APIs are implemented.
- The Windows Management Instrumentation service is implemented.
- The OPC Services (Open Packaging Conventions, used for Microsoft
Office XML files) library is implemented.
- The HKEY_PERFORMANCE_DATA magic registry key is partially
implemented.
*** New external dependencies
- The Vulkan library is used to implement the Vulkan graphics driver.
- The Vkd3d library is used to implement Direct3D 12 on top of Vulkan.
- The SDL library is used to support game controllers.
- The GSSAPI library is used to implement Kerberos authentication.
Bugs fixed in 4.0.4 (total 65):
11998 NEXON client installers using embedded IE browser control: buttons don't respond to click (Lunia Senki, Combat Arms, War Rock)
12406 Microsoft Document Explorer 2008 crashes when using MS Help 2 URL from command line (ieframe's WebBrowser COM object doesn't support aggregation)
16808 Password Safe crashes with page fault when renaming entries
20465 Brothers In Arms Hell's Highway : Setup asks for DVD for every .cab file (SetupPromptForDiskA/W should only show a dialog if the file doesn't exist)
22030 LegoLand: crashes at main menu without native directmusic
24529 TSDoctor 1.0.58 fails to run
25264 treeview wstr overrun in TVN_GETDISPINFOW (ExamXML crashes when opening an XML file)
25728 UFO: Extraterrestrials Gold - crash at start caused by wine's built-in dsound/directmusic
30506 GdipGraphicsClear() needs to overwrite pixels, not alpha blend (Text misrendered in Brain Workshop)
34041 Skyrim (Steam) hangup on quit
34666 In The Adventures Of Lomax some graphic elements flicker, disappear or are garbled
36388 Problems with Russian localization in page setup dialog
38300 using winegcc with stdin passes arguments in the wrong position to gcc
38817 FXCM Trading Station II installer reports 'OLE error 80004001' when running as 'Windows Vista' or higher ('ITaskbarList3::ThumbBarSetImageList' is a stub)
39692 64-bit dlls/msdaps/row_server_p.c generates build warnings (discarded "const" qualifier)
40364 Broken geometry in Indiana Jones and the Emperor's Tomb
40740 Broken Sword: The Angel of Death demo needs IDirectSoundFXI3DL2Reverb interface
40777 The Moment of Silence launcher unusable (displays only black)
41639 Wine with freetype 2.7 causes font rendering issues
41936 The Witcher 2: Assassins of Kings - menus and subtitles rendered incorrectly (with built-in d3dx9)
42046 VSDC Video Editor. Crashes in ole32 when opening.
43368 HashMyFiles: Drag & Drop from native File Managers (Dolphin, Nautilus, ...) does not work
43817 Multiple .NET applications (Chime, DxO Photolab 2 trial) crash, need RegisterApplicationRecoveryCallback to return S_OK
44408 Tetris for Windows has wrong colors for the game pieces and the score box
45031 HotS - taking screenshot causes client crash, needs d3dx11_42.dll.D3DX11SaveTextureToFileW
45732 Far Cry 5 Cannot Steer Land Vehicles
46279 Multiple applications need msvcr120.dll.?_Yield@_Context@details@Concurrency@@SAXXZ (Darkest Dungeon, Noita, Amazon Kindle for PC)
46404 Shed installer - text overflow in browse-for-folder dialog
46417 Abiword 2.6.8 comboboxes should have a white background color
46421 μTorrent has squares in its update dialog
46560 Smoke not rendering properly in Castlevania: Lords of Shadow 2
46578 IVMU Social Network Client (500 series) crashes when selecting menu / settings
46972 Adobe DNG Converter 11.2+ runs into Call to unimplemented function api-ms-win-core-winrt-error-l1-1-0.dll.GetRestrictedErrorInfo
46981 winetricks -q --verify dotnet461 crashes under win64
46983 type command in cmd.exe with two files and stdout redirect, behavior is different
47049 boolean type defined as 'unsigned char' rather than 'char'
47075 32-bit LAVFilters 0.74.x installer fails to register 64-bit AX codec/filters in Wow64 environment (32-bit regsvr32.exe needs to support 64-bit dll registration and vice versa by re-exec with proper bitness)
47101 Multiple 64-bit game and application crash reporting tools need x86_64 'ntdll.RtlCaptureStackBackTrace' implementation
47427 Glide wrapper - Configuration buttons misbehaving
47433 Accel World vs. Sword Art Online needs WTSRegisterSessionNotificationEx() to return true.
47459 ListBox LB_SETSEL doesn't scroll to newly selected item
47615 _putws outputs NULs, other wchar.h functions don't
47693 ExHIBIT (Sample Project): Can't select menu item in the title screen
47709 Zoom Edit&Share 5.0.0.0: installer crashes starting with wine-3.19
47752 commit "winex11.drv: Wake up the display on user input." introduced severe performance issues with atomic modesetting kernel drivers
47779 iCloud refuses to install: "Your computer is missing Media features."
47790 putty.exe displays an error at startup when placed in a path with accented characters.
47820 Magic: The Gathering Arena installer needs powershell.exe (cannot find it)
47832 FindFirstFileExW believes every directory entry has been read if NtQueryDirectoryFile underfills buffer
47833 FindFirstFileExW seems to be missing FILE_OPEN_FOR_BACKUP_INTENT flag to NtOpenFile
47880 Need for Speed: Carbon - Autosculpt causes geometry corruption and GL_INVALID_OPERATION error
47918 Blur: cars have no wheels when Wine is compiled with Ryzen optimisations
47935 Nextiva: Logging in fails with "Client is unable to connect to the server."
47956 IGMP source specific multicast does not create join requests for source
47979 NtCreateFile incorrectly returns STATUS_OBJECT_NAME_NOT_FOUND when RootDirectory is populated
47986 R-Studio (file recovery tool) wants ntoskrnl.exe.IoCreateUnprotectedSymbolicLink
47991 motec i2 pro v1.0 data logger fails to start
48016 Multiple applications need shcore.dll.GetScaleFactorForMonitor stub (Karafun player, Sync)
48077 UPlay fails to start : "Error at hooking API NtProtectVirtualMemory" (UPlay's hooking engine can't handle ENDBR32 instruction inserted at non-hotpatch API entries due to distro build environments '-fcf-protection')
48082 Visual C++ Express 2005 needs shell32.PathResolveW implementation (or fake success)
48088 Wrong color mapping with client-side graphics on 256-color X server
48242 IXMLDOMDocument_load() paths aren't URL-unescaped (Microsoft Document Explorer 2008 startup error)
48314 Building wine on CentOS7 fails due to lack of libkrb5
48358 Dell Latitude E6440 BIOS updater crashes on unimplemented function ntoskrnl.exe.KeSetImportanceDpc
48549 Arma Cold War Assault: Cursor stuck at low fps since Wine 5.0-rc6
----------------------------------------------------------------
Changes since 4.0.3:
Akihiro Sagawa (5):
comctl32/tests: Add tests to show no NM_RELEASEDCAPTURE notifications in the updown control.
comctl32/updown: Suppress the NM_RELEASEDCAPTURE notification.
msvcrt/tests: Add more tests for _mbsspn and _mbsspnp.
msvcrt: Fix _mbsspn implementation.
msvcrt: Reimplement _mbsspnp using _mbsspn.
Alex Henrie (2):
ntoskrnl: Implement IoCreateUnprotectedSymbolicLink.
ntoskrnl: Add KeSetImportanceDpc stub.
Alexandre Julliard (7):
ntdll: Always add path separator when looking for a relative path name.
winex11: Use the default color table for window surfaces on 8bpp displays.
configure: Disable gssapi also when linking with kerberos doesn't work.
msi: Use %define api.pure instead of %pure-parser.
msxml3: Use %define api.pure instead of %pure-parser.
vbscript: Use %define api.pure instead of %pure-parser.
wbemprox: Use %define api.pure instead of %pure-parser.
Alistair Leslie-Hughes (6):
dsound: Primary buffer doesn't support flag DSBCAPS_CTRLFX.
kernel32: FindFirstFileExW needs to open the directory with FILE_OPEN_FOR_BACKUP_INTENT flag.
dmloader: Stop after find first matching object.
dmstyle: Add GUID_IDirectMusicStyle support in Style Track GetParam.
dmime: IDirectMusicSegment8 SetLoopPoints support zero start/end.
dinput: Cap the buffer size to 20.
Andrew Eikum (1):
winex11.drv: Throttle calls to XResetScreenSaver.
Andrew Sheldon (1):
wined3d: Add Navi 10 PCI id and device description.
Bernhard belacker (1):
cmd.exe: Command type with multiple files should print filenames to stderr.
Byeong-Sik Jeon (2):
gdi32: Add a helper macro for FreeType version check.
gdi32: Add a workaround for Freetype < 2.8.1 using v40 FT_LOAD_TARGET_MONO.
Charles Davis (2):
ntdll: Implement RtlCaptureStackBackTrace() for x86_64.
winemac.drv: Pass the CAMetalLayer to MoltenVK.
Damjan Jovanovic (12):
comctl32: Test the treeview edit control EM_LIMITTEXT.
comctl32: Implement treeview edit control EM_SETLIMITTEXT.
comctl32: Test treeview text trimming after label editing is complete.
comctl32: Test text buffer passed to TVN_ENDLABELEDIT is always MAX_PATH chars long.
comctl32: Test overwriting of pszText contents in TVN_ENDLABELEDIT.
comctl32: Test overwriting of pszText pointer in TVN_ENDLABELEDIT.
comctl32: Implement treeview edit control text trimming and overwriting.
comctl32: Allocate the right wstr size for the TVN_GETDISPINFOW reply.
ieframe: Implement COM aggregation in WebBrowser.
msxml3: All string passed to IXMLDOMDocument_load() need to be URL-unescaped.
gdiplus: GdipGraphicsClear() should overwrite pixels, not alpha blend.
winex11.drv: Ignore .dwAspect in FORMATETC during XDnD.
Dmitry Timoshkov (2):
gdiplus/tests: Add some tests for GdipInitializePalette.
mshtml: Add support for DIID_HTMLDocumentEvents2 connection point sink.
Ethan Lee (1):
wined3d: Add Intel HD 615 PCI id and device description.
Fabian Maurer (7):
comctl32/syslink: Properly handle '\r'.
shell32: Prevent text truncation inside the old "browse folder" dialog.
ws2_32: Handle more IGMP socket options.
comctl32/tests: Add combo tests for WM_CTLCOLOR*.
comctl32/combo: Properly handle WM_CTLCOLOR* messages.
user32/tests: Add combo tests for WM_CTLCOLOR*.
user32/combo: Properly handle WM_CTLCOLOR* messages.
Felix Hädicke (1):
msvcrt: Use memmove() instead of memcpy() puts_clbk_str().
Gijs Vermeulen (2):
msvcrt: Add Concurrency::details::_Context::_Yield stub.
shell32: Implement PathResolve.
Isira Seneviratne (1):
jscript: Replace '%pure-parser' with '%define api.pure'.
Jacek Caban (2):
kernel32: Terminate process in unhandled exception handler.
include: Add roerrorapi.h header.
Jeff Smith (3):
kernelbase: Fix PathAllocCanonicalize handling segments that contain dots.
kernel32: Quote first command line arg in process paramenters.
user.exe16: Releasing DC does not disable it.
Joseph Kogut (1):
iphlpapi: Report success in NotifyIpInterfaceChange.
Ken Thomases (1):
winemac: Only manipulate an NSOpenGLContext's view on the main thread.
Kevin Puetz (1):
winegcc: Correctly pass the '-' file name (stdin) to the compiler.
Liam Middlebrook (1):
d3dx11: Add D3DX11SaveTextureToFileA/W() stub.
Louis Lenders (5):
wine.inf: Add value for DigitalProductId.
kernel32: Return S_OK in RegisterApplicationRecoveryCallback stub.
wine.inf: Install powershell.exe in WindowsPowerShell/v1.0/.
include: Add restrictederrorinfo.idl.
combase: Add GetRestrictedErrorInfo and RoOriginateLanguageException stubs.
Matteo Bruni (1):
d3dx9: Handle non-zero source rect position in D3DXLoadSurfaceFromMemory().
Michael Müller (3):
wine.inf: Create the WindowsMediaVersion key and set its default value.
ole32: Fix property name handling for dictionary entries in CP_UNICODE case.
setupapi: Add support for IDF_CHECKFIRST flag in SetupPromptForDiskW.
Myah Caron (1):
kernel32: Allow NtQueryDirectoryFile underfilling FileInformation.
Nikolay Sivov (4):
po: Fix Russian strings for page setup dialog.
comctl32/rebar: Fix invalid band index access.
explorerframe: Return success from ThumbBarSetImageList().
user32/listbox: Update caret index on LB_SETSEL.
Patrick Hibbs (1):
wtsapi32: Make WTSRegisterSessionNotificationEx's return consistent with WTSRegisterSessionNotification.
Paul Gofman (7):
wined3d: Allow loading buffers mapped through system memory.
ddraw: Enable lighting only if material is set in d3d_execute_buffer_execute().
ddraw: Fix vertex buffer offset in d3d_execute_buffer_execute().
d3d8: Fix stream data skip count in convert_to_wined3d_declaration().
user32: Fix coords in WINDOWPOS for WM_NCCALCSIZE sent from SetWindowPos().
ntdll: Add DECLSPEC_HOTPATCH to NtProtectVirtualMemory().
d3dx9: Pass D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY when appropriate.
Piotr Caban (4):
wbemdisp: Handle NULL signatures in init_members.
msvcrt: Fix _putws implementation.
msi: Fix component Action for shared components in CostFinalize.
ntdll: Work around futimens weak linking problem in set_file_times.
Richard Pospesel (1):
widl: Use FC_CHAR rather than FC_BYTE for boolean typedef to match midl.exe output.
Rémi Bernon (3):
widl: Cast freed pointers to void* to fix discarded-array-qualifiers warning.
dinput: Increase device buffer size to 1024.
opencl: Define CL_TARGET_OPENCL_VERSION 220 to fix a header warning.
Vijay Kiran Kamuju (1):
shcore: Add stub for GetScaleFactorForMonitor.
Vincent Povirk (1):
regsvr32: Re-exec as 32-bit or 64-bit if necessary.
Zebediah Figura (2):
winex11: Track the client colormap separately.
qedit/mediadet: Check for failure from IEnumPins::Next().
Zhiyi Zhang (1):
kernelbase/tests: Add more PathAllocCanonicalize tests.
--
Alexandre Julliard
julliard@winehq.org
Michael Stefaniuc
mstefani@winehq.org

20
AUTHORS
View File

@ -183,6 +183,7 @@ Bernd Fuhrmann
Bernd Herd
Bernd Paysan
Bernd Schmidt
Bernhard belacker
Bernhard Loos
Bernhard Reiter
Bernhard Rosenkraenzer
@ -222,6 +223,7 @@ Bruno Afonso
Bruno Jesus
Bryan DeGrendel
Bryan Mayland
Bryon Roche
Byeong-Sik Jeon
Caibin Chen
Cameron Heide
@ -426,6 +428,7 @@ Elias Benali
Elias Ross
Elie Morisse
Emmanuel Maillard
Enol Puente
Enrico Horn
Erez Volk
Eric Anholt
@ -448,6 +451,7 @@ Erik Svendsen
Erwin Wolff
Eryk Wieliczko
Ethan Chen
Ethan Lee
Eugene Mayevski
Eugeny Gorelov
Evan Deaubl
@ -464,6 +468,7 @@ Fabrice Ménard
Farshad Agah
Fatih Aşıcı
Federico Schwindt
Felix Hädicke
Felix Janda
Felix Nawothnig
Ferenc Wagner
@ -773,6 +778,7 @@ John Reiser
John Richardson
John R. Sheets
John Sheu
John Thomson
John Voltz
John Zero
Jonas Maebe
@ -798,6 +804,7 @@ Jose Alonso
Josef Meixner
José Manuel Ferrer Ortiz
Jose Marcos López Caravaca
Joseph Kogut
Joseph Pranevich
Jose Rostagno
Josh DuBois
@ -870,6 +877,7 @@ Kevin Groeneveld
Kevin Holbrook
Kevin Koltzau
Kevin Krammer
Kevin Puetz
Kieran Clancy
Kieran Duggan
Kim Geonwoo (김건우)
@ -901,6 +909,7 @@ Krishna Murthy
Kris Marsh
Kristiaan Lenaerts
Kristian Nielsen
Kristján Gerhardsson
Kristofer Henriksson
Kristoffer Gleditsch
Krzysztof Foltman
@ -929,6 +938,7 @@ Leonardo Quijano Vincenzi
Leonid Lobachev
Leo van den Berg
Leslie Choong
Liam Middlebrook
Li Keqing
Lilia Roumiantseva
Linus Torvalds
@ -1003,6 +1013,7 @@ Martin Dalecki
Martin Fuchs
Martin Garton
Martin Jesper Low Madsen
Martin Liska
Martin Payne
Martin Petricek
Martin Pilka
@ -1120,6 +1131,7 @@ Moshe Vainer
Mounir Idrassi
Muneyuki Noguchi
Murali Pattathe
Myah Caron
Mykola Zadorozhnyy
Natanael Copa
Nathan Beckmann
@ -1144,6 +1156,7 @@ Niels de Carpentier
Niels Kristian Bech Jensen
Nigel Liang
Nikita V. Youshchenko
Nikola Pavlica
Nikolas Zimmermann
Nikolay Bogoychev
Nikolay Sivov
@ -1188,6 +1201,7 @@ Patrick Ammann
Patrick Armstrong
Patrick Gauthier
Patrick Haller
Patrick Hibbs
Patrick J. McNerthney
Patrick Moran
Patrick Rudolph
@ -1305,6 +1319,7 @@ Reece H. Dunn
Reinhard Karcher
Rein Klazes
Rémi Assailly
Rémi Bernon
Renu Rajput
Rex Tsai
Rhys McGuckin
@ -1317,6 +1332,7 @@ Richard A Lough
Richard Bradbrook
Richard Cohen
Richard Mortimer
Richard Pospesel
Richard Stonehouse
Rich Ercolani
Rick Mutzke
@ -1479,6 +1495,7 @@ Sunil Mohan Adapa
Supphachoke Suntiwichaya
Susan Farley
Svante Signell
Sveinar Søpler
Sven Baars
Sven Hesse
Sven Paschukat
@ -1499,6 +1516,7 @@ Thomas Crider
Thomas Faber
Thomas Faller
Thomas Fitzsimmons
Thomas J. Moore
Thomas Kho
Thomas Mertes
Thomas Mullaly
@ -1518,6 +1536,7 @@ Tim Hentenaar
Tim Newsome
Timo Kreuzer
Timo Teräs
Tim Schumacher
Tim Schwartz
Tim Segall
Tim Wanders
@ -1587,6 +1606,7 @@ Vitaly Budovski
Vitaly Lipatov
Vitaly Perov
Vit Hrachovy
Vlad Bespalov
Vladdy Impaler
Vladimir Bespalov
Vladimir Pankratov

View File

@ -1 +1 @@
Wine version 4.0
Wine version 4.0.4

25
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for Wine 4.0.
# Generated by GNU Autoconf 2.69 for Wine 4.0.4.
#
# Report bugs to <wine-devel@winehq.org>.
#
@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Wine'
PACKAGE_TARNAME='wine'
PACKAGE_VERSION='4.0'
PACKAGE_STRING='Wine 4.0'
PACKAGE_VERSION='4.0.4'
PACKAGE_STRING='Wine 4.0.4'
PACKAGE_BUGREPORT='wine-devel@winehq.org'
PACKAGE_URL='https://www.winehq.org'
@ -2390,7 +2390,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Wine 4.0 to adapt to many kinds of systems.
\`configure' configures Wine 4.0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -2460,7 +2460,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Wine 4.0:";;
short | recursive ) echo "Configuration of Wine 4.0.4:";;
esac
cat <<\_ACEOF
@ -2692,7 +2692,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Wine configure 4.0
Wine configure 4.0.4
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@ -3376,7 +3376,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Wine $as_me 4.0, which was
It was created by Wine $as_me 4.0.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@ -14464,8 +14464,6 @@ CPPFLAGS=$ac_save_CPPFLAGS
test -z "$KRB5_CFLAGS" || KRB5_CFLAGS=`echo " $KRB5_CFLAGS" | sed 's/ -I\([^/]\)/ -I\$(top_builddir)\/\1/g'`
test -z "$KRB5_LIBS" || KRB5_LIBS=`echo " $KRB5_LIBS" | sed 's/ -L\([^/]\)/ -L\$(top_builddir)\/\1/g'`
else
with_gssapi=${with_gssapi:-no}
fi
if test "x$ac_cv_lib_soname_krb5" = "x"; then :
case "x$with_krb5" in
@ -14476,6 +14474,7 @@ This is an error since --with-krb5 was requested." "$LINENO" 5 ;;
esac
fi
test "x$ac_cv_lib_soname_krb5" != "x" || with_gssapi=${with_gssapi:-no}
if test "x$with_gssapi" != "xno"
then
@ -18605,6 +18604,8 @@ for ac_func in \
exp2f \
expm1 \
expm1f \
ilogb \
ilogbf \
j0 \
j1 \
jn \
@ -18624,6 +18625,8 @@ for ac_func in \
lroundf \
nearbyint \
nearbyintf \
nexttoward \
nexttowardf \
powl \
remainder \
remainderf \
@ -20870,7 +20873,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Wine $as_me 4.0, which was
This file was extended by Wine $as_me 4.0.4, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -20941,7 +20944,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
Wine config.status 4.0
Wine config.status 4.0.4
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@ -1702,11 +1702,10 @@ then
else
KRB5_CFLAGS=""
fi])
else
with_gssapi=${with_gssapi:-no}
fi
WINE_NOTICE_WITH(krb5,[test "x$ac_cv_lib_soname_krb5" = "x"],
[libkrb5 ${notice_platform}development files not found (or too old), Kerberos won't be supported.])
test "x$ac_cv_lib_soname_krb5" != "x" || with_gssapi=${with_gssapi:-no}
dnl **** Check for gssapi ****
if test "x$with_gssapi" != "xno"
@ -2743,6 +2742,8 @@ AC_CHECK_FUNCS(\
exp2f \
expm1 \
expm1f \
ilogb \
ilogbf \
j0 \
j1 \
jn \
@ -2762,6 +2763,8 @@ AC_CHECK_FUNCS(\
lroundf \
nearbyint \
nearbyintf \
nexttoward \
nexttowardf \
powl \
remainder \
remainderf \

View File

@ -603,7 +603,7 @@ BOOL WINAPI ReadEventLogA( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOf
FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_HANDLE_EOF);
return FALSE;
}
@ -618,7 +618,7 @@ BOOL WINAPI ReadEventLogW( HANDLE hEventLog, DWORD dwReadFlags, DWORD dwRecordOf
FIXME("(%p,0x%08x,0x%08x,%p,0x%08x,%p,%p) stub\n", hEventLog, dwReadFlags,
dwRecordOffset, lpBuffer, nNumberOfBytesToRead, pnBytesRead, pnMinNumberOfBytesNeeded);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
SetLastError(ERROR_HANDLE_EOF);
return FALSE;
}

View File

@ -508,7 +508,7 @@ NTSTATUS WINAPI LsaLookupSids(
{
(*Names)[i].Use = SidTypeUnknown;
(*Names)[i].DomainIndex = -1;
(*Names)[i].Name.Buffer = NULL;
RtlInitUnicodeStringEx(&(*Names)[i].Name, NULL);
memset(&(*ReferencedDomains)->Domains[i], 0, sizeof(LSA_TRUST_INFORMATION));

View File

@ -2097,7 +2097,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
DWORD dwFlags, LPDWORD pdwType, PVOID pvData,
LPDWORD pcbData )
{
DWORD dwType, cbData = pcbData ? *pcbData : 0;
DWORD dwType, cbData = (pvData && pcbData) ? *pcbData : 0;
PVOID pvBuf = NULL;
LONG ret;
@ -2193,7 +2193,7 @@ LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
DWORD dwFlags, LPDWORD pdwType, PVOID pvData,
LPDWORD pcbData )
{
DWORD dwType, cbData = pcbData ? *pcbData : 0;
DWORD dwType, cbData = (pvData && pcbData) ? *pcbData : 0;
PVOID pvBuf = NULL;
LONG ret;

View File

@ -5964,6 +5964,64 @@ BOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName, LPDWORD lpStatus)
return TRUE;
}
static NTSTATUS combine_dacls(ACL *parent, ACL *child, ACL **result)
{
NTSTATUS status;
ACL *combined;
int i;
/* initialize a combined DACL containing both inherited and new ACEs */
combined = heap_alloc_zero(child->AclSize+parent->AclSize);
if (!combined)
return STATUS_NO_MEMORY;
status = RtlCreateAcl(combined, parent->AclSize+child->AclSize, ACL_REVISION);
if (status != STATUS_SUCCESS)
{
heap_free(combined);
return status;
}
/* copy the new ACEs */
for (i=0; i<child->AceCount; i++)
{
ACE_HEADER *ace;
if (!GetAce(child, i, (void*)&ace))
continue;
if (!AddAce(combined, ACL_REVISION, MAXDWORD, ace, ace->AceSize))
WARN("error adding new ACE\n");
}
/* copy the inherited ACEs */
for (i=0; i<parent->AceCount; i++)
{
ACE_HEADER *ace;
if (!GetAce(parent, i, (void*)&ace))
continue;
if (!(ace->AceFlags & (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE)))
continue;
if ((ace->AceFlags & (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE)) !=
(OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE))
{
FIXME("unsupported flags: %x\n", ace->AceFlags);
continue;
}
if (ace->AceFlags & NO_PROPAGATE_INHERIT_ACE)
ace->AceFlags &= ~(OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE|NO_PROPAGATE_INHERIT_ACE);
ace->AceFlags &= ~INHERIT_ONLY_ACE;
ace->AceFlags |= INHERITED_ACE;
if (!AddAce(combined, ACL_REVISION, MAXDWORD, ace, ace->AceSize))
WARN("error adding inherited ACE\n");
}
*result = combined;
return STATUS_SUCCESS;
}
/******************************************************************************
* SetSecurityInfo [ADVAPI32.@]
*/
@ -6063,41 +6121,10 @@ DWORD WINAPI SetSecurityInfo(HANDLE handle, SE_OBJECT_TYPE ObjectType,
if (!err)
{
int i;
dacl = heap_alloc_zero(pDacl->AclSize+parent_dacl->AclSize);
if (!dacl)
{
LocalFree(parent_sd);
return ERROR_NOT_ENOUGH_MEMORY;
}
memcpy(dacl, pDacl, pDacl->AclSize);
dacl->AclSize = pDacl->AclSize+parent_dacl->AclSize;
for (i=0; i<parent_dacl->AceCount; i++)
{
ACE_HEADER *ace;
if (!GetAce(parent_dacl, i, (void*)&ace))
continue;
if (!(ace->AceFlags & (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE)))
continue;
if ((ace->AceFlags & (OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE)) !=
(OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE))
{
FIXME("unsupported flags: %x\n", ace->AceFlags);
continue;
}
if (ace->AceFlags & NO_PROPAGATE_INHERIT_ACE)
ace->AceFlags &= ~(OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE|NO_PROPAGATE_INHERIT_ACE);
ace->AceFlags &= ~INHERIT_ONLY_ACE;
ace->AceFlags |= INHERITED_ACE;
if(!AddAce(dacl, ACL_REVISION, MAXDWORD, ace, ace->AceSize))
WARN("error adding inherited ACE\n");
}
status = combine_dacls(parent_dacl, pDacl, &dacl);
LocalFree(parent_sd);
if (status != STATUS_SUCCESS)
return RtlNtStatusToDosError(status);
}
}
else

View File

@ -7,6 +7,7 @@
@ stub EnumResourceTypesExA
@ stub EnumResourceTypesExW
@ stdcall FindResourceExW(long wstr wstr long) kernel32.FindResourceExW
@ stdcall FindResourceW(long wstr wstr) kernel32.FindResourceW
@ stdcall FindStringOrdinal(long wstr long wstr long long) kernel32.FindStringOrdinal
@ stdcall FreeLibrary(long) kernel32.FreeLibrary
@ stdcall FreeLibraryAndExitThread(long long) kernel32.FreeLibraryAndExitThread

View File

@ -5,7 +5,7 @@
@ stdcall -arch=x86_64 RtlCopyMemory(ptr ptr long) ntdll.RtlCopyMemory
@ cdecl -arch=arm,arm64,x86_64 RtlDeleteFunctionTable(ptr) ntdll.RtlDeleteFunctionTable
@ stdcall RtlFillMemory(ptr long long) ntdll.RtlFillMemory
@ cdecl -arch=x86_64 RtlInstallFunctionTableCallback(long long long ptr ptr wstr) ntdll.RtlInstallFunctionTableCallback
@ cdecl -arch=arm,arm64,x86_64 RtlInstallFunctionTableCallback(long long long ptr ptr wstr) ntdll.RtlInstallFunctionTableCallback
@ stdcall -arch=arm,x86_64 RtlLookupFunctionEntry(long ptr ptr) ntdll.RtlLookupFunctionEntry
@ stdcall RtlPcToFileHeader(ptr ptr) ntdll.RtlPcToFileHeader
@ stdcall -norelay RtlRaiseException(ptr) ntdll.RtlRaiseException

View File

@ -1,4 +1,4 @@
@ stub GetRestrictedErrorInfo
@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
@ stub RoCaptureErrorContext
@ stub RoFailFastWithErrorContext
@ stub RoGetErrorReportingFlags

View File

@ -1,4 +1,4 @@
@ stub GetRestrictedErrorInfo
@ stdcall GetRestrictedErrorInfo(ptr) combase.GetRestrictedErrorInfo
@ stub IsErrorPropagationEnabled
@ stub RoCaptureErrorContext
@ stub RoClearError
@ -9,7 +9,7 @@
@ stub RoInspectThreadErrorInfo
@ stub RoOriginateError
@ stub RoOriginateErrorW
@ stub RoOriginateLanguageException
@ stdcall RoOriginateLanguageException(long ptr ptr) combase.RoOriginateLanguageException
@ stub RoReportFailedDelegate
@ stub RoReportUnhandledError
@ stub RoResolveRestrictedErrorInfoReference

View File

@ -119,4 +119,4 @@
@ cdecl wctob(long) ucrtbase.wctob
@ cdecl wctomb(ptr long) ucrtbase.wctomb
@ cdecl wctomb_s(ptr ptr long long) ucrtbase.wctomb_s
@ stub wctrans
@ cdecl wctrans(str) ucrtbase.wctrans

View File

@ -254,9 +254,9 @@
@ cdecl -arch=arm,x86_64,arm64 fmodf(float float) ucrtbase.fmodf
@ cdecl frexp(double ptr) ucrtbase.frexp
@ cdecl hypot(double double) ucrtbase.hypot
@ stub ilogb
@ stub ilogbf
@ stub ilogbl
@ cdecl ilogb(double) ucrtbase.ilogb
@ cdecl ilogbf(float) ucrtbase.ilogbf
@ cdecl ilogbl(double) ucrtbase.ilogbl
@ cdecl ldexp(double long) ucrtbase.ldexp
@ cdecl lgamma(double) ucrtbase.lgamma
@ cdecl lgammaf(float) ucrtbase.lgammaf
@ -297,9 +297,9 @@
@ cdecl nextafter(double double) ucrtbase.nextafter
@ cdecl nextafterf(float float) ucrtbase.nextafterf
@ cdecl nextafterl(double double) ucrtbase.nextafterl
@ stub nexttoward
@ stub nexttowardf
@ stub nexttowardl
@ cdecl nexttoward(double double) ucrtbase.nexttoward
@ cdecl nexttowardf(float double) ucrtbase.nexttowardf
@ cdecl nexttowardl(double double) ucrtbase.nexttowardl
@ stub norm
@ stub normf
@ stub norml

View File

@ -15,6 +15,7 @@
@ stub __BuildCatchObject
@ stub __BuildCatchObjectHelper
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr) ucrtbase.__C_specific_handler
@ stub __C_specific_handler_noexcept
@ cdecl -arch=i386,x86_64,arm,arm64 __CxxDetectRethrow(ptr) ucrtbase.__CxxDetectRethrow
@ cdecl -arch=i386,x86_64,arm,arm64 __CxxExceptionFilter(ptr ptr long ptr) ucrtbase.__CxxExceptionFilter
@ cdecl -arch=i386,x86_64,arm,arm64 -norelay __CxxFrameHandler(ptr ptr ptr ptr) ucrtbase.__CxxFrameHandler
@ -44,6 +45,7 @@
@ stub __report_gsfailure
@ cdecl __std_exception_copy(ptr ptr) ucrtbase.__std_exception_copy
@ cdecl __std_exception_destroy(ptr) ucrtbase.__std_exception_destroy
@ stub __std_terminate
@ cdecl __std_type_info_compare(ptr ptr) ucrtbase.__std_type_info_compare
@ cdecl __std_type_info_destroy_list(ptr) ucrtbase.__std_type_info_destroy_list
@ cdecl __std_type_info_hash(ptr) ucrtbase.__std_type_info_hash
@ -51,6 +53,7 @@
@ cdecl __unDName(ptr str long ptr ptr long) ucrtbase.__unDName
@ cdecl __unDNameEx(ptr str long ptr ptr ptr long) ucrtbase.__unDNameEx
@ cdecl __uncaught_exception() ucrtbase.__uncaught_exception
@ stub __uncaught_exceptions
@ cdecl -arch=i386 -norelay _chkesp() ucrtbase._chkesp
@ cdecl -arch=i386 _except_handler2(ptr ptr ptr ptr) ucrtbase._except_handler2
@ cdecl -arch=i386 _except_handler3(ptr ptr ptr ptr) ucrtbase._except_handler3
@ -87,6 +90,10 @@
@ stub _o__W_Getmonths
@ stub _o__W_Gettnames
@ stub _o__Wcsftime
@ stub _o____lc_codepage_func
@ stub _o____lc_collate_cp_func
@ stub _o____lc_locale_name_func
@ stub _o____mb_cur_max_func
@ stub _o___acrt_iob_func
@ stub _o___conio_common_vcprintf
@ stub _o___conio_common_vcprintf_p
@ -120,11 +127,11 @@
@ stub _o___libm_sse2_sinf
@ stub _o___libm_sse2_tan
@ stub _o___libm_sse2_tanf
@ stub _o___p___argc
@ cdecl _o___p___argc() ucrtbase._o___p___argc
@ stub _o___p___argv
@ stub _o___p___wargv
@ cdecl _o___p___wargv() ucrtbase._o___p___wargv
@ stub _o___p__acmdln
@ stub _o___p__commode
@ cdecl _o___p__commode() ucrtbase._o___p__commode
@ stub _o___p__environ
@ stub _o___p__fmode
@ stub _o___p__mbcasemap
@ -135,6 +142,10 @@
@ stub _o___p__wpgmptr
@ stub _o___pctype_func
@ stub _o___pwctype_func
@ stub _o___std_exception_copy
@ stub _o___std_exception_destroy
@ cdecl _o___std_type_info_destroy_list(ptr) ucrtbase._o___std_type_info_destroy_list
@ stub _o___std_type_info_name
@ stub _o___stdio_common_vfprintf
@ stub _o___stdio_common_vfprintf_p
@ stub _o___stdio_common_vfprintf_s
@ -184,6 +195,7 @@
@ stub _o__cabs
@ stub _o__callnewh
@ stub _o__calloc_base
@ stub _o__cexit
@ stub _o__cgets
@ stub _o__cgets_s
@ stub _o__cgetws
@ -195,11 +207,15 @@
@ stub _o__chsize_s
@ stub _o__close
@ stub _o__commit
@ stub _o__configure_wide_argv
@ cdecl _o__configthreadlocale(long) ucrtbase._o__configthreadlocale
@ stub _o__configure_narrow_argv
@ cdecl _o__configure_wide_argv(long) ucrtbase._o__configure_wide_argv
@ cdecl _o__controlfp_s(ptr long long) ucrtbase._o__controlfp_s
@ stub _o__cputs
@ stub _o__cputws
@ stub _o__creat
@ stub _o__create_locale
@ cdecl _o__crt_atexit(ptr) ucrtbase._o__crt_atexit
@ stub _o__ctime32_s
@ stub _o__ctime64_s
@ stub _o__cwait
@ -231,6 +247,7 @@
@ stub _o__execve
@ stub _o__execvp
@ stub _o__execvpe
@ stub _o__exit
@ stub _o__expand
@ stub _o__fclose_nolock
@ stub _o__fcloseall
@ -301,6 +318,8 @@
@ stub _o__get_errno
@ stub _o__get_fmode
@ stub _o__get_heap_handle
@ stub _o__get_initial_narrow_environment
@ cdecl _o__get_initial_wide_environment() ucrtbase._o__get_initial_wide_environment
@ stub _o__get_invalid_parameter_handler
@ stub _o__get_narrow_winmain_command_line
@ stub _o__get_osfhandle
@ -345,7 +364,9 @@
@ stub _o__i64toa_s
@ stub _o__i64tow
@ stub _o__i64tow_s
@ stub _o__initialize_narrow_environment
@ cdecl _o__initialize_onexit_table(ptr) ucrtbase._o__initialize_onexit_table
@ cdecl _o__initialize_wide_environment() ucrtbase._o__initialize_wide_environment
@ stub _o__invalid_parameter_noinfo
@ stub _o__invalid_parameter_noinfo_noreturn
@ stub _o__isatty
@ -617,6 +638,7 @@
@ stub _o__pclose
@ stub _o__pipe
@ stub _o__popen
@ stub _o__purecall
@ stub _o__putc_nolock
@ stub _o__putch
@ stub _o__putch_nolock
@ -638,12 +660,16 @@
@ stub _o__scalbf
@ stub _o__searchenv
@ stub _o__searchenv_s
@ cdecl _o__seh_filter_dll(long ptr) ucrtbase._o__seh_filter_dll
@ cdecl _o__seh_filter_exe(long ptr) ucrtbase._o__seh_filter_exe
@ stub _o__set_abort_behavior
@ cdecl _o__set_app_type(long) ucrtbase._o__set_app_type
@ stub _o__set_doserrno
@ stub _o__set_errno
@ cdecl _o__set_fmode(long) ucrtbase._o__set_fmode
@ stub _o__set_invalid_parameter_handler
@ stub _o__set_new_handler
@ stub _o__set_new_mode
@ cdecl _o__set_new_mode(long) ucrtbase._o__set_new_mode
@ stub _o__set_thread_local_invalid_parameter_handler
@ stub _o__seterrormode
@ stub _o__setmbcp
@ -893,7 +919,7 @@
@ stub _o_bsearch
@ stub _o_bsearch_s
@ stub _o_btowc
@ stub _o_calloc
@ cdecl _o_calloc(long long) ucrtbase._o_calloc
@ stub _o_cbrt
@ stub _o_cbrtf
@ stub _o_ceil
@ -910,6 +936,7 @@
@ stub _o_erfcl
@ stub _o_erff
@ stub _o_erfl
@ cdecl _o_exit(long) ucrtbase._o_exit
@ stub _o_exp
@ stub _o_exp2
@ stub _o_exp2f
@ -940,7 +967,7 @@
@ stub _o_fputws
@ stub _o_fread
@ stub _o_fread_s
@ stub _o_free
@ cdecl _o_free(ptr) ucrtbase._o_free
@ stub _o_freopen
@ stub _o_freopen_s
@ stub _o_frexp
@ -1026,7 +1053,7 @@
@ stub _o_mbstowcs
@ stub _o_mbstowcs_s
@ stub _o_mbtowc
@ stub _o_memset
@ stub _o_memcpy_s
@ stub _o_modf
@ stub _o_modff
@ stub _o_nan
@ -1061,6 +1088,7 @@
@ stub _o_remquo
@ stub _o_remquof
@ stub _o_remquol
@ stub _o_rename
@ stub _o_rewind
@ stub _o_rint
@ stub _o_rintf
@ -1076,6 +1104,7 @@
@ stub _o_scalbnl
@ stub _o_set_terminate
@ stub _o_setbuf
@ stub _o_setlocale
@ stub _o_setvbuf
@ stub _o_sin
@ stub _o_sinf
@ -1113,7 +1142,7 @@
@ stub _o_tmpfile_s
@ stub _o_tmpnam_s
@ stub _o_tolower
@ stub _o_toupper
@ cdecl _o_toupper(long) ucrtbase._o_toupper
@ stub _o_towlower
@ stub _o_towupper
@ stub _o_ungetc

View File

@ -87,7 +87,7 @@
@ cdecl _wcsnicoll(wstr wstr long) ucrtbase._wcsnicoll
@ cdecl _wcsnicoll_l(wstr wstr long ptr) ucrtbase._wcsnicoll_l
@ cdecl _wcsnset(wstr long long) ucrtbase._wcsnset
@ stub _wcsnset_s
@ cdecl _wcsnset_s(wstr long long long) ucrtbase._wcsnset_s
@ cdecl _wcsrev(wstr) ucrtbase._wcsrev
@ cdecl _wcsset(wstr long) ucrtbase._wcsset
@ cdecl _wcsset_s(wstr long long) ucrtbase._wcsset_s
@ -151,7 +151,7 @@
@ cdecl strxfrm(ptr str long) ucrtbase.strxfrm
@ cdecl tolower(long) ucrtbase.tolower
@ cdecl toupper(long) ucrtbase.toupper
@ stub towctrans
@ cdecl towctrans(long long) ucrtbase.towctrans
@ cdecl towlower(long) ucrtbase.towlower
@ cdecl towupper(long) ucrtbase.towupper
@ cdecl wcscat(wstr wstr) ucrtbase.wcscat

View File

@ -1,7 +1,7 @@
@ stdcall GetDpiForMonitor(long long ptr ptr) shcore.GetDpiForMonitor
@ stdcall GetProcessDpiAwareness(long ptr) shcore.GetProcessDpiAwareness
@ stub GetScaleFactorForDevice
@ stub GetScaleFactorForMonitor
@ stdcall GetScaleFactorForMonitor(long ptr) shcore.GetScaleFactorForMonitor
@ stub RegisterScaleChangeEvent
@ stub RegisterScaleChangeNotifications
@ stub RevokeScaleChangeNotifications

View File

@ -59,6 +59,15 @@ BOOL WINAPI AuthzInitializeResourceManager(DWORD flags, PFN_AUTHZ_DYNAMIC_ACCESS
return FALSE;
}
/***********************************************************************
* AuthzFreeResourceManager (AUTHZ.@)
*/
BOOL WINAPI AuthzFreeResourceManager(AUTHZ_RESOURCE_MANAGER_HANDLE handle)
{
FIXME("%p\n", handle);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* AuthzInstallSecurityEventSource (AUTHZ.@)

View File

@ -6,7 +6,7 @@
@ stub AuthzFreeAuditEvent
@ stdcall AuthzFreeContext(long)
@ stub AuthzFreeHandle
@ stub AuthzFreeResourceManager
@ stdcall AuthzFreeResourceManager(ptr)
@ stub AuthzGetInformationFromContext
@ stub AuthzInitializeContextFromAuthzContext
@ stdcall AuthzInitializeContextFromSid(long ptr long ptr int64 ptr ptr)

View File

@ -405,8 +405,6 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
lpbi->biSize + lpbi->biClrUsed * sizeof(RGBQUAD));
if (lpbi->biBitCount <= 8)
ICDecompressGetPalette(This->hic, This->lpInFormat, This->lpOutFormat);
return AVIERR_OK;
} else {
if (bBestDisplay) {
ICGetDisplayFormat(This->hic, This->lpInFormat,
@ -416,64 +414,64 @@ static HRESULT WINAPI IGetFrame_fnSetFormat(IGetFrame *iface,
AVIFILE_CloseCompressor(This);
return AVIERR_NOCOMPRESSOR;
}
/* check output format */
if (This->lpOutFormat->biClrUsed == 0 &&
This->lpOutFormat->biBitCount <= 8)
This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
if (This->lpOutFormat->biSizeImage == 0 &&
This->lpOutFormat->biCompression == BI_RGB) {
This->lpOutFormat->biSizeImage =
DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
}
if (lpBits == NULL) {
DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
if (This->lpOutFormat == NULL) {
AVIFILE_CloseCompressor(This);
return AVIERR_MEMORY;
}
This->lpOutBuffer = DIBPTR(This->lpOutFormat);
} else
This->lpOutBuffer = lpBits;
/* for user size was irrelevant */
if (dx == -1)
dx = This->lpOutFormat->biWidth;
if (dy == -1)
dy = This->lpOutFormat->biHeight;
/* need to resize? */
if (x != 0 || y != 0) {
if (dy == This->lpOutFormat->biHeight &&
dx == This->lpOutFormat->biWidth)
This->bResize = FALSE;
else
This->bResize = TRUE;
}
if (This->bResize) {
This->x = x;
This->y = y;
This->dx = dx;
This->dy = dy;
if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
0,This->lpInFormat->biWidth,
This->lpInFormat->biHeight,This->lpOutFormat,
This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
return AVIERR_OK;
} else if (ICDecompressBegin(This->hic, This->lpInFormat,
This->lpOutFormat) == ICERR_OK)
return AVIERR_OK;
AVIFILE_CloseCompressor(This);
return AVIERR_COMPRESSOR;
}
/* check output format */
if (This->lpOutFormat->biClrUsed == 0 &&
This->lpOutFormat->biBitCount <= 8)
This->lpOutFormat->biClrUsed = 1u << This->lpOutFormat->biBitCount;
if (This->lpOutFormat->biSizeImage == 0 &&
This->lpOutFormat->biCompression == BI_RGB) {
This->lpOutFormat->biSizeImage =
DIBWIDTHBYTES(*This->lpOutFormat) * This->lpOutFormat->biHeight;
}
if (lpBits == NULL) {
DWORD size = This->lpOutFormat->biClrUsed * sizeof(RGBQUAD);
size += This->lpOutFormat->biSize + This->lpOutFormat->biSizeImage;
This->lpOutFormat = HeapReAlloc(GetProcessHeap(), 0, This->lpOutFormat, size);
if (This->lpOutFormat == NULL) {
AVIFILE_CloseCompressor(This);
return AVIERR_MEMORY;
}
This->lpOutBuffer = DIBPTR(This->lpOutFormat);
} else
This->lpOutBuffer = lpBits;
/* for user size was irrelevant */
if (dx == -1)
dx = This->lpOutFormat->biWidth;
if (dy == -1)
dy = This->lpOutFormat->biHeight;
/* need to resize? */
if (x != 0 || y != 0) {
if (dy == This->lpOutFormat->biHeight &&
dx == This->lpOutFormat->biWidth)
This->bResize = FALSE;
else
This->bResize = TRUE;
}
if (This->bResize) {
This->x = x;
This->y = y;
This->dx = dx;
This->dy = dy;
if (ICDecompressExBegin(This->hic,0,This->lpInFormat,This->lpInBuffer,0,
0,This->lpInFormat->biWidth,
This->lpInFormat->biHeight,This->lpOutFormat,
This->lpOutBuffer, x, y, dx, dy) == ICERR_OK)
return AVIERR_OK;
} else if (ICDecompressBegin(This->hic, This->lpInFormat,
This->lpOutFormat) == ICERR_OK)
return AVIERR_OK;
AVIFILE_CloseCompressor(This);
return AVIERR_COMPRESSOR;
}
static const struct IGetFrameVtbl igetframeVtbl = {

View File

@ -21,11 +21,11 @@
@ stub BCryptEnumProviders
@ stub BCryptEnumRegisteredProviders
@ stdcall BCryptExportKey(ptr ptr wstr ptr long ptr long)
@ stub BCryptFinalizeKeyPair
@ stdcall BCryptFinalizeKeyPair(ptr long)
@ stdcall BCryptFinishHash(ptr ptr long long)
@ stub BCryptFreeBuffer
@ stdcall BCryptGenRandom(ptr ptr long long)
@ stub BCryptGenerateKeyPair
@ stdcall BCryptGenerateKeyPair(ptr ptr long long)
@ stdcall BCryptGenerateSymmetricKey(ptr ptr ptr long ptr long long)
@ stdcall BCryptGetFipsAlgorithmMode(ptr)
@ stdcall BCryptGetProperty(ptr wstr ptr long ptr long)

View File

@ -125,6 +125,7 @@ enum alg_id
ALG_ID_SHA256,
ALG_ID_SHA384,
ALG_ID_SHA512,
ALG_ID_ECDH_P256,
ALG_ID_ECDSA_P256,
ALG_ID_ECDSA_P384,
};
@ -156,8 +157,9 @@ struct key_symmetric
struct key_asymmetric
{
UCHAR *pubkey;
ULONG pubkey_len;
gnutls_privkey_t handle;
UCHAR *pubkey;
ULONG pubkey_len;
};
struct key
@ -224,6 +226,7 @@ NTSTATUS key_symmetric_encrypt( struct key *, const UCHAR *, ULONG, UCHAR *, ULO
NTSTATUS key_symmetric_decrypt( struct key *, const UCHAR *, ULONG, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
NTSTATUS key_symmetric_get_tag( struct key *, UCHAR *, ULONG ) DECLSPEC_HIDDEN;
NTSTATUS key_asymmetric_init( struct key *, struct algorithm *, const UCHAR *, ULONG ) DECLSPEC_HIDDEN;
NTSTATUS key_asymmetric_generate( struct key * ) DECLSPEC_HIDDEN;
NTSTATUS key_asymmetric_verify( struct key *, void *, UCHAR *, ULONG, UCHAR *, ULONG, DWORD ) DECLSPEC_HIDDEN;
NTSTATUS key_destroy( struct key * ) DECLSPEC_HIDDEN;
BOOL key_is_symmetric( struct key * ) DECLSPEC_HIDDEN;

View File

@ -114,6 +114,7 @@ alg_props[] =
/* ALG_ID_SHA256 */ { 286, 32, 512, BCRYPT_SHA256_ALGORITHM, FALSE },
/* ALG_ID_SHA384 */ { 382, 48, 1024, BCRYPT_SHA384_ALGORITHM, FALSE },
/* ALG_ID_SHA512 */ { 382, 64, 1024, BCRYPT_SHA512_ALGORITHM, FALSE },
/* ALG_ID_ECDH_P256 */ { 0, 0, 0, BCRYPT_ECDH_P256_ALGORITHM, FALSE },
/* ALG_ID_ECDSA_P256 */ { 0, 0, 0, BCRYPT_ECDSA_P256_ALGORITHM, FALSE },
/* ALG_ID_ECDSA_P384 */ { 0, 0, 0, BCRYPT_ECDSA_P384_ALGORITHM, FALSE },
};
@ -184,6 +185,7 @@ NTSTATUS WINAPI BCryptOpenAlgorithmProvider( BCRYPT_ALG_HANDLE *handle, LPCWSTR
else if (!strcmpW( id, BCRYPT_SHA256_ALGORITHM )) alg_id = ALG_ID_SHA256;
else if (!strcmpW( id, BCRYPT_SHA384_ALGORITHM )) alg_id = ALG_ID_SHA384;
else if (!strcmpW( id, BCRYPT_SHA512_ALGORITHM )) alg_id = ALG_ID_SHA512;
else if (!strcmpW( id, BCRYPT_ECDH_P256_ALGORITHM )) alg_id = ALG_ID_ECDH_P256;
else if (!strcmpW( id, BCRYPT_ECDSA_P256_ALGORITHM )) alg_id = ALG_ID_ECDSA_P256;
else if (!strcmpW( id, BCRYPT_ECDSA_P384_ALGORITHM )) alg_id = ALG_ID_ECDSA_P384;
else
@ -499,24 +501,24 @@ static NTSTATUS set_alg_property( struct algorithm *alg, const WCHAR *prop, UCHA
case ALG_ID_AES:
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
alg->mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
alg->mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM, size ))
else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM ))
{
alg->mode = MODE_ID_GCM;
return STATUS_SUCCESS;
}
else
{
FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
@ -1028,7 +1030,7 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
if (ecc_blob->dwMagic != magic) return STATUS_NOT_SUPPORTED;
if (ecc_blob->cbKey != key_size) return STATUS_INVALID_PARAMETER;
if (!(key = heap_alloc( sizeof(*key) ))) return STATUS_NO_MEMORY;
if (!(key = heap_alloc_zero( sizeof(*key) ))) return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
if ((status = key_asymmetric_init( key, alg, (BYTE *)ecc_blob, sizeof(*ecc_blob) + ecc_blob->cbKey * 2 )))
{
@ -1047,7 +1049,7 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
if (input_len < sizeof(*rsa_blob)) return STATUS_INVALID_PARAMETER;
if (alg->id != ALG_ID_RSA || rsa_blob->Magic != BCRYPT_RSAPUBLIC_MAGIC) return STATUS_NOT_SUPPORTED;
if (!(key = heap_alloc( sizeof(*key) ))) return STATUS_NO_MEMORY;
if (!(key = heap_alloc_zero( sizeof(*key) ))) return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
size = sizeof(*rsa_blob) + rsa_blob->cbPublicExp + rsa_blob->cbModulus;
@ -1089,6 +1091,18 @@ static NTSTATUS key_duplicate( struct key *key_orig, struct key *key_copy )
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS key_asymmetric_init( struct key *key, struct algorithm *alg, const UCHAR *pubkey, ULONG pubkey_len )
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS key_asymmetric_generate( struct key *key )
{
ERR( "support for keys not available at build time\n" );
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULONG hash_len, UCHAR *signature,
ULONG signature_len, DWORD flags )
{
@ -1163,6 +1177,41 @@ NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptGenerateKeyPair( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE *handle, ULONG key_len,
ULONG flags )
{
struct algorithm *alg = algorithm;
struct key *key;
NTSTATUS status;
TRACE( "%p, %p, %u, %08x\n", algorithm, handle, key_len, flags );
if (!alg || alg->hdr.magic != MAGIC_ALG) return STATUS_INVALID_HANDLE;
if (!handle) return STATUS_INVALID_PARAMETER;
if (!(key = heap_alloc_zero( sizeof(*key) ))) return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
if ((status = key_asymmetric_init( key, alg, NULL, 0 )))
{
heap_free( key );
return status;
}
*handle = key;
return STATUS_SUCCESS;
}
NTSTATUS WINAPI BCryptFinalizeKeyPair( BCRYPT_KEY_HANDLE handle, ULONG flags )
{
struct key *key = handle;
TRACE( "%p, %08x\n", key, flags );
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
return key_asymmetric_generate( key );
}
NTSTATUS WINAPI BCryptImportKey( BCRYPT_ALG_HANDLE algorithm, BCRYPT_KEY_HANDLE decrypt_key, LPCWSTR type,
BCRYPT_KEY_HANDLE *key, PUCHAR object, ULONG object_len, PUCHAR input,
ULONG input_len, ULONG flags )
@ -1192,7 +1241,7 @@ NTSTATUS WINAPI BCryptExportKey( BCRYPT_KEY_HANDLE export_key, BCRYPT_KEY_HANDLE
TRACE("%p, %p, %s, %p, %u, %p, %u\n", key, encrypt_key, debugstr_w(type), output, output_len, size, flags);
if (!key || key->hdr.magic != MAGIC_KEY) return STATUS_INVALID_HANDLE;
if (!output || !type || !size) return STATUS_INVALID_PARAMETER;
if (!type || !size) return STATUS_INVALID_PARAMETER;
if (encrypt_key)
{

View File

@ -52,6 +52,8 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
#define GNUTLS_CIPHER_AES_256_GCM 94
#define GNUTLS_PK_ECC 4
#define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)(((unsigned int)1<<31)|((unsigned int)(curve)))
typedef enum
{
GNUTLS_ECC_CURVE_INVALID,
@ -65,15 +67,20 @@ typedef enum
/* Not present in gnutls version < 3.0 */
static int (*pgnutls_cipher_tag)(gnutls_cipher_hd_t, void *, size_t);
static int (*pgnutls_cipher_add_auth)(gnutls_cipher_hd_t, const void *, size_t);
static gnutls_sign_algorithm_t (*pgnutls_pk_to_sign)(gnutls_pk_algorithm_t, gnutls_digest_algorithm_t);
static int (*pgnutls_pubkey_import_ecc_raw)(gnutls_pubkey_t, gnutls_ecc_curve_t,
const gnutls_datum_t *, const gnutls_datum_t *);
static gnutls_sign_algorithm_t (*pgnutls_pk_to_sign)(gnutls_pk_algorithm_t, gnutls_digest_algorithm_t);
static int (*pgnutls_pubkey_verify_hash2)(gnutls_pubkey_t, gnutls_sign_algorithm_t, unsigned int,
const gnutls_datum_t *, const gnutls_datum_t *);
/* Not present in gnutls version < 2.11.0 */
static int (*pgnutls_pubkey_import_rsa_raw)(gnutls_pubkey_t key, const gnutls_datum_t *m, const gnutls_datum_t *e);
/* Not present in gnutls version < 3.3.0 */
static int (*pgnutls_privkey_export_ecc_raw)(gnutls_privkey_t, gnutls_ecc_curve_t *,
gnutls_datum_t *, gnutls_datum_t *, gnutls_datum_t *);
static int (*pgnutls_privkey_generate)(gnutls_privkey_t, gnutls_pk_algorithm_t, unsigned int, unsigned int);
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(gnutls_cipher_decrypt2);
@ -85,8 +92,10 @@ MAKE_FUNCPTR(gnutls_global_init);
MAKE_FUNCPTR(gnutls_global_set_log_function);
MAKE_FUNCPTR(gnutls_global_set_log_level);
MAKE_FUNCPTR(gnutls_perror);
MAKE_FUNCPTR(gnutls_pubkey_init);
MAKE_FUNCPTR(gnutls_privkey_deinit);
MAKE_FUNCPTR(gnutls_privkey_init);
MAKE_FUNCPTR(gnutls_pubkey_deinit);
MAKE_FUNCPTR(gnutls_pubkey_init);
#undef MAKE_FUNCPTR
static int compat_gnutls_cipher_tag(gnutls_cipher_hd_t handle, void *tag, size_t tag_size)
@ -102,7 +111,13 @@ static int compat_gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, const void *
static int compat_gnutls_pubkey_import_ecc_raw(gnutls_pubkey_t key, gnutls_ecc_curve_t curve,
const gnutls_datum_t *x, const gnutls_datum_t *y)
{
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_privkey_export_ecc_raw(gnutls_privkey_t key, gnutls_ecc_curve_t *curve,
gnutls_datum_t *x, gnutls_datum_t *y, gnutls_datum_t *k)
{
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static gnutls_sign_algorithm_t compat_gnutls_pk_to_sign(gnutls_pk_algorithm_t pk, gnutls_digest_algorithm_t hash)
@ -114,12 +129,18 @@ static int compat_gnutls_pubkey_verify_hash2(gnutls_pubkey_t key, gnutls_sign_al
unsigned int flags, const gnutls_datum_t *hash,
const gnutls_datum_t *signature)
{
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_pubkey_import_rsa_raw(gnutls_pubkey_t key, const gnutls_datum_t *m, const gnutls_datum_t *e)
{
return GNUTLS_E_UNKNOWN_CIPHER_TYPE;
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_privkey_generate(gnutls_privkey_t key, gnutls_pk_algorithm_t algo, unsigned int bits,
unsigned int flags)
{
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static void gnutls_log( int level, const char *msg )
@ -153,8 +174,10 @@ BOOL gnutls_initialize(void)
LOAD_FUNCPTR(gnutls_global_set_log_function)
LOAD_FUNCPTR(gnutls_global_set_log_level)
LOAD_FUNCPTR(gnutls_perror)
LOAD_FUNCPTR(gnutls_pubkey_init);
LOAD_FUNCPTR(gnutls_privkey_deinit);
LOAD_FUNCPTR(gnutls_privkey_init);
LOAD_FUNCPTR(gnutls_pubkey_deinit);
LOAD_FUNCPTR(gnutls_pubkey_init);
#undef LOAD_FUNCPTR
if (!(pgnutls_cipher_tag = wine_dlsym( libgnutls_handle, "gnutls_cipher_tag", NULL, 0 )))
@ -178,6 +201,11 @@ BOOL gnutls_initialize(void)
WARN("gnutls_pubkey_import_ecc_raw not found\n");
pgnutls_pubkey_import_ecc_raw = compat_gnutls_pubkey_import_ecc_raw;
}
if (!(pgnutls_privkey_export_ecc_raw = wine_dlsym( libgnutls_handle, "gnutls_privkey_export_ecc_raw", NULL, 0 )))
{
WARN("gnutls_privkey_export_ecc_raw not found\n");
pgnutls_privkey_export_ecc_raw = compat_gnutls_privkey_export_ecc_raw;
}
if (!(pgnutls_pk_to_sign = wine_dlsym( libgnutls_handle, "gnutls_pk_to_sign", NULL, 0 )))
{
WARN("gnutls_pk_to_sign not found\n");
@ -193,6 +221,11 @@ BOOL gnutls_initialize(void)
WARN("gnutls_pubkey_import_rsa_raw not found\n");
pgnutls_pubkey_import_rsa_raw = compat_gnutls_pubkey_import_rsa_raw;
}
if (!(pgnutls_privkey_generate = wine_dlsym( libgnutls_handle, "gnutls_privkey_generate", NULL, 0 )))
{
WARN("gnutls_privkey_generate not found\n");
pgnutls_privkey_generate = compat_gnutls_privkey_generate;
}
if (TRACE_ON( bcrypt ))
{
@ -322,24 +355,24 @@ NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULO
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
key->u.s.mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
key->u.s.mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM, size ))
else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_GCM ))
{
key->u.s.mode = MODE_ID_GCM;
return STATUS_SUCCESS;
}
else
{
FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
@ -488,12 +521,114 @@ NTSTATUS key_symmetric_get_tag( struct key *key, UCHAR *tag, ULONG len )
return STATUS_SUCCESS;
}
static NTSTATUS export_gnutls_pubkey_ecc( gnutls_privkey_t gnutls_key, UCHAR **pubkey, ULONG *pubkey_len )
{
BCRYPT_ECCKEY_BLOB *ecc_blob;
gnutls_ecc_curve_t curve;
gnutls_datum_t x, y;
DWORD magic, size;
UCHAR *src, *dst;
int ret;
if ((ret = pgnutls_privkey_export_ecc_raw( gnutls_key, &curve, &x, &y, NULL )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
switch (curve)
{
case GNUTLS_ECC_CURVE_SECP256R1:
magic = BCRYPT_ECDH_PUBLIC_P256_MAGIC;
size = 32;
break;
default:
FIXME( "curve %u not supported\n", curve );
free( x.data ); free( y.data );
return STATUS_NOT_IMPLEMENTED;
}
if (!(ecc_blob = heap_alloc( sizeof(*ecc_blob) + x.size + y.size )))
{
pgnutls_perror( ret );
free( x.data ); free( y.data );
return STATUS_NO_MEMORY;
}
ecc_blob->dwMagic = magic;
ecc_blob->cbKey = size;
dst = (UCHAR *)(ecc_blob + 1);
if (x.size == size + 1) src = x.data + 1;
else src = x.data;
memcpy( dst, src, size );
dst += size;
if (y.size == size + 1) src = y.data + 1;
else src = y.data;
memcpy( dst, src, size );
*pubkey = (UCHAR *)ecc_blob;
*pubkey_len = sizeof(*ecc_blob) + ecc_blob->cbKey * 2;
free( x.data ); free( y.data );
return STATUS_SUCCESS;
}
NTSTATUS key_asymmetric_generate( struct key *key )
{
gnutls_pk_algorithm_t pk_alg;
gnutls_ecc_curve_t curve;
gnutls_privkey_t handle;
NTSTATUS status;
int ret;
if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;
switch (key->alg_id)
{
case ALG_ID_ECDH_P256:
pk_alg = GNUTLS_PK_ECC; /* compatible with ECDSA and ECDH */
curve = GNUTLS_ECC_CURVE_SECP256R1;
break;
default:
FIXME( "algorithm %u not supported\n", key->alg_id );
return STATUS_NOT_SUPPORTED;
}
if ((ret = pgnutls_privkey_init( &handle )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
if ((ret = pgnutls_privkey_generate( handle, pk_alg, GNUTLS_CURVE_TO_BITS(curve), 0 )))
{
pgnutls_perror( ret );
pgnutls_privkey_deinit( handle );
return STATUS_INTERNAL_ERROR;
}
if ((status = export_gnutls_pubkey_ecc( handle, &key->u.a.pubkey, &key->u.a.pubkey_len )))
{
pgnutls_privkey_deinit( handle );
return STATUS_INTERNAL_ERROR;
}
key->u.a.handle = handle;
return STATUS_SUCCESS;
}
NTSTATUS key_asymmetric_init( struct key *key, struct algorithm *alg, const UCHAR *pubkey, ULONG pubkey_len )
{
if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;
switch (alg->id)
{
case ALG_ID_ECDH_P256:
case ALG_ID_ECDSA_P256:
case ALG_ID_ECDSA_P384:
case ALG_ID_RSA:
@ -504,10 +639,13 @@ NTSTATUS key_asymmetric_init( struct key *key, struct algorithm *alg, const UCHA
return STATUS_NOT_SUPPORTED;
}
if (!(key->u.a.pubkey = heap_alloc( pubkey_len ))) return STATUS_NO_MEMORY;
memcpy( key->u.a.pubkey, pubkey, pubkey_len );
key->u.a.pubkey_len = pubkey_len;
key->alg_id = alg->id;
if (pubkey_len)
{
if (!(key->u.a.pubkey = heap_alloc( pubkey_len ))) return STATUS_NO_MEMORY;
memcpy( key->u.a.pubkey, pubkey, pubkey_len );
key->u.a.pubkey_len = pubkey_len;
}
key->alg_id = alg->id;
return STATUS_SUCCESS;
}
@ -728,7 +866,11 @@ NTSTATUS key_destroy( struct key *key )
if (key->u.s.handle) pgnutls_cipher_deinit( key->u.s.handle );
heap_free( key->u.s.secret );
}
else heap_free( key->u.a.pubkey );
else
{
if (key->u.a.handle) pgnutls_privkey_deinit( key->u.a.handle );
heap_free( key->u.a.pubkey );
}
heap_free( key );
return STATUS_SUCCESS;
}

View File

@ -48,19 +48,19 @@ NTSTATUS key_set_property( struct key *key, const WCHAR *prop, UCHAR *value, ULO
{
if (!strcmpW( prop, BCRYPT_CHAINING_MODE ))
{
if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB, size ))
if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_ECB ))
{
key->u.s.mode = MODE_ID_ECB;
return STATUS_SUCCESS;
}
else if (!strncmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC, size ))
else if (!strcmpW( (WCHAR *)value, BCRYPT_CHAIN_MODE_CBC ))
{
key->u.s.mode = MODE_ID_CBC;
return STATUS_SUCCESS;
}
else
{
FIXME( "unsupported mode %s\n", debugstr_wn( (WCHAR *)value, size ) );
FIXME( "unsupported mode %s\n", debugstr_w((WCHAR *)value) );
return STATUS_NOT_IMPLEMENTED;
}
}
@ -205,6 +205,12 @@ NTSTATUS key_asymmetric_verify( struct key *key, void *padding, UCHAR *hash, ULO
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS key_asymmetric_generate( struct key *key )
{
FIXME( "not implemented on Mac\n" );
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS key_destroy( struct key *key )
{
if (key->u.s.ref_encrypt) CCCryptorRelease( key->u.s.ref_encrypt );

View File

@ -26,31 +26,34 @@
#include "wine/test.h"
static NTSTATUS (WINAPI *pBCryptOpenAlgorithmProvider)(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
static NTSTATUS (WINAPI *pBCryptCloseAlgorithmProvider)(BCRYPT_ALG_HANDLE, ULONG);
static NTSTATUS (WINAPI *pBCryptGetFipsAlgorithmMode)(BOOLEAN *);
static NTSTATUS (WINAPI *pBCryptCreateHash)(BCRYPT_ALG_HANDLE, BCRYPT_HASH_HANDLE *, PUCHAR, ULONG, PUCHAR,
ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptHash)(BCRYPT_ALG_HANDLE, UCHAR *, ULONG, UCHAR *, ULONG, UCHAR *, ULONG);
static NTSTATUS (WINAPI *pBCryptHashData)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptDuplicateHash)(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptFinishHash)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptDecrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG,
ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptDestroyHash)(BCRYPT_HASH_HANDLE);
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptGetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptSetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);
static NTSTATUS (WINAPI *pBCryptDuplicateHash)(BCRYPT_HASH_HANDLE, BCRYPT_HASH_HANDLE *, UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptDuplicateKey)(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptEncrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG,
ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptExportKey)(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptFinalizeKeyPair)(BCRYPT_KEY_HANDLE, ULONG);
static NTSTATUS (WINAPI *pBCryptFinishHash)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptGenerateKeyPair)(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptGenerateSymmetricKey)(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE *, PUCHAR, ULONG,
PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptEncrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG,
ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptDecrypt)(BCRYPT_KEY_HANDLE, PUCHAR, ULONG, VOID *, PUCHAR, ULONG, PUCHAR, ULONG,
ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptDuplicateKey)(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptDestroyKey)(BCRYPT_KEY_HANDLE);
static NTSTATUS (WINAPI *pBCryptGetFipsAlgorithmMode)(BOOLEAN *);
static NTSTATUS (WINAPI *pBCryptGetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptGenRandom)(BCRYPT_ALG_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptHash)(BCRYPT_ALG_HANDLE, UCHAR *, ULONG, UCHAR *, ULONG, UCHAR *, ULONG);
static NTSTATUS (WINAPI *pBCryptHashData)(BCRYPT_HASH_HANDLE, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptImportKey)(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *,
PUCHAR, ULONG, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptExportKey)(BCRYPT_KEY_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG *, ULONG);
static NTSTATUS (WINAPI *pBCryptImportKeyPair)(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *, UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptImportKeyPair)(BCRYPT_ALG_HANDLE, BCRYPT_KEY_HANDLE, LPCWSTR, BCRYPT_KEY_HANDLE *,
UCHAR *, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptOpenAlgorithmProvider)(BCRYPT_ALG_HANDLE *, LPCWSTR, LPCWSTR, ULONG);
static NTSTATUS (WINAPI *pBCryptSetProperty)(BCRYPT_HANDLE, LPCWSTR, PUCHAR, ULONG, ULONG);
static NTSTATUS (WINAPI *pBCryptVerifySignature)(BCRYPT_KEY_HANDLE, VOID *, UCHAR *, ULONG, UCHAR *, ULONG, ULONG);
static void test_BCryptGenRandom(void)
@ -485,7 +488,7 @@ static void test_aes(void)
ok(key_lengths.dwIncrement == 64, "Expected 64, got %d\n", key_lengths.dwIncrement);
memcpy(mode, BCRYPT_CHAIN_MODE_GCM, sizeof(BCRYPT_CHAIN_MODE_GCM));
ret = pBCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, sizeof(mode), 0);
ret = pBCryptSetProperty(alg, BCRYPT_CHAINING_MODE, mode, 0, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
size = 0;
@ -540,6 +543,25 @@ static void test_BCryptGenerateSymmetricKey(void)
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
size = 0;
memset(mode, 0, sizeof(mode));
ret = pBCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_CBC), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
ok(size == 64, "got %u\n", size);
ret = pBCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_ECB, 0, 0);
ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
if (ret == STATUS_SUCCESS)
{
size = 0;
memset(mode, 0, sizeof(mode));
ret = pBCryptGetProperty(key, BCRYPT_CHAINING_MODE, mode, sizeof(mode), &size, 0);
ok(ret == STATUS_SUCCESS, "got %08x\n", ret);
ok(!lstrcmpW((const WCHAR *)mode, BCRYPT_CHAIN_MODE_ECB), "got %s\n", wine_dbgstr_w((const WCHAR *)mode));
ok(size == 64, "got %u\n", size);
}
ret = pBCryptSetProperty(key, BCRYPT_CHAINING_MODE, (UCHAR *)BCRYPT_CHAIN_MODE_CBC,
sizeof(BCRYPT_CHAIN_MODE_CBC), 0);
ok(ret == STATUS_SUCCESS || broken(ret == STATUS_NOT_SUPPORTED) /* < Win 8 */, "got %08x\n", ret);
@ -1654,6 +1676,31 @@ static void test_RSA(void)
ok(!ret, "pBCryptCloseAlgorithmProvider failed: %08x\n", ret);
}
static void test_ECDH(void)
{
BCRYPT_ALG_HANDLE alg;
BCRYPT_KEY_HANDLE key;
NTSTATUS status;
status = pBCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0);
if (status)
{
skip("Failed to open BCRYPT_ECDH_P256_ALGORITHM provider %08x\n", status);
return;
}
key = NULL;
status = pBCryptGenerateKeyPair(alg, &key, 256, 0);
ok(status == STATUS_SUCCESS, "got %08x\n", status);
ok(key != NULL, "key not set\n");
status = pBCryptFinalizeKeyPair(key, 0);
ok(status == STATUS_SUCCESS, "got %08x\n", status);
pBCryptDestroyKey(key);
pBCryptCloseAlgorithmProvider(alg, 0);
}
START_TEST(bcrypt)
{
HMODULE module;
@ -1665,26 +1712,28 @@ START_TEST(bcrypt)
return;
}
pBCryptOpenAlgorithmProvider = (void *)GetProcAddress(module, "BCryptOpenAlgorithmProvider");
pBCryptCloseAlgorithmProvider = (void *)GetProcAddress(module, "BCryptCloseAlgorithmProvider");
pBCryptGetFipsAlgorithmMode = (void *)GetProcAddress(module, "BCryptGetFipsAlgorithmMode");
pBCryptCreateHash = (void *)GetProcAddress(module, "BCryptCreateHash");
pBCryptDecrypt = (void *)GetProcAddress(module, "BCryptDecrypt");
pBCryptDestroyHash = (void *)GetProcAddress(module, "BCryptDestroyHash");
pBCryptDestroyKey = (void *)GetProcAddress(module, "BCryptDestroyKey");
pBCryptDuplicateHash = (void *)GetProcAddress(module, "BCryptDuplicateHash");
pBCryptDuplicateKey = (void *)GetProcAddress(module, "BCryptDuplicateKey");
pBCryptEncrypt = (void *)GetProcAddress(module, "BCryptEncrypt");
pBCryptExportKey = (void *)GetProcAddress(module, "BCryptExportKey");
pBCryptFinalizeKeyPair = (void *)GetProcAddress(module, "BCryptFinalizeKeyPair");
pBCryptFinishHash = (void *)GetProcAddress(module, "BCryptFinishHash");
pBCryptGenerateKeyPair = (void *)GetProcAddress(module, "BCryptGenerateKeyPair");
pBCryptGenerateSymmetricKey = (void *)GetProcAddress(module, "BCryptGenerateSymmetricKey");
pBCryptGenRandom = (void *)GetProcAddress(module, "BCryptGenRandom");
pBCryptGetFipsAlgorithmMode = (void *)GetProcAddress(module, "BCryptGetFipsAlgorithmMode");
pBCryptGetProperty = (void *)GetProcAddress(module, "BCryptGetProperty");
pBCryptHash = (void *)GetProcAddress(module, "BCryptHash");
pBCryptHashData = (void *)GetProcAddress(module, "BCryptHashData");
pBCryptDuplicateHash = (void *)GetProcAddress(module, "BCryptDuplicateHash");
pBCryptFinishHash = (void *)GetProcAddress(module, "BCryptFinishHash");
pBCryptDestroyHash = (void *)GetProcAddress(module, "BCryptDestroyHash");
pBCryptGenRandom = (void *)GetProcAddress(module, "BCryptGenRandom");
pBCryptGetProperty = (void *)GetProcAddress(module, "BCryptGetProperty");
pBCryptSetProperty = (void *)GetProcAddress(module, "BCryptSetProperty");
pBCryptGenerateSymmetricKey = (void *)GetProcAddress(module, "BCryptGenerateSymmetricKey");
pBCryptEncrypt = (void *)GetProcAddress(module, "BCryptEncrypt");
pBCryptDecrypt = (void *)GetProcAddress(module, "BCryptDecrypt");
pBCryptDuplicateKey = (void *)GetProcAddress(module, "BCryptDuplicateKey");
pBCryptDestroyKey = (void *)GetProcAddress(module, "BCryptDestroyKey");
pBCryptImportKey = (void *)GetProcAddress(module, "BCryptImportKey");
pBCryptExportKey = (void *)GetProcAddress(module, "BCryptExportKey");
pBCryptImportKeyPair = (void *)GetProcAddress(module, "BCryptImportKeyPair");
pBCryptOpenAlgorithmProvider = (void *)GetProcAddress(module, "BCryptOpenAlgorithmProvider");
pBCryptSetProperty = (void *)GetProcAddress(module, "BCryptSetProperty");
pBCryptVerifySignature = (void *)GetProcAddress(module, "BCryptVerifySignature");
test_BCryptGenRandom();
@ -1698,6 +1747,7 @@ START_TEST(bcrypt)
test_key_import_export();
test_ECDSA();
test_RSA();
test_ECDH();
if (pBCryptHash) /* >= Win 10 */
test_BcryptHash();

View File

@ -11,7 +11,7 @@
@ stub BluetoothEnumerateInstalledServicesEx
@ stub BluetoothFindBrowseGroupClose
@ stub BluetoothFindClassIdClose
@ stub BluetoothFindDeviceClose
@ stdcall BluetoothFindDeviceClose(ptr)
@ stub BluetoothFindFirstBrowseGroup
@ stub BluetoothFindFirstClassId
@ stdcall BluetoothFindFirstDevice(ptr ptr)

View File

@ -60,3 +60,13 @@ BOOL WINAPI BluetoothFindRadioClose(HBLUETOOTH_RADIO_FIND find)
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*********************************************************************
* BluetoothFindDeviceClose
*/
BOOL WINAPI BluetoothFindDeviceClose(HBLUETOOTH_DEVICE_FIND find)
{
FIXME("(%p): stub!\n", find);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}

View File

@ -180,7 +180,7 @@
@ stub GetFuncDescs
@ stdcall GetHGlobalFromStream(ptr ptr) ole32.GetHGlobalFromStream
@ stub GetHookInterface
@ stub GetRestrictedErrorInfo
@ stdcall GetRestrictedErrorInfo(ptr)
@ stub HSTRING_UserFree
@ stub HSTRING_UserFree64
@ stub HSTRING_UserMarshal
@ -260,7 +260,7 @@
@ stub RoInspectThreadErrorInfo
@ stub RoOriginateError
@ stub RoOriginateErrorW
@ stub RoOriginateLanguageException
@ stdcall RoOriginateLanguageException(long ptr ptr)
@ stub RoParameterizedTypeExtraGetTypeSignature
@ stdcall RoRegisterActivationFactories(ptr ptr long ptr)
@ stdcall RoRegisterForApartmentShutdown(ptr ptr ptr)

View File

@ -21,6 +21,7 @@
#include "initguid.h"
#include "roapi.h"
#include "roparameterizediid.h"
#include "roerrorapi.h"
#include "winstring.h"
#include "wine/debug.h"
@ -275,6 +276,24 @@ HRESULT WINAPI RoRegisterActivationFactories(HSTRING *classes, PFNGETACTIVATIONF
return S_OK;
}
/***********************************************************************
* GetRestrictedErrorInfo (combase.@)
*/
HRESULT WINAPI GetRestrictedErrorInfo(IRestrictedErrorInfo **info)
{
FIXME( "(%p)\n", info );
return E_NOTIMPL;
}
/***********************************************************************
* RoOriginateLanguageException (combase.@)
*/
BOOL WINAPI RoOriginateLanguageException(HRESULT error, HSTRING message, IUnknown *language_exception)
{
FIXME("(%x %s %p) stub\n", error, debugstr_hstring(message), language_exception);
return FALSE;
}
/***********************************************************************
* CleanupTlsOleState (combase.@)
*/

View File

@ -1964,6 +1964,16 @@ static LRESULT CALLBACK COMBO_WindowProc( HWND hwnd, UINT message, WPARAM wParam
if (GET_WHEEL_DELTA_WPARAM(wParam) < 0) return SendMessageW(hwnd, WM_KEYDOWN, VK_DOWN, 0);
return TRUE;
case WM_CTLCOLOR:
case WM_CTLCOLORMSGBOX:
case WM_CTLCOLOREDIT:
case WM_CTLCOLORLISTBOX:
case WM_CTLCOLORBTN:
case WM_CTLCOLORDLG:
case WM_CTLCOLORSCROLLBAR:
case WM_CTLCOLORSTATIC:
return SendMessageW(lphc->owner, message, wParam, lParam);
/* Combo messages */
case CB_ADDSTRING:
if (lphc->dwStyle & CBS_LOWERCASE)

View File

@ -2012,7 +2012,7 @@ static LRESULT LISTBOX_HandleHScroll( LB_DESCR *descr, WORD scrollReq, WORD pos
static LRESULT LISTBOX_HandleMouseWheel(LB_DESCR *descr, SHORT delta )
{
UINT pulScrollLines = 3;
INT pulScrollLines = 3;
SystemParametersInfoW(SPI_GETWHEELSCROLLLINES,0, &pulScrollLines, 0);
@ -2026,9 +2026,20 @@ static LRESULT LISTBOX_HandleMouseWheel(LB_DESCR *descr, SHORT delta )
if (descr->wheel_remain && pulScrollLines)
{
int cLineScroll;
pulScrollLines = min((UINT) descr->page_size, pulScrollLines);
cLineScroll = pulScrollLines * (float)descr->wheel_remain / WHEEL_DELTA;
descr->wheel_remain -= WHEEL_DELTA * cLineScroll / (int)pulScrollLines;
if (descr->style & LBS_MULTICOLUMN)
{
pulScrollLines = min(descr->width / descr->column_width, pulScrollLines);
pulScrollLines = max(1, pulScrollLines);
cLineScroll = pulScrollLines * descr->wheel_remain / WHEEL_DELTA;
descr->wheel_remain -= WHEEL_DELTA * cLineScroll / pulScrollLines;
cLineScroll *= descr->page_size;
}
else
{
pulScrollLines = min(descr->page_size, pulScrollLines);
cLineScroll = pulScrollLines * descr->wheel_remain / WHEEL_DELTA;
descr->wheel_remain -= WHEEL_DELTA * cLineScroll / pulScrollLines;
}
LISTBOX_SetTopItem( descr, descr->top_item - cLineScroll, TRUE );
}
return 0;

View File

@ -11084,13 +11084,21 @@ static void LISTVIEW_UpdateSize(LISTVIEW_INFO *infoPtr)
infoPtr->rcList.bottom = max (infoPtr->rcList.bottom - 2, 0);
}
/* if control created invisible header isn't created */
/* When ListView control is created invisible, header isn't created right away. */
if (infoPtr->hwndHeader)
{
HDLAYOUT hl;
WINDOWPOS wp;
POINT origin;
WINDOWPOS wp;
HDLAYOUT hl;
RECT rect;
hl.prc = &infoPtr->rcList;
LISTVIEW_GetOrigin(infoPtr, &origin);
rect = infoPtr->rcList;
rect.left += origin.x;
rect.top += origin.y;
hl.prc = &rect;
hl.pwpos = &wp;
SendMessageW( infoPtr->hwndHeader, HDM_LAYOUT, 0, (LPARAM)&hl );
TRACE(" wp.flags=0x%08x, wp=%d,%d (%dx%d)\n", wp.flags, wp.x, wp.y, wp.cx, wp.cy);

View File

@ -652,23 +652,24 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
case PBM_STEPIT:
{
INT oldVal;
oldVal = infoPtr->CurVal;
infoPtr->CurVal += infoPtr->Step;
if (infoPtr->CurVal > infoPtr->MaxVal)
int oldVal = infoPtr->CurVal;
if (infoPtr->MinVal != infoPtr->MaxVal)
{
infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MinVal;
infoPtr->CurVal += infoPtr->Step;
if (infoPtr->CurVal > infoPtr->MaxVal)
infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MinVal;
if (infoPtr->CurVal < infoPtr->MinVal)
infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MaxVal;
if (oldVal != infoPtr->CurVal)
{
TRACE("PBM_STEPIT: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
UpdateWindow( infoPtr->Self );
}
}
if (infoPtr->CurVal < infoPtr->MinVal)
{
infoPtr->CurVal = (infoPtr->CurVal - infoPtr->MinVal) % (infoPtr->MaxVal - infoPtr->MinVal) + infoPtr->MaxVal;
}
if(oldVal != infoPtr->CurVal)
{
TRACE("PBM_STEPIT: current pos changed from %d to %d\n", oldVal, infoPtr->CurVal);
PROGRESS_Invalidate( infoPtr, oldVal, infoPtr->CurVal );
UpdateWindow( infoPtr->Self );
}
return oldVal;
}

View File

@ -2760,7 +2760,7 @@ static void PROPSHEET_CleanUp(HWND hwndDlg)
static INT do_loop(const PropSheetInfo *psInfo)
{
MSG msg;
MSG msg = { 0 };
INT ret = 0;
HWND hwnd = psInfo->hwnd;
HWND parent = psInfo->ppshheader.hwndParent;
@ -2777,7 +2777,7 @@ static INT do_loop(const PropSheetInfo *psInfo)
}
}
if(ret == 0)
if(ret == 0 && msg.message)
PostQuitMessage(msg.wParam);
if(ret != -1)

View File

@ -1294,8 +1294,8 @@ static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT i
REBAR_BAND *lpBand;
int yMaxHeight = 0;
int yPos = yStart;
int row = REBAR_GetBand(infoPtr, iBeginBand)->iRow;
int i;
int row, i;
for (i = iBeginBand; i < iEndBand; i = next_visible(infoPtr, i))
{
lpBand = REBAR_GetBand(infoPtr, i);
@ -1304,6 +1304,8 @@ static int REBAR_SetBandsHeight(const REBAR_INFO *infoPtr, INT iBeginBand, INT i
}
TRACE("Bands [%d; %d) height: %d\n", iBeginBand, iEndBand, yMaxHeight);
row = iBeginBand < iEndBand ? REBAR_GetBand(infoPtr, iBeginBand)->iRow : 0;
for (i = iBeginBand; i < iEndBand; i = next_visible(infoPtr, i))
{
lpBand = REBAR_GetBand(infoPtr, i);

View File

@ -566,12 +566,12 @@ static BOOL SYSLINK_WrapLine (LPWSTR Text, WCHAR BreakChar, int x, int *LineLen,
{
int i;
for (i = 0; i < nFit; i++) if (Text[i] == '\n') break;
for (i = 0; i < nFit; i++) if (Text[i] == '\r' || Text[i] == '\n') break;
if (i == *LineLen) return FALSE;
/* check if we're in the middle of a word */
if (Text[i] != '\n' && Text[i] != BreakChar)
if (Text[i] != '\r' && Text[i] != '\n' && Text[i] != BreakChar)
{
/* search for the beginning of the word */
while (i && Text[i - 1] != BreakChar) i--;
@ -654,6 +654,12 @@ static VOID SYSLINK_Render (const SYSLINK_INFO *infoPtr, HDC hdc, PRECT pRect)
/* skip break characters unless they're the first of the doc item */
if(tx != Current->Text || x == SL_LEFTMARGIN)
{
if (n && *tx == '\r')
{
tx++;
SkipChars++;
n--;
}
if (n && *tx == '\n')
{
tx++;

View File

@ -46,6 +46,8 @@ static HWND hComboExParentWnd, hMainWnd;
static HINSTANCE hMainHinst;
static const char ComboExTestClass[] = "ComboExTestClass";
static HBRUSH brush_red;
static BOOL (WINAPI *pSetWindowSubclass)(HWND, SUBCLASSPROC, UINT_PTR, DWORD_PTR);
#define MAX_CHARS 100
@ -507,6 +509,8 @@ static BOOL init(void)
wc.lpfnWndProc = ComboExTestWndProc;
RegisterClassA(&wc);
brush_red = CreateSolidBrush(RGB(255, 0, 0));
hMainWnd = CreateWindowA(WC_STATICA, "Test", WS_OVERLAPPEDWINDOW, 10, 10, 300, 300, NULL, NULL, NULL, 0);
ShowWindow(hMainWnd, SW_SHOW);
@ -533,6 +537,7 @@ static void cleanup(void)
UnregisterClassA(ComboExTestClass, GetModuleHandleA(NULL));
DestroyWindow(hMainWnd);
DeleteObject(brush_red);
}
static void test_comboex_subclass(void)
@ -717,6 +722,7 @@ static LRESULT (CALLBACK *old_parent_proc)(HWND hwnd, UINT msg, WPARAM wparam, L
static LPCSTR expected_edit_text;
static LPCSTR expected_list_text;
static BOOL selchange_fired;
static HWND lparam_for_WM_CTLCOLOR;
static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
@ -748,6 +754,20 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hwnd, UINT msg, WPARAM wparam, LPAR
break;
}
break;
case WM_CTLCOLOR:
case WM_CTLCOLORMSGBOX:
case WM_CTLCOLOREDIT:
case WM_CTLCOLORLISTBOX:
case WM_CTLCOLORBTN:
case WM_CTLCOLORDLG:
case WM_CTLCOLORSCROLLBAR:
case WM_CTLCOLORSTATIC:
if (lparam_for_WM_CTLCOLOR)
{
ok(lparam_for_WM_CTLCOLOR == (HWND)lparam, "Expected %p, got %p\n", lparam_for_WM_CTLCOLOR, (HWND)lparam);
return (LRESULT) brush_red;
}
break;
}
return CallWindowProcA(old_parent_proc, hwnd, msg, wparam, lparam);
@ -1254,6 +1274,80 @@ static void test_combo_dropdown_size(DWORD style)
}
}
static void test_combo_ctlcolor(void)
{
static const int messages[] =
{
WM_CTLCOLOR,
WM_CTLCOLORMSGBOX,
WM_CTLCOLOREDIT,
WM_CTLCOLORLISTBOX,
WM_CTLCOLORBTN,
WM_CTLCOLORDLG,
WM_CTLCOLORSCROLLBAR,
WM_CTLCOLORSTATIC,
};
HBRUSH brush, global_brush;
COMBOBOXINFO info;
unsigned int i;
HWND combo;
combo = create_combobox(CBS_DROPDOWN);
ok(!!combo, "Failed to create combo window.\n");
old_parent_proc = (void *)SetWindowLongPtrA(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)parent_wnd_proc);
get_combobox_info(combo, &info);
lparam_for_WM_CTLCOLOR = info.hwndItem;
/* Parent returns valid brush handle. */
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
ok(brush == brush_red, "%u: unexpected brush %p, expected got %p.\n", i, brush, brush_red);
}
/* Parent returns NULL brush. */
global_brush = brush_red;
brush_red = NULL;
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
ok(!brush, "%u: unexpected brush %p.\n", i, brush);
}
brush_red = global_brush;
lparam_for_WM_CTLCOLOR = 0;
/* Parent does default processing. */
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
ok(!!brush && brush != brush_red, "%u: unexpected brush %p.\n", i, brush);
}
SetWindowLongPtrA(hMainWnd, GWLP_WNDPROC, (ULONG_PTR)old_parent_proc);
DestroyWindow(combo);
/* Combo without a parent. */
combo = CreateWindowA(WC_COMBOBOXA, "Combo", CBS_DROPDOWN, 5, 5, 100, 100, NULL, NULL, NULL, 0);
ok(!!combo, "Failed to create combo window.\n");
get_combobox_info(combo, &info);
for (i = 0; i < ARRAY_SIZE(messages); ++i)
{
brush = (HBRUSH)SendMessageA(combo, messages[i], 0, (LPARAM)info.hwndItem);
ok(!brush, "%u: unexpected brush %p.\n", i, brush);
}
DestroyWindow(combo);
}
START_TEST(combo)
{
ULONG_PTR ctx_cookie;
@ -1297,6 +1391,7 @@ START_TEST(combo)
test_combo_listbox_styles(CBS_DROPDOWNLIST);
test_combo_dropdown_size(0);
test_combo_dropdown_size(CBS_NOINTEGRALHEIGHT);
test_combo_ctlcolor();
cleanup();
unload_v6_module(ctx_cookie, hCtx);

View File

@ -1812,7 +1812,7 @@ static void test_listbox_dlgdir(void)
strcpy(pathBuffer, "C:\\");
res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE);
ok(res, "DlgDirList failed to list C:\\ folders\n");
todo_wine ok(!strcmp(pathBuffer, "*"), "DlgDirList set the invalid path spec '%s', expected '*'\n", pathBuffer);
ok(!strcmp(pathBuffer, "*"), "DlgDirList set the invalid path spec '%s', expected '*'\n", pathBuffer);
strcpy(pathBuffer, "C:\\*");
res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE);
@ -1823,8 +1823,8 @@ static void test_listbox_dlgdir(void)
SetLastError(0xdeadbeef);
strcpy(pathBuffer, "C:\\INVALID$$DIR");
res = DlgDirListA(hWnd, pathBuffer, ID_TEST_LISTBOX, 0, DDL_DIRECTORY | DDL_EXCLUSIVE);
todo_wine ok(!res, "DlgDirList should have failed with 0 but %d was returned\n", res);
todo_wine ok(GetLastError() == ERROR_NO_WILDCARD_CHARACTERS,
ok(!res, "DlgDirList should have failed with 0 but %d was returned\n", res);
ok(GetLastError() == ERROR_NO_WILDCARD_CHARACTERS,
"GetLastError should return 0x589, got 0x%X\n",GetLastError());
DestroyWindow(hWnd);

View File

@ -254,6 +254,13 @@ static void test_PBM_STEPIT(void)
{ 3, 15, 5 },
{ 3, 15, -5 },
{ 3, 15, 50 },
{ -15, 15, 5 },
{ -3, -2, -5 },
{ 0, 0, 1 },
{ 5, 5, 1 },
{ 0, 0, -1 },
{ 5, 5, -1 },
{ 10, 5, 2 },
};
HWND progress;
int i, j;
@ -261,6 +268,7 @@ static void test_PBM_STEPIT(void)
for (i = 0; i < ARRAY_SIZE(stepit_tests); i++)
{
struct stepit_test *test = &stepit_tests[i];
PBRANGE range;
LRESULT ret;
progress = create_progress(0);
@ -268,6 +276,9 @@ static void test_PBM_STEPIT(void)
ret = SendMessageA(progress, PBM_SETRANGE32, test->min, test->max);
ok(ret != 0, "Unexpected return value.\n");
SendMessageA(progress, PBM_GETRANGE, 0, (LPARAM)&range);
ok(range.iLow == test->min && range.iHigh == test->max, "Unexpected range.\n");
SendMessageA(progress, PBM_SETPOS, test->min, 0);
SendMessageA(progress, PBM_SETSTEP, test->step, 0);
@ -277,15 +288,20 @@ static void test_PBM_STEPIT(void)
int current;
pos += test->step;
if (pos > test->max)
pos = (pos - test->min) % (test->max - test->min) + test->min;
if (pos < test->min)
pos = (pos - test->min) % (test->max - test->min) + test->max;
if (test->min != test->max)
{
if (pos > test->max)
pos = (pos - test->min) % (test->max - test->min) + test->min;
if (pos < test->min)
pos = (pos - test->min) % (test->max - test->min) + test->max;
}
else
pos = test->min;
SendMessageA(progress, PBM_STEPIT, 0, 0);
current = SendMessageA(progress, PBM_GETPOS, 0, 0);
ok(current == pos, "Unexpected position %d, expected %d.\n", current, pos);
ok(current == pos, "%u: unexpected position %d, expected %d.\n", i, current, pos);
}
DestroyWindow(progress);

View File

@ -499,6 +499,7 @@ static void test_layout(void)
REBARBANDINFOA rbi;
HIMAGELIST himl;
REBARINFO ri;
int count;
rbsize_results_init();
@ -660,9 +661,27 @@ static void test_layout(void)
SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
check_sizes();
rbsize_results_free();
DestroyWindow(hRebar);
pImageList_Destroy(himl);
/* One hidden band. */
hRebar = create_rebar_control();
rbi.cbSize = REBARBANDINFOA_V6_SIZE;
rbi.fMask = RBBIM_STYLE | RBBIM_SIZE | RBBIM_CHILDSIZE | RBBIM_CHILD;
rbi.fStyle = RBBS_HIDDEN;
rbi.cx = 200;
rbi.cxMinChild = 100;
rbi.cyMinChild = 30;
rbi.hwndChild = NULL;
SendMessageA(hRebar, RB_INSERTBANDA, -1, (LPARAM)&rbi);
count = SendMessageA(hRebar, RB_GETROWCOUNT, 0, 0);
ok(!count, "Unexpected row count %d.\n", count);
DestroyWindow(hRebar);
rbsize_results_free();
}
#if 0 /* use this to generate more tests */

View File

@ -931,7 +931,7 @@ static void test_selection(void)
static void test_thumb_length(void)
{
HWND hWndTrackbar;
int r;
int r, r2;
hWndTrackbar = create_trackbar(defaultstyle, hWndParent);
ok(hWndTrackbar != NULL, "Expected non NULL value\n");
@ -963,6 +963,22 @@ static void test_thumb_length(void)
ok_sequence(sequences, PARENT_SEQ_INDEX, parent_thumb_length_test_seq, "parent thumb length test sequence", TRUE);
DestroyWindow(hWndTrackbar);
/* Fixed thumb length does not depend on window size. */
hWndTrackbar = CreateWindowA(TRACKBAR_CLASSA, "Trackbar Control", WS_VISIBLE | TBS_ENABLESELRANGE
| TBS_FIXEDLENGTH, 0, 0, 0, 0, hWndParent, NULL, GetModuleHandleA(NULL), NULL);
r = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0, 0);
DestroyWindow(hWndTrackbar);
hWndTrackbar = CreateWindowA(TRACKBAR_CLASSA, "Trackbar Control", WS_VISIBLE | TBS_ENABLESELRANGE
| TBS_FIXEDLENGTH, 0, 0, 200, 200, hWndParent, NULL, GetModuleHandleA(NULL), NULL);
r2 = SendMessageA(hWndTrackbar, TBM_GETTHUMBLENGTH, 0, 0);
ok(r2 == r, "Unexpected thumb length %d.\n", r);
DestroyWindow(hWndTrackbar);
}
static void test_tic_settings(void)

View File

@ -42,6 +42,8 @@ static BOOL g_get_rect_in_expand;
static BOOL g_disp_A_to_W;
static BOOL g_disp_set_stateimage;
static BOOL g_beginedit_alter_text;
static const char *g_endedit_overwrite_contents;
static char *g_endedit_overwrite_ptr;
static HFONT g_customdraw_font;
static BOOL g_v6;
@ -1320,7 +1322,19 @@ static LRESULT CALLBACK parent_wnd_proc(HWND hWnd, UINT message, WPARAM wParam,
break;
}
case TVN_ENDLABELEDITA: return TRUE;
case TVN_ENDLABELEDITA:
{
NMTVDISPINFOA *disp = (NMTVDISPINFOA *)lParam;
if (disp->item.mask & TVIF_TEXT)
{
ok(disp->item.cchTextMax == MAX_PATH, "cchTextMax is %d\n", disp->item.cchTextMax);
if (g_endedit_overwrite_contents)
strcpy(disp->item.pszText, g_endedit_overwrite_contents);
if (g_endedit_overwrite_ptr)
disp->item.pszText = g_endedit_overwrite_ptr;
}
return TRUE;
}
case TVN_ITEMEXPANDINGA:
{
UINT newmask = pTreeView->itemNew.mask & ~TVIF_CHILDREN;
@ -1576,7 +1590,7 @@ static void test_itemedit(void)
DWORD r;
HWND edit;
TVITEMA item;
CHAR buffA[20];
CHAR buffA[500];
HWND hTree;
hTree = create_treeview_control(0);
@ -1667,6 +1681,84 @@ static void test_itemedit(void)
GetWindowTextA(edit, buffA, ARRAY_SIZE(buffA));
ok(!strcmp(buffA, "<edittextaltered>"), "got string %s\n", buffA);
r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
/* How much text can be typed? */
edit = (HWND)SendMessageA(hTree, TVM_EDITLABELA, 0, (LPARAM)hRoot);
ok(IsWindow(edit), "Expected valid handle\n");
r = SendMessageA(edit, EM_GETLIMITTEXT, 0, 0);
expect(MAX_PATH - 1, r);
/* WM_SETTEXT can set more... */
memset(buffA, 'a', ARRAY_SIZE(buffA));
buffA[ARRAY_SIZE(buffA)-1] = 0;
r = SetWindowTextA(edit, buffA);
expect(TRUE, r);
r = GetWindowTextA(edit, buffA, ARRAY_SIZE(buffA));
expect(ARRAY_SIZE(buffA) - 1, r);
/* ...but it's trimmed to MAX_PATH chars when editing ends */
r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
item.mask = TVIF_TEXT;
item.hItem = hRoot;
item.pszText = buffA;
item.cchTextMax = ARRAY_SIZE(buffA);
r = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, r);
expect(MAX_PATH - 1, strlen(item.pszText));
/* We can't get around that MAX_PATH limit by increasing EM_SETLIMITTEXT */
edit = (HWND)SendMessageA(hTree, TVM_EDITLABELA, 0, (LPARAM)hRoot);
ok(IsWindow(edit), "Expected valid handle\n");
SendMessageA(edit, EM_SETLIMITTEXT, ARRAY_SIZE(buffA)-1, 0);
memset(buffA, 'a', ARRAY_SIZE(buffA));
buffA[ARRAY_SIZE(buffA)-1] = 0;
r = SetWindowTextA(edit, buffA);
expect(TRUE, r);
r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
item.mask = TVIF_TEXT;
item.hItem = hRoot;
item.pszText = buffA;
item.cchTextMax = ARRAY_SIZE(buffA);
r = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, r);
expect(MAX_PATH - 1, strlen(item.pszText));
/* Overwriting of pszText contents in TVN_ENDLABELEDIT */
edit = (HWND)SendMessageA(hTree, TVM_EDITLABELA, 0, (LPARAM)hRoot);
ok(IsWindow(edit), "Expected valid handle\n");
r = SetWindowTextA(edit, "old");
expect(TRUE, r);
g_endedit_overwrite_contents = "<new_contents>";
r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
g_endedit_overwrite_contents = NULL;
item.mask = TVIF_TEXT;
item.hItem = hRoot;
item.pszText = buffA;
item.cchTextMax = ARRAY_SIZE(buffA);
r = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, r);
expect(0, strcmp(item.pszText, "<new_contents>"));
/* Overwriting of pszText pointer in TVN_ENDLABELEDIT */
edit = (HWND)SendMessageA(hTree, TVM_EDITLABELA, 0, (LPARAM)hRoot);
ok(IsWindow(edit), "Expected valid handle\n");
r = SetWindowTextA(edit, "old");
expect(TRUE, r);
g_endedit_overwrite_ptr = (char*) "<new_ptr>";
r = SendMessageA(hTree, WM_COMMAND, MAKEWPARAM(0, EN_KILLFOCUS), (LPARAM)edit);
expect(0, r);
g_endedit_overwrite_ptr = NULL;
item.mask = TVIF_TEXT;
item.hItem = hRoot;
item.pszText = buffA;
item.cchTextMax = ARRAY_SIZE(buffA);
r = SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&item);
expect(TRUE, r);
expect(0, strcmp(item.pszText, "<new_ptr>"));
DestroyWindow(hTree);
}

View File

@ -28,7 +28,6 @@
* - check UDM_SETBUDDY message
* - check UDM_GETBUDDY message
* - up-down control and buddy control must have the same parent
* - up-down control notifies its parent window when its position changes with UDN_DELTAPOS + WM_VSCROLL or WM_HSCROLL
* - check UDS_ALIGN[LEFT,RIGHT]...check that width of buddy window is decreased
* - check that UDS_SETBUDDYINT sets the caption of the buddy window when it is changed
* - check that the thousands operator is set for large numbers
@ -165,6 +164,32 @@ static const struct message test_updown_pos_nochange_seq[] = {
{ 0 }
};
static const struct message test_updown_pos_notifications_seq[] = {
{ WM_CTLCOLOREDIT, sent|optional },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_SETFOCUS) },
{ WM_NOTIFY, sent|id, 0, 0, UDN_DELTAPOS },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_UPDATE) },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_CHANGE) },
{ WM_VSCROLL, sent|wparam, MAKELONG(SB_THUMBPOSITION, 51) },
{ WM_CTLCOLOREDIT, sent|optional },
{ WM_VSCROLL, sent|wparam, MAKELONG(SB_ENDSCROLL, 51) },
/* no WM_NOTIFY(NM_RELEASEDCAPTURE) message */
{ 0 }
};
static const struct message test_updown_pos_notifications_horz_seq[] = {
{ WM_CTLCOLOREDIT, sent|optional },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_SETFOCUS) },
{ WM_NOTIFY, sent|id, 0, 0, UDN_DELTAPOS },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_UPDATE) },
{ WM_COMMAND, sent|wparam, MAKELONG(0, EN_CHANGE) },
{ WM_HSCROLL, sent|wparam, MAKELONG(SB_THUMBPOSITION, 51) },
{ WM_CTLCOLOREDIT, sent|optional },
{ WM_HSCROLL, sent|wparam, MAKELONG(SB_ENDSCROLL, 51) },
/* no WM_NOTIFY(NM_RELEASEDCAPTURE) message */
{ 0 }
};
static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static LONG defwndproc_counter = 0;
@ -186,6 +211,8 @@ static LRESULT WINAPI parent_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LP
if (defwndproc_counter) msg.flags |= defwinproc;
msg.wParam = wParam;
msg.lParam = lParam;
if (message == WM_NOTIFY && lParam)
msg.id = ((NMHDR*)lParam)->code;
add_message(sequences, PARENT_SEQ_INDEX, &msg);
}
@ -900,6 +927,52 @@ static void test_CreateUpDownControl(void)
DestroyWindow(updown);
}
static void test_updown_pos_notifications(void)
{
HWND updown;
RECT rect;
UINT x, y;
int result;
/* test updown control notifications without UDS_HORZ style */
updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT, g_edit);
SetFocus(updown);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
/* click on the up-arrow button */
GetClientRect(updown, &rect);
x = rect.left + (rect.right - rect.left) / 2;
y = rect.top + (rect.bottom - rect.top) / 4;
result = SendMessageA(updown, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
expect(result, 0);
result = SendMessageA(updown, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
expect(result, 0);
ok_sequence(sequences, PARENT_SEQ_INDEX, test_updown_pos_notifications_seq,
"test updown to parent notify (vertical)", FALSE);
DestroyWindow(updown);
/* test updown control notifications with UDS_HORZ style */
updown = create_updown_control(UDS_ALIGNRIGHT | UDS_SETBUDDYINT | UDS_HORZ, g_edit);
SetFocus(updown);
flush_sequences(sequences, NUM_MSG_SEQUENCES);
/* click on the right-arrow button */
GetClientRect(updown, &rect);
x = rect.left + (rect.right - rect.left) * 3 / 4;
y = rect.top + (rect.bottom - rect.top) / 2;
result = SendMessageA(updown, WM_LBUTTONDOWN, 0, MAKELPARAM(x, y));
expect(result, 0);
result = SendMessageA(updown, WM_LBUTTONUP, 0, MAKELPARAM(x, y));
expect(result, 0);
ok_sequence(sequences, PARENT_SEQ_INDEX, test_updown_pos_notifications_horz_seq,
"test updown to parent notify (horizontal)", FALSE);
DestroyWindow(updown);
}
static void init_functions(void)
{
HMODULE hComCtl32 = LoadLibraryA("comctl32.dll");
@ -931,6 +1004,7 @@ START_TEST(updown)
test_updown_unicode();
test_UDS_SETBUDDYINT();
test_CreateUpDownControl();
test_updown_pos_notifications();
DestroyWindow(g_edit);
DestroyWindow(parent_wnd);

View File

@ -5733,7 +5733,10 @@ TOOLBAR_LButtonUp (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
TOOLBAR_SendNotify(&hdr, infoPtr, TBN_TOOLBARCHANGE);
}
else if (infoPtr->nButtonDown >= 0) {
else if (infoPtr->nButtonDown >= 0)
{
BOOL was_clicked = nHit == infoPtr->nButtonDown;
btnPtr = &infoPtr->buttons[infoPtr->nButtonDown];
btnPtr->fsState &= ~TBSTATE_PRESSED;
@ -5775,7 +5778,7 @@ TOOLBAR_LButtonUp (TOOLBAR_INFO *infoPtr, WPARAM wParam, LPARAM lParam)
TOOLBAR_SendNotify ((NMHDR *) &nmtb, infoPtr,
TBN_ENDDRAG);
if (btnPtr->fsState & TBSTATE_ENABLED)
if (was_clicked && btnPtr->fsState & TBSTATE_ENABLED)
{
SendMessageW (infoPtr->hwndNotify, WM_COMMAND,
MAKEWPARAM(infoPtr->buttons[nHit].idCommand, BN_CLICKED), (LPARAM)infoPtr->hwndSelf);

View File

@ -1660,6 +1660,13 @@ TOOLTIPS_SetToolInfoT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
toolPtr->rect = ti->rect;
toolPtr->hinst = ti->hinst;
if ( (toolPtr->lpszText) &&
!IS_INTRESOURCE(toolPtr->lpszText) ) {
if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW)
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
if (IS_INTRESOURCE(ti->lpszText)) {
TRACE("set string id %x\n", LOWORD(ti->lpszText));
toolPtr->lpszText = ti->lpszText;
@ -1668,12 +1675,6 @@ TOOLTIPS_SetToolInfoT (TOOLTIPS_INFO *infoPtr, const TTTOOLINFOW *ti, BOOL isW)
if (ti->lpszText == LPSTR_TEXTCALLBACKW)
toolPtr->lpszText = LPSTR_TEXTCALLBACKW;
else {
if ( (toolPtr->lpszText) &&
!IS_INTRESOURCE(toolPtr->lpszText) ) {
if( toolPtr->lpszText != LPSTR_TEXTCALLBACKW)
Free (toolPtr->lpszText);
toolPtr->lpszText = NULL;
}
if (ti->lpszText) {
if (isW) {
INT len = lstrlenW (ti->lpszText);

View File

@ -1481,15 +1481,18 @@ TRACKBAR_InitializeThumb (TRACKBAR_INFO *infoPtr)
infoPtr->uThumbLen = get_scaled_metric(infoPtr, infoPtr->dwStyle & TBS_ENABLESELRANGE ? 23 : 21);
GetClientRect(infoPtr->hwndSelf,&rect);
if (infoPtr->dwStyle & TBS_VERT)
client_size = rect.right - rect.left;
else
client_size = rect.bottom - rect.top;
if (!(infoPtr->dwStyle & TBS_FIXEDLENGTH))
{
GetClientRect(infoPtr->hwndSelf, &rect);
if (infoPtr->dwStyle & TBS_VERT)
client_size = rect.right - rect.left;
else
client_size = rect.bottom - rect.top;
if (client_size < infoPtr->uThumbLen)
infoPtr->uThumbLen = client_size > get_scaled_metric(infoPtr, 9) ?
client_size - get_scaled_metric(infoPtr, 5) : get_scaled_metric(infoPtr, 4);
if (client_size < infoPtr->uThumbLen)
infoPtr->uThumbLen = client_size > get_scaled_metric(infoPtr, 9) ?
client_size - get_scaled_metric(infoPtr, 5) : get_scaled_metric(infoPtr, 4);
}
TRACKBAR_CalcChannel (infoPtr);
TRACKBAR_UpdateThumb (infoPtr);

View File

@ -758,7 +758,7 @@ TREEVIEW_UpdateDispInfo(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item,
else {
int len = max(lstrlenW(callback.item.pszText) + 1,
TEXT_CALLBACK_SIZE);
LPWSTR newText = heap_realloc(item->pszText, len);
LPWSTR newText = heap_realloc(item->pszText, len*sizeof(WCHAR));
TRACE("returned wstr %s, len=%d\n",
debugstr_w(callback.item.pszText), len);
@ -3971,6 +3971,7 @@ TREEVIEW_EditLabel(TREEVIEW_INFO *infoPtr, HTREEITEM hItem)
infoPtr->wpEditOrig = (WNDPROC)SetWindowLongPtrW(hwndEdit, GWLP_WNDPROC,
(DWORD_PTR)
TREEVIEW_Edit_SubclassProc);
SendMessageW(hwndEdit, EM_SETLIMITTEXT, MAX_PATH - 1, 0);
if (hItem->pszText)
SetWindowTextW(hwndEdit, hItem->pszText);
@ -3996,8 +3997,8 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
TREEVIEW_ITEM *editedItem = infoPtr->editItem;
NMTVDISPINFOW tvdi;
BOOL bCommit;
WCHAR tmpText[1024] = { '\0' };
WCHAR *newText = tmpText;
WCHAR tmpText[MAX_PATH] = { '\0' };
WCHAR *newText;
int iLength = 0;
if (!IsWindow(infoPtr->hwndEdit)) return FALSE;
@ -4010,18 +4011,13 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
if (!bCancel)
{
if (!infoPtr->bNtfUnicode)
iLength = GetWindowTextA(infoPtr->hwndEdit, (LPSTR)tmpText, 1023);
iLength = GetWindowTextA(infoPtr->hwndEdit, (LPSTR)tmpText, ARRAY_SIZE(tmpText));
else
iLength = GetWindowTextW(infoPtr->hwndEdit, tmpText, 1023);
if (iLength >= 1023)
{
ERR("Insufficient space to retrieve new item label\n");
}
iLength = GetWindowTextW(infoPtr->hwndEdit, tmpText, ARRAY_SIZE(tmpText));
tvdi.item.mask = TVIF_TEXT;
tvdi.item.pszText = tmpText;
tvdi.item.cchTextMax = iLength + 1;
tvdi.item.cchTextMax = ARRAY_SIZE(tmpText);
}
else
{
@ -4035,11 +4031,13 @@ TREEVIEW_EndEditLabelNow(TREEVIEW_INFO *infoPtr, BOOL bCancel)
{
if (!infoPtr->bNtfUnicode)
{
DWORD len = MultiByteToWideChar( CP_ACP, 0, (LPSTR)tmpText, -1, NULL, 0 );
DWORD len = MultiByteToWideChar( CP_ACP, 0, (LPSTR)tvdi.item.pszText, -1, NULL, 0 );
newText = heap_alloc(len * sizeof(WCHAR));
MultiByteToWideChar( CP_ACP, 0, (LPSTR)tmpText, -1, newText, len );
MultiByteToWideChar( CP_ACP, 0, (LPSTR)tvdi.item.pszText, -1, newText, len );
iLength = len - 1;
}
else
newText = tvdi.item.pszText;
if (strcmpW(newText, editedItem->pszText) != 0)
{

View File

@ -781,14 +781,8 @@ static BOOL UPDOWN_CancelMode (UPDOWN_INFO *infoPtr)
KillTimer (infoPtr->Self, TIMER_ACCEL);
KillTimer (infoPtr->Self, TIMER_AUTOPRESS);
if (GetCapture() == infoPtr->Self) {
NMHDR hdr;
hdr.hwndFrom = infoPtr->Self;
hdr.idFrom = GetWindowLongPtrW (infoPtr->Self, GWLP_ID);
hdr.code = NM_RELEASEDCAPTURE;
SendMessageW(infoPtr->Notify, WM_NOTIFY, hdr.idFrom, (LPARAM)&hdr);
if (GetCapture() == infoPtr->Self)
ReleaseCapture();
}
infoPtr->Flags &= ~FLAG_PRESSED;
InvalidateRect (infoPtr->Self, NULL, FALSE);

View File

@ -40,7 +40,7 @@ typedef struct dispensermanager
{
IDispenserManager IDispenserManager_iface;
LONG ref;
HANDLE mta_thread, mta_stop_event;
} dispensermanager;
typedef struct holder
@ -264,12 +264,27 @@ static ULONG WINAPI dismanager_Release(IDispenserManager *iface)
if (!ref)
{
heap_free(This);
if (This->mta_thread)
{
SetEvent(This->mta_stop_event);
WaitForSingleObject(This->mta_thread, INFINITE);
CloseHandle(This->mta_stop_event);
CloseHandle(This->mta_thread);
}
heap_free(This);
}
return ref;
}
static DWORD WINAPI mta_thread_proc(void *arg)
{
CoInitializeEx(NULL, COINIT_MULTITHREADED);
WaitForSingleObject(arg, INFINITE);
CoUninitialize();
return 0;
}
static HRESULT WINAPI dismanager_RegisterDispenser(IDispenserManager *iface, IDispenserDriver *driver,
LPCOLESTR name, IHolder **dispenser)
{
@ -283,6 +298,12 @@ static HRESULT WINAPI dismanager_RegisterDispenser(IDispenserManager *iface, IDi
hr = create_holder(driver, dispenser);
if (!This->mta_thread)
{
This->mta_stop_event = CreateEventA(NULL, TRUE, FALSE, NULL);
This->mta_thread = CreateThread(NULL, 0, mta_thread_proc, This->mta_stop_event, 0, NULL);
}
TRACE("<-- 0x%08x, %p\n", hr, *dispenser);
return hr;
@ -313,7 +334,7 @@ static HRESULT WINAPI comsvcscf_CreateInstance(IClassFactory *cf,IUnknown* outer
TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), object);
dismanager = heap_alloc(sizeof(*dismanager));
dismanager = heap_alloc_zero(sizeof(*dismanager));
if (!dismanager)
{
*object = NULL;

View File

@ -24,6 +24,7 @@
#include "winbase.h"
#include "ole2.h"
#include "comsvcs.h"
#include "msxml.h"
#include "wine/test.h"
@ -141,6 +142,17 @@ static const struct IDispenserDriverVtbl driver_vtbl =
static IDispenserDriver DispenserDriver = { &driver_vtbl };
static DWORD WINAPI com_thread(void *arg)
{
IUnknown *unk;
HRESULT hr;
hr = CoCreateInstance(&CLSID_XMLDocument, NULL, CLSCTX_INPROC_SERVER, &IID_IUnknown, (void **)&unk);
if (hr == S_OK) IUnknown_Release(unk);
return hr;
}
static void create_dispenser(void)
{
static const WCHAR pool0[] = {'S','C','.','P','o','o','l',' ','0',' ','0',0};
@ -149,7 +161,9 @@ static void create_dispenser(void)
HRESULT hr;
IDispenserManager *dispenser = NULL;
IHolder *holder1 = NULL, *holder2 = NULL, *holder3 = NULL;
HANDLE thread;
RESID resid;
DWORD ret;
BSTR str;
hr = CoCreateInstance( &CLSID_DispenserManager, NULL, CLSCTX_ALL, &IID_IDispenserManager, (void**)&dispenser);
@ -160,9 +174,22 @@ static void create_dispenser(void)
return;
}
thread = CreateThread(NULL, 0, com_thread, NULL, 0, NULL);
ok(!WaitForSingleObject(thread, 1000), "wait failed\n");
GetExitCodeThread(thread, &ret);
ok(ret == CO_E_NOTINITIALIZED, "got unexpected hr %#x\n", ret);
hr = IDispenserManager_RegisterDispenser(dispenser, &DispenserDriver, pool0, &holder1);
ok(hr == S_OK, "got 0x%08x\n", hr);
/* The above call creates an MTA thread, but we need to wait for it to
* actually initialize. */
Sleep(200);
thread = CreateThread(NULL, 0, com_thread, NULL, 0, NULL);
ok(!WaitForSingleObject(thread, 1000), "wait failed\n");
GetExitCodeThread(thread, &ret);
ok(ret == S_OK, "got unexpected hr %#x\n", ret);
hr = IDispenserManager_RegisterDispenser(dispenser, &DispenserDriver, pool0, &holder2);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok(holder1 != holder2, "same holder object returned\n");

View File

@ -468,7 +468,7 @@
@ stub -arch=win64 ?_TryAcquireWrite@_ReaderWriterLock@details@Concurrency@@QEAA_NXZ
@ stub ?_UnderlyingYield@details@Concurrency@@YAXXZ
@ cdecl ?_Value@_SpinCount@details@Concurrency@@SAIXZ() msvcr120.?_Value@_SpinCount@details@Concurrency@@SAIXZ
@ stub ?_Yield@_Context@details@Concurrency@@SAXXZ
@ cdecl ?_Yield@_Context@details@Concurrency@@SAXXZ() msvcr120.?_Yield@_Context@details@Concurrency@@SAXXZ
@ stub -arch=i386 ?cancel@agent@Concurrency@@QAE_NXZ
@ stub -arch=win64 ?cancel@agent@Concurrency@@QEAA_NXZ
@ stub ?current@location@Concurrency@@SA?AV12@XZ

View File

@ -683,6 +683,13 @@ static BOOL CRYPT_AsnDecodeArray(const struct AsnArrayDescriptor *arrayDesc,
&itemDecoded);
if (ret)
{
/* Ignore an item that failed to decode but the decoder doesn't want to fail the whole process */
if (!size)
{
ptr += itemEncoded;
continue;
}
cItems++;
if (itemSizes != &itemSize)
itemSizes = CryptMemRealloc(itemSizes,
@ -5631,6 +5638,25 @@ static BOOL WINAPI CRYPT_AsnDecodePKCSSignerInfo(DWORD dwCertEncodingType,
return ret;
}
static BOOL verify_and_copy_certificate(const BYTE *pbEncoded, DWORD cbEncoded, DWORD dwFlags,
void *pvStructInfo, DWORD *pcbStructInfo, DWORD *pcbDecoded)
{
PCCERT_CONTEXT cert;
cert = CertCreateCertificateContext(X509_ASN_ENCODING, pbEncoded, cbEncoded);
if (!cert)
{
WARN("CertCreateCertificateContext error %#x\n", GetLastError());
*pcbStructInfo = 0;
*pcbDecoded = 0;
return TRUE;
}
CertFreeCertificateContext(cert);
return CRYPT_AsnDecodeCopyBytes(pbEncoded, cbEncoded, dwFlags, pvStructInfo, pcbStructInfo, pcbDecoded);
}
static BOOL CRYPT_AsnDecodeCMSCertEncoded(const BYTE *pbEncoded,
DWORD cbEncoded, DWORD dwFlags, void *pvStructInfo, DWORD *pcbStructInfo,
DWORD *pcbDecoded)
@ -5640,7 +5666,7 @@ static BOOL CRYPT_AsnDecodeCMSCertEncoded(const BYTE *pbEncoded,
offsetof(CRYPT_SIGNED_INFO, cCertEncoded),
offsetof(CRYPT_SIGNED_INFO, rgCertEncoded),
MEMBERSIZE(CRYPT_SIGNED_INFO, cCertEncoded, cCrlEncoded),
CRYPT_AsnDecodeCopyBytes,
verify_and_copy_certificate,
sizeof(CRYPT_DER_BLOB), TRUE, offsetof(CRYPT_DER_BLOB, pbData) };
TRACE("%p, %d, %08x, %p, %d, %p\n", pbEncoded, cbEncoded, dwFlags,

View File

@ -3648,9 +3648,15 @@ static UINT STDMETHODCALLTYPE d3d11_device_GetExceptionMode(ID3D11Device2 *iface
return 0;
}
static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *iface, ID3D11DeviceContext1 **context)
static void STDMETHODCALLTYPE d3d11_device_GetImmediateContext1(ID3D11Device2 *iface,
ID3D11DeviceContext1 **immediate_context)
{
FIXME("iface %p, context %p stub!\n", iface, context);
struct d3d_device *device = impl_from_ID3D11Device2(iface);
TRACE("iface %p, immediate_context %p.\n", iface, immediate_context);
*immediate_context = &device->immediate_context.ID3D11DeviceContext1_iface;
ID3D11DeviceContext1_AddRef(*immediate_context);
}
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext1(ID3D11Device2 *iface, UINT flags,

View File

@ -6439,12 +6439,7 @@ static void test_device_context_state(void)
feature_level = ID3D11Device1_GetFeatureLevel(device);
ID3D11Device1_GetImmediateContext1(device, &context);
todo_wine ok(!!context, "Failed to get immediate context.\n");
if (!context)
{
ID3D11Device1_Release(device);
return;
}
ok(!!context, "Failed to get immediate context.\n");
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
@ -6471,7 +6466,14 @@ static void test_device_context_state(void)
feature_level = min(feature_level, D3D_FEATURE_LEVEL_10_1);
hr = ID3D11Device1_CreateDeviceContextState(device, 0, &feature_level, 1, D3D11_SDK_VERSION,
&IID_ID3D10Device, NULL, &context_state);
todo_wine
ok(SUCCEEDED(hr), "Failed to create device context state, hr %#x.\n", hr);
if (FAILED(hr))
{
ID3D11SamplerState_Release(sampler);
ID3D11Device1_Release(device);
return;
}
refcount = get_refcount(context_state);
ok(refcount == 1, "Got refcount %u, expected 1.\n", refcount);

View File

@ -56,9 +56,10 @@ static ULONG WINAPI d3d8_vertexbuffer_AddRef(IDirect3DVertexBuffer8 *iface)
{
IDirect3DDevice8_AddRef(buffer->parent_device);
wined3d_mutex_lock();
wined3d_buffer_incref(buffer->wined3d_buffer);
if (buffer->draw_buffer)
wined3d_buffer_incref(buffer->draw_buffer);
else
wined3d_buffer_incref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
}
@ -78,9 +79,10 @@ static ULONG WINAPI d3d8_vertexbuffer_Release(IDirect3DVertexBuffer8 *iface)
IDirect3DDevice8 *device = buffer->parent_device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
if (draw_buffer)
wined3d_buffer_decref(draw_buffer);
else
wined3d_buffer_decref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
/* Release the device last, as it may cause the device to be destroyed. */
@ -266,6 +268,9 @@ static const IDirect3DVertexBuffer8Vtbl Direct3DVertexBuffer8_Vtbl =
static void STDMETHODCALLTYPE d3d8_vertexbuffer_wined3d_object_destroyed(void *parent)
{
struct d3d8_vertexbuffer *buffer = parent;
if (buffer->draw_buffer)
wined3d_buffer_decref(buffer->wined3d_buffer);
d3d8_resource_cleanup(&buffer->resource);
heap_free(buffer);
}
@ -377,9 +382,10 @@ static ULONG WINAPI d3d8_indexbuffer_AddRef(IDirect3DIndexBuffer8 *iface)
{
IDirect3DDevice8_AddRef(buffer->parent_device);
wined3d_mutex_lock();
wined3d_buffer_incref(buffer->wined3d_buffer);
if (buffer->draw_buffer)
wined3d_buffer_incref(buffer->draw_buffer);
else
wined3d_buffer_incref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
}
@ -399,9 +405,10 @@ static ULONG WINAPI d3d8_indexbuffer_Release(IDirect3DIndexBuffer8 *iface)
IDirect3DDevice8 *device = buffer->parent_device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
if (draw_buffer)
wined3d_buffer_decref(draw_buffer);
else
wined3d_buffer_decref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
/* Release the device last, as it may cause the device to be destroyed. */
@ -586,6 +593,9 @@ static const IDirect3DIndexBuffer8Vtbl d3d8_indexbuffer_vtbl =
static void STDMETHODCALLTYPE d3d8_indexbuffer_wined3d_object_destroyed(void *parent)
{
struct d3d8_indexbuffer *buffer = parent;
if (buffer->draw_buffer)
wined3d_buffer_decref(buffer->wined3d_buffer);
d3d8_resource_cleanup(&buffer->resource);
heap_free(buffer);
}

View File

@ -60,16 +60,16 @@ IDirect3D8 * WINAPI DECLSPEC_HOTPATCH Direct3DCreate8(UINT sdk_version)
* ValidateVertexShader (D3D8.@)
*
* I've seen reserved1 and reserved2 always passed as 0's
* bool seems always passed as 0 or 1, but other values work as well...
* boolean seems always passed as 0 or 1, but other values work as well...
* toto result?
*/
HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD* reserved2, BOOL bool, DWORD* toto)
HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD* reserved2, BOOL boolean, DWORD* toto)
{
HRESULT ret;
static BOOL warned;
if (TRACE_ON(d3d8) || !warned) {
FIXME("(%p %p %p %d %p): stub\n", vertexshader, reserved1, reserved2, bool, toto);
FIXME("(%p %p %p %d %p): stub\n", vertexshader, reserved1, reserved2, boolean, toto);
warned = TRUE;
}
@ -98,13 +98,13 @@ HRESULT WINAPI ValidateVertexShader(DWORD* vertexshader, DWORD* reserved1, DWORD
* PARAMS
* toto result?
*/
HRESULT WINAPI ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL bool, DWORD* toto)
HRESULT WINAPI ValidatePixelShader(DWORD* pixelshader, DWORD* reserved1, BOOL boolean, DWORD* toto)
{
HRESULT ret;
static BOOL warned;
if (TRACE_ON(d3d8) || !warned) {
FIXME("(%p %p %d %p): stub\n", pixelshader, reserved1, bool, toto);
FIXME("(%p %p %d %p): stub\n", pixelshader, reserved1, boolean, toto);
warned = TRUE;
}

View File

@ -2423,9 +2423,9 @@ static HRESULT WINAPI d3d8_device_DrawPrimitiveUP(IDirect3DDevice8 *iface,
TRACE("iface %p, primitive_type %#x, primitive_count %u, data %p, stride %u.\n",
iface, primitive_type, primitive_count, data, stride);
if (!primitive_count)
if (!primitive_count || !stride)
{
WARN("primitive_count is 0, returning D3D_OK\n");
WARN("primitive_count or stride is 0, returning D3D_OK.\n");
return D3D_OK;
}
@ -2523,9 +2523,9 @@ static HRESULT WINAPI d3d8_device_DrawIndexedPrimitiveUP(IDirect3DDevice8 *iface
iface, primitive_type, min_vertex_idx, vertex_count, primitive_count,
index_data, index_format, vertex_data, vertex_stride);
if (!primitive_count)
if (!primitive_count || !vertex_stride)
{
WARN("primitive_count is 0, returning D3D_OK\n");
WARN("primitive_count or vertex_stride is 0, returning D3D_OK.\n");
return D3D_OK;
}

View File

@ -241,10 +241,11 @@ static HRESULT WINAPI d3d8_CheckDeviceFormat(IDirect3D8 *iface, UINT adapter, D3
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
iface, adapter, device_type, adapter_format, usage, resource_type, format);
if (!adapter_format)
if (adapter_format != D3DFMT_X8R8G8B8 && adapter_format != D3DFMT_R5G6B5
&& adapter_format != D3DFMT_X1R5G5B5)
{
WARN("Invalid adapter format.\n");
return D3DERR_INVALIDCALL;
return adapter_format ? D3DERR_NOTAVAILABLE : D3DERR_INVALIDCALL;
}
bind_flags = wined3d_bind_flags_from_d3d8_usage(usage);

View File

@ -3055,6 +3055,7 @@ static void test_wndproc(void)
ok(!expect_messages->message, "Expected message %#x for window %#x, but didn't receive it.\n",
expect_messages->message, expect_messages->window);
expect_messages = NULL;
flush_events();
SetForegroundWindow(GetDesktopWindow());
flush_events();
@ -9208,6 +9209,198 @@ static void test_resource_access(void)
DestroyWindow(window);
}
static void test_draw_primitive(void)
{
static const struct
{
float position[3];
DWORD color;
}
quad[] =
{
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, 1.0f, 0.0f}, 0xffff0000},
{{ 1.0f, 1.0f, 0.0f}, 0xffff0000},
{{ 1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
};
static const WORD indices[] = {0, 1, 2, 3, 0, 2};
IDirect3DVertexBuffer8 *vertex_buffer, *current_vb;
IDirect3DIndexBuffer8 *index_buffer, *current_ib;
UINT stride, base_vertex_index;
IDirect3DDevice8 *device;
DWORD stateblock;
IDirect3D8 *d3d;
ULONG refcount;
HWND window;
HRESULT hr;
BYTE *ptr;
window = create_window();
d3d = Direct3DCreate8(D3D_SDK_VERSION);
ok(!!d3d, "Failed to create a D3D object.\n");
if (!(device = create_device(d3d, window, NULL)))
{
skip("Failed to create a D3D device.\n");
IDirect3D8_Release(d3d);
DestroyWindow(window);
return;
}
hr = IDirect3DDevice8_CreateVertexBuffer(device, sizeof(quad), 0, 0,
D3DPOOL_DEFAULT, &vertex_buffer);
ok(SUCCEEDED(hr), "CreateVertexBuffer failed, hr %#x.\n", hr);
hr = IDirect3DVertexBuffer8_Lock(vertex_buffer, 0, 0, &ptr, D3DLOCK_DISCARD);
ok(SUCCEEDED(hr), "Lock failed, hr %#x.\n", hr);
memcpy(ptr, quad, sizeof(quad));
hr = IDirect3DVertexBuffer8_Unlock(vertex_buffer);
ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_SetStreamSource(device, 0, vertex_buffer, sizeof(*quad));
ok(SUCCEEDED(hr), "SetStreamSource failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_CreateIndexBuffer(device, sizeof(indices), 0, D3DFMT_INDEX16,
D3DPOOL_DEFAULT, &index_buffer);
ok(SUCCEEDED(hr), "CreateIndexBuffer failed, hr %#x.\n", hr);
hr = IDirect3DIndexBuffer8_Lock(index_buffer, 0, 0, &ptr, D3DLOCK_DISCARD);
ok(SUCCEEDED(hr), "Lock failed, hr %#x.\n", hr);
memcpy(ptr, indices, sizeof(indices));
hr = IDirect3DIndexBuffer8_Unlock(index_buffer);
ok(SUCCEEDED(hr), "Unlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(SUCCEEDED(hr), "SetRenderState D3DRS_LIGHTING failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_BeginScene(device);
ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawPrimitive(device, D3DPT_TRIANGLELIST, 0, 2);
ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetStreamSource(device, 0, &current_vb, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(current_vb == vertex_buffer, "Unexpected vb %p.\n", current_vb);
ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride);
IDirect3DVertexBuffer8_Release(current_vb);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0);
ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, sizeof(*quad));
ok(hr == D3D_OK, "DrawPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetStreamSource(device, 0, &current_vb, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(!current_vb, "Unexpected vb %p.\n", current_vb);
ok(!stride, "Unexpected stride %u.\n", stride);
/* NULL index buffer, NULL stream source. */
hr = IDirect3DDevice8_SetIndices(device, NULL, 0);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 4, 0, 2);
todo_wine ok(SUCCEEDED(hr), "DrawIndexedPrimitive failed, hr %#x.\n", hr);
/* Valid index buffer, NULL stream source. */
hr = IDirect3DDevice8_SetIndices(device, index_buffer, 1);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 4, 0, 2);
ok(SUCCEEDED(hr), "DrawIndexedPrimitive failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetIndices(device, &current_ib, &base_vertex_index);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(current_ib == index_buffer, "Unexpected index buffer %p.\n", current_ib);
ok(base_vertex_index == 1, "Unexpected base vertex index %u.\n", base_vertex_index);
IDirect3DIndexBuffer8_Release(current_ib);
hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0,
indices, D3DFMT_INDEX16, quad, 0);
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, 0);
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetIndices(device, &current_ib, &base_vertex_index);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(!current_ib, "Unexpected index buffer %p.\n", current_ib);
ok(!base_vertex_index, "Unexpected base vertex index %u.\n", base_vertex_index);
/* Resetting of stream source and index buffer is not recorded in stateblocks. */
hr = IDirect3DDevice8_SetStreamSource(device, 0, vertex_buffer, sizeof(*quad));
ok(SUCCEEDED(hr), "SetStreamSource failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_SetIndices(device, index_buffer, 1);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_BeginStateBlock(device);
ok(SUCCEEDED(hr), "BeginStateBlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_EndStateBlock(device, &stateblock);
ok(SUCCEEDED(hr), "BeginStateBlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetStreamSource(device, 0, &current_vb, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
todo_wine {
ok(!current_vb, "Unexpected vb %p.\n", current_vb);
ok(!stride, "Unexpected stride %u.\n", stride);
}
if (current_vb)
IDirect3DVertexBuffer8_Release(current_vb);
hr = IDirect3DDevice8_GetIndices(device, &current_ib, &base_vertex_index);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
todo_wine {
ok(!current_ib, "Unexpected index buffer %p.\n", current_ib);
ok(!base_vertex_index, "Unexpected base vertex index %u.\n", base_vertex_index);
}
if (current_ib)
IDirect3DIndexBuffer8_Release(current_ib);
hr = IDirect3DDevice8_CaptureStateBlock(device, stateblock);
ok(SUCCEEDED(hr), "Capture failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_SetStreamSource(device, 0, vertex_buffer, sizeof(*quad));
ok(SUCCEEDED(hr), "SetStreamSource failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_SetIndices(device, index_buffer, 1);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_ApplyStateBlock(device, stateblock);
ok(SUCCEEDED(hr), "Apply failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_GetStreamSource(device, 0, &current_vb, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(current_vb == vertex_buffer, "Unexpected vb %p.\n", current_vb);
ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride);
IDirect3DVertexBuffer8_Release(current_vb);
hr = IDirect3DDevice8_GetIndices(device, &current_ib, &base_vertex_index);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(current_ib == index_buffer, "Unexpected index buffer %p.\n", current_ib);
ok(base_vertex_index == 1, "Unexpected base vertex index %u.\n", base_vertex_index);
IDirect3DIndexBuffer8_Release(current_ib);
hr = IDirect3DDevice8_EndScene(device);
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr);
IDirect3DDevice8_DeleteStateBlock(device, stateblock);
IDirect3DVertexBuffer8_Release(vertex_buffer);
IDirect3DIndexBuffer8_Release(index_buffer);
refcount = IDirect3DDevice8_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
IDirect3D8_Release(d3d);
DestroyWindow(window);
}
START_TEST(device)
{
HMODULE d3d8_handle = GetModuleHandleA("d3d8.dll");
@ -9321,6 +9514,7 @@ START_TEST(device)
test_device_caps();
test_get_info();
test_resource_access();
test_draw_primitive();
UnregisterClassA("d3d8_test_wc", GetModuleHandleA(NULL));
}

View File

@ -7746,13 +7746,19 @@ static void test_vshader_input(void)
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, -1.0f, 0.1f}, 0x00ff8040},
{{ 1.0f, 0.0f, 0.1f}, 0x00ff8040},
},
};
static const struct
{
struct vec3 position;
struct vec3 dummy; /* testing D3DVSD_SKIP */
DWORD diffuse;
}
quad3_color[] =
{
{{-1.0f, 0.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 1.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
{{ 0.0f, 1.0f, 0.1f}, 0x00ff8040},
{{-1.0f, 0.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{-1.0f, 1.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{ 0.0f, 0.0f, 0.1f}, {0.0f}, 0x00ff8040},
{{ 0.0f, 1.0f, 0.1f}, {0.0f}, 0x00ff8040},
};
static const float quad4_color[] =
{
@ -7803,6 +7809,7 @@ static void test_vshader_input(void)
{
D3DVSD_STREAM(0),
D3DVSD_REG(0, D3DVSDT_FLOAT3), /* position */
D3DVSD_SKIP(3), /* not used */
D3DVSD_REG(5, D3DVSDT_D3DCOLOR), /* diffuse */
D3DVSD_END()
};

View File

@ -294,8 +294,8 @@ static UINT convert_to_wined3d_declaration(const DWORD *d3d8_elements, DWORD *d3
offset += wined3d_type_sizes[type];
} else if (token_type == D3DVSD_TOKEN_STREAMDATA && (*token & D3DVSD_DATALOADTYPEMASK)) {
TRACE(" 0x%08x SKIP(%u)\n", token_type, ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT));
offset += sizeof(DWORD) * ((token_type & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
TRACE(" 0x%08x SKIP(%u)\n", *token, (*token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
offset += sizeof(DWORD) * ((*token & D3DVSD_SKIPCOUNTMASK) >> D3DVSD_SKIPCOUNTSHIFT);
}
if (element_count >= 127) {

View File

@ -58,9 +58,10 @@ static ULONG WINAPI d3d9_vertexbuffer_AddRef(IDirect3DVertexBuffer9 *iface)
{
IDirect3DDevice9Ex_AddRef(buffer->parent_device);
wined3d_mutex_lock();
wined3d_buffer_incref(buffer->wined3d_buffer);
if (buffer->draw_buffer)
wined3d_buffer_incref(buffer->draw_buffer);
else
wined3d_buffer_incref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
}
@ -80,9 +81,10 @@ static ULONG WINAPI d3d9_vertexbuffer_Release(IDirect3DVertexBuffer9 *iface)
IDirect3DDevice9Ex *device = buffer->parent_device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
if (draw_buffer)
wined3d_buffer_decref(draw_buffer);
else
wined3d_buffer_decref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
/* Release the device last, as it may cause the device to be destroyed. */
@ -267,6 +269,9 @@ static const IDirect3DVertexBuffer9Vtbl d3d9_vertexbuffer_vtbl =
static void STDMETHODCALLTYPE d3d9_vertexbuffer_wined3d_object_destroyed(void *parent)
{
struct d3d9_vertexbuffer *buffer = parent;
if (buffer->draw_buffer)
wined3d_buffer_decref(buffer->wined3d_buffer);
d3d9_resource_cleanup(&buffer->resource);
heap_free(buffer);
}
@ -384,9 +389,10 @@ static ULONG WINAPI d3d9_indexbuffer_AddRef(IDirect3DIndexBuffer9 *iface)
{
IDirect3DDevice9Ex_AddRef(buffer->parent_device);
wined3d_mutex_lock();
wined3d_buffer_incref(buffer->wined3d_buffer);
if (buffer->draw_buffer)
wined3d_buffer_incref(buffer->draw_buffer);
else
wined3d_buffer_incref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
}
@ -406,9 +412,10 @@ static ULONG WINAPI d3d9_indexbuffer_Release(IDirect3DIndexBuffer9 *iface)
IDirect3DDevice9Ex *device = buffer->parent_device;
wined3d_mutex_lock();
wined3d_buffer_decref(buffer->wined3d_buffer);
if (draw_buffer)
wined3d_buffer_decref(draw_buffer);
else
wined3d_buffer_decref(buffer->wined3d_buffer);
wined3d_mutex_unlock();
/* Release the device last, as it may cause the device to be destroyed. */
@ -591,6 +598,9 @@ static const IDirect3DIndexBuffer9Vtbl d3d9_indexbuffer_vtbl =
static void STDMETHODCALLTYPE d3d9_indexbuffer_wined3d_object_destroyed(void *parent)
{
struct d3d9_indexbuffer *buffer = parent;
if (buffer->draw_buffer)
wined3d_buffer_decref(buffer->wined3d_buffer);
d3d9_resource_cleanup(&buffer->resource);
heap_free(buffer);
}

View File

@ -1757,6 +1757,9 @@ static HRESULT WINAPI d3d9_device_ColorFill(IDirect3DDevice9Ex *iface,
TRACE("iface %p, surface %p, rect %p, color 0x%08x.\n", iface, surface, rect, color);
if (!surface)
return D3DERR_INVALIDCALL;
wined3d_mutex_lock();
if (FAILED(wined3d_texture_get_sub_resource_desc(surface_impl->wined3d_texture,
@ -2890,9 +2893,14 @@ static HRESULT WINAPI d3d9_device_DrawPrimitiveUP(IDirect3DDevice9Ex *iface,
TRACE("iface %p, primitive_type %#x, primitive_count %u, data %p, stride %u.\n",
iface, primitive_type, primitive_count, data, stride);
if (!stride)
{
WARN("stride is 0, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL;
}
if (!primitive_count)
{
WARN("primitive_count is 0, returning D3D_OK\n");
WARN("primitive_count is 0, returning D3D_OK.\n");
return D3D_OK;
}
@ -3001,6 +3009,11 @@ static HRESULT WINAPI d3d9_device_DrawIndexedPrimitiveUP(IDirect3DDevice9Ex *ifa
iface, primitive_type, min_vertex_idx, vertex_count, primitive_count,
index_data, index_format, vertex_data, vertex_stride);
if (!vertex_stride)
{
WARN("vertex_stride is 0, returning D3DERR_INVALIDCALL.\n");
return D3DERR_INVALIDCALL;
}
if (!primitive_count)
{
WARN("primitive_count is 0, returning D3D_OK.\n");

View File

@ -254,10 +254,11 @@ static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter,
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
iface, adapter, device_type, adapter_format, usage, resource_type, format);
if (!adapter_format)
if (adapter_format != D3DFMT_X8R8G8B8 && adapter_format != D3DFMT_R5G6B5
&& adapter_format != D3DFMT_X1R5G5B5)
{
WARN("Invalid adapter format.\n");
return D3DERR_INVALIDCALL;
return adapter_format ? D3DERR_NOTAVAILABLE : D3DERR_INVALIDCALL;
}
bind_flags = wined3d_bind_flags_from_d3d9_usage(usage);

View File

@ -3078,6 +3078,7 @@ static void test_wndproc(void)
"Expected IsIconic %u, got %u, i=%u.\n", tests[i].iconic, IsIconic(focus_window), i);
ShowWindow(focus_window, SW_SHOWNOACTIVATE);
flush_events();
ShowWindow(focus_window, SW_SHOWMINNOACTIVE);
flush_events();

View File

@ -2874,6 +2874,7 @@ static void test_draw_primitive(void)
IDirect3DVertexBuffer9 *vertex_buffer, *current_vb;
IDirect3DIndexBuffer9 *index_buffer, *current_ib;
IDirect3DVertexDeclaration9 *vertex_declaration;
IDirect3DStateBlock9 *stateblock;
IDirect3DDevice9 *device;
UINT offset, stride;
IDirect3D9 *d3d9;
@ -2975,6 +2976,11 @@ static void test_draw_primitive(void)
hr = IDirect3DDevice9_DrawPrimitive(device, D3DPT_TRIANGLELIST, 0, 2);
ok(SUCCEEDED(hr), "DrawPrimitive failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, quad, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLELIST, 2, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr);
@ -2998,16 +3004,88 @@ static void test_draw_primitive(void)
0 /* MinIndex */, 4 /* NumVerts */, 0 /* StartIndex */, 2 /*PrimCount */);
ok(SUCCEEDED(hr), "DrawIndexedPrimitive failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetIndices(device, &current_ib);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(current_ib == index_buffer, "Unexpected index buffer %p.\n", current_ib);
IDirect3DIndexBuffer9_Release(current_ib);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 0,
indices, D3DFMT_INDEX16, quad, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetIndices(device, &current_ib);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(!current_ib, "Unexpected index buffer %p.\n", current_ib);
/* Resetting of stream source and index buffer is not recorded in stateblocks. */
hr = IDirect3DDevice9_SetStreamSource(device, 0, vertex_buffer, 0, sizeof(*quad));
ok(SUCCEEDED(hr), "SetStreamSource failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetIndices(device, index_buffer);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginStateBlock(device);
ok(SUCCEEDED(hr), "BeginStateBlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0, 4, 2,
indices, D3DFMT_INDEX16, quad, sizeof(*quad));
ok(SUCCEEDED(hr), "DrawIndexedPrimitiveUP failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_EndStateBlock(device, &stateblock);
ok(SUCCEEDED(hr), "BeginStateBlock failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetStreamSource(device, 0, &current_vb, &offset, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
todo_wine
ok(!current_vb, "Unexpected vb %p.\n", current_vb);
ok(!offset, "Unexpected offset %u.\n", offset);
todo_wine
ok(!stride, "Unexpected stride %u.\n", stride);
if (current_vb)
IDirect3DVertexBuffer9_Release(current_vb);
hr = IDirect3DDevice9_GetIndices(device, &current_ib);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
todo_wine
ok(!current_ib, "Unexpected index buffer %p.\n", current_ib);
if (current_ib)
IDirect3DIndexBuffer9_Release(current_ib);
hr = IDirect3DStateBlock9_Capture(stateblock);
ok(SUCCEEDED(hr), "Capture failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetStreamSource(device, 0, vertex_buffer, 0, sizeof(*quad));
ok(SUCCEEDED(hr), "SetStreamSource failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetIndices(device, index_buffer);
ok(SUCCEEDED(hr), "SetIndices failed, hr %#x.\n", hr);
hr = IDirect3DStateBlock9_Apply(stateblock);
ok(SUCCEEDED(hr), "Capture failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_GetStreamSource(device, 0, &current_vb, &offset, &stride);
ok(SUCCEEDED(hr), "GetStreamSource failed, hr %#x.\n", hr);
ok(current_vb == vertex_buffer, "Unexpected vb %p.\n", current_vb);
ok(!offset, "Unexpected offset %u.\n", offset);
ok(stride == sizeof(*quad), "Unexpected stride %u.\n", stride);
IDirect3DVertexBuffer9_Release(current_vb);
hr = IDirect3DDevice9_GetIndices(device, &current_ib);
ok(SUCCEEDED(hr), "GetIndices failed, hr %#x.\n", hr);
ok(current_ib == index_buffer, "Unexpected index buffer %p.\n", current_ib);
IDirect3DIndexBuffer9_Release(current_ib);
hr = IDirect3DDevice9_EndScene(device);
ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed, hr %#x.\n", hr);
IDirect3DStateBlock9_Release(stateblock);
IDirect3DVertexBuffer9_Release(vertex_buffer);
IDirect3DIndexBuffer9_Release(index_buffer);
IDirect3DVertexDeclaration9_Release(vertex_declaration);

View File

@ -1529,6 +1529,9 @@ static void color_fill_test(void)
goto done;
}
hr = IDirect3DDevice9_ColorFill(device, NULL, NULL, 0);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
/* Test ColorFill on a the backbuffer (should pass) */
hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &surface);
ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr);
@ -8883,11 +8886,11 @@ done:
static void srgbtexture_test(void)
{
/* Fill a texture with 0x7f (~ .5), and then turn on the D3DSAMP_SRGBTEXTURE
* texture stage state to render a quad using that texture. The resulting
* color components should be 0x36 (~ 0.21), per this formula:
/* The result of sRGB to linear conversion for value 0x7f (~ .5) used on
* texture mip level 0 should be 0x36 (~ 0.21), per this formula:
* linear_color = ((srgb_color + 0.055) / 1.055) ^ 2.4
* This is true where srgb_color > 0.04045. */
* This is true where srgb_color > 0.04045.
* For the value of 0x3f used on mip level 1 the result should be 0x0d (~0.05). */
struct IDirect3DTexture9 *texture;
struct IDirect3DSurface9 *surface;
IDirect3DDevice9 *device;
@ -8895,6 +8898,7 @@ static void srgbtexture_test(void)
D3DCOLOR color;
ULONG refcount;
HWND window;
DWORD value;
HRESULT hr;
static const float quad[] =
@ -8922,38 +8926,170 @@ static void srgbtexture_test(void)
goto done;
}
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL);
ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr);
hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 2, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface);
ok(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
fill_surface(surface, 0xff7f7f7f, 0);
IDirect3DSurface9_Release(surface);
hr = IDirect3DTexture9_GetSurfaceLevel(texture, 1, &surface);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
fill_surface(surface, 0xff3f3f3f, 0);
IDirect3DSurface9_Release(surface);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *) texture);
ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9 *)texture);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
/* AMD uses the LSB of the D3DSAMP_SRGBTEXTURE value.
* NVIDIA ignores any values other than 0 and 1, leaving the previous
* D3DSAMP_SRGBTEXTURE state.
* Intel, WARP treat the value as boolean. */
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 0x7e41882a);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 0x7e41882a, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x007f7f7f, 1) || broken(color_match(color, 0x00363636, 1)),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, TRUE);
ok(SUCCEEDED(hr), "Failed to set sampler state, hr %#x.\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1);
ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 100);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 100, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x00363636, 1), "sRGB quad has color 0x%08x, expected 0x00363636.\n", color);
ok(color_match(color, 0x007f7f7f, 1) || broken(color_match(color, 0x00363636, 1)),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 2);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 2, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x007f7f7f, 1) || broken(color_match(color, 0x00363636, 1)),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 3);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 3, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x007f7f7f, 1) || color_match(color, 0x00363636, 1),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, TRUE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == TRUE, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x00363636, 1), "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
/* Set the other state to verify that the sampler just inherits old
* D3DSAMP_SRGBTEXTURE but * the old sampler is not preserved entirely on
* NVIDIA. */
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 0x7e41882a);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 0x7e41882a, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_POINT);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x000d0d0d, 1) || color_match(color, 0x003f3f3f, 1),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 0, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x003f3f3f, 1), "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, 0x7e41882a);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_GetSamplerState(device, 0, D3DSAMP_SRGBTEXTURE, &value);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(value == 0x7e41882a, "Got unexpected value %#x.\n", value);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, 5 * sizeof(float));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 320, 240);
ok(color_match(color, 0x003f3f3f, 1) || broken(color_match(color, 0x000d0d0d, 1)),
"Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DTexture9_Release(texture);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
@ -10754,33 +10890,37 @@ static void stencil_cull_test(void)
D3DCAPS9 caps;
HWND window;
HRESULT hr;
static const float quad1[] =
static const struct
{
-1.0, -1.0, 0.1,
0.0, -1.0, 0.1,
-1.0, 0.0, 0.1,
0.0, 0.0, 0.1,
};
static const float quad2[] =
struct vec3 position;
}
quad1[] =
{
0.0, -1.0, 0.1,
1.0, -1.0, 0.1,
0.0, 0.0, 0.1,
1.0, 0.0, 0.1,
};
static const float quad3[] =
{{-1.0f, -1.0f, 0.1f}},
{{ 0.0f, -1.0f, 0.1f}},
{{-1.0f, 0.0f, 0.1f}},
{{ 0.0f, 0.0f, 0.1f}},
},
quad2[] =
{
0.0, 0.0, 0.1,
1.0, 0.0, 0.1,
0.0, 1.0, 0.1,
1.0, 1.0, 0.1,
};
static const float quad4[] =
{{ 0.0f, -1.0f, 0.1f}},
{{ 1.0f, -1.0f, 0.1f}},
{{ 0.0f, 0.0f, 0.1f}},
{{ 1.0f, 0.0f, 0.1f}},
},
quad3[] =
{
-1.0, 0.0, 0.1,
0.0, 0.0, 0.1,
-1.0, 1.0, 0.1,
0.0, 1.0, 0.1,
{{ 0.0f, 0.0f, 0.1f}},
{{ 1.0f, 0.0f, 0.1f}},
{{ 0.0f, 1.0f, 0.1f}},
{{ 1.0f, 1.0f, 0.1f}},
},
quad4[] =
{
{{-1.0f, 0.0f, 0.1f}},
{{ 0.0f, 0.0f, 0.1f}},
{{-1.0f, 1.0f, 0.1f}},
{{ 0.0f, 1.0f, 0.1f}},
};
struct
{
@ -10849,70 +10989,73 @@ static void stencil_cull_test(void)
/* First pass: Fill the stencil buffer with some values... */
hr = IDirect3DDevice9_BeginScene(device);
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CW);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_cw, D3DFMT_INDEX16, quad1, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_ccw, D3DFMT_INDEX16, quad1, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_cw, D3DFMT_INDEX16, quad1, sizeof(*quad1));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_ccw, D3DFMT_INDEX16, quad1, sizeof(*quad1));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TWOSIDEDSTENCILMODE, TRUE);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_cw, D3DFMT_INDEX16, quad2, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_ccw, D3DFMT_INDEX16, quad2, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_cw, D3DFMT_INDEX16, quad2, sizeof(*quad2));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_ccw, D3DFMT_INDEX16, quad2, sizeof(*quad2));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CW);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_cw, D3DFMT_INDEX16, quad3, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_ccw, D3DFMT_INDEX16, quad3, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_cw, D3DFMT_INDEX16, quad3, sizeof(*quad3));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_ccw, D3DFMT_INDEX16, quad3, sizeof(*quad3));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CCW);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_cw, D3DFMT_INDEX16, quad4, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST, 0 /* MinIndex */, 4 /* NumVerts */,
1 /* PrimCount */, indices_ccw, D3DFMT_INDEX16, quad4, sizeof(float) * 3);
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_cw, D3DFMT_INDEX16, quad4, sizeof(*quad4));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_ccw, D3DFMT_INDEX16, quad4, sizeof(*quad4));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILZFAIL, D3DSTENCILOP_KEEP);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILPASS, D3DSTENCILOP_KEEP);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFAIL, D3DSTENCILOP_KEEP);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TWOSIDEDSTENCILMODE, FALSE);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_NONE);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFUNC, D3DCMP_EQUAL);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILMASK, 0x000000ff);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
/* 2nd pass: Make the stencil values visible */
hr = IDirect3DDevice9_BeginScene(device);
ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
for (i = 0; i < 16; ++i)
{
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, i);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, 0x0000ff00 | i);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
painter[0].diffuse = (i * 16); /* Creates shades of blue */
@ -10920,13 +11063,13 @@ static void stencil_cull_test(void)
painter[2].diffuse = (i * 16);
painter[3].diffuse = (i * 16);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, painter, sizeof(painter[0]));
ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
}
hr = IDirect3DDevice9_EndScene(device);
ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, FALSE);
ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 160, 420);
ok(color == 0x00000030, "CCW triangle, twoside FALSE, cull cw, replace, has color 0x%08x, expected 0x00000030\n", color);
@ -10948,8 +11091,62 @@ static void stencil_cull_test(void)
color = getPixelColor(device, 480, 60);
ok(color == 0x00000080, "CW triangle, twoside TRUE, cull cw, culled, has color 0x%08x, expected 0x00000080\n", color);
/* Test for reference truncation. */
/* 1st pass: set stencil. */
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_STENCIL, 0x00ff0000, 0.0f, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFAIL, D3DSTENCILOP_REPLACE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILZFAIL, D3DSTENCILOP_REPLACE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILPASS, D3DSTENCILOP_REPLACE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, 0x1cc);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILMASK, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFUNC, D3DCMP_ALWAYS);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, TRUE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CULLMODE, D3DCULL_CW);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitiveUP(device, D3DPT_TRIANGLELIST,
0, 4, 1, indices_cw, D3DFMT_INDEX16, quad1, sizeof(*quad1));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
/* 2nd pass: draw image. */
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x00ff0000, 0.0f, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILREF, 0xdb);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILMASK, 0x0f);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILFUNC, D3DCMP_LESS);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, painter, sizeof(painter[0]));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 280, 360);
ok(color == 0x000000f0, "Got unexpected colour 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
cleanup:
refcount = IDirect3DDevice9_Release(device);
@ -24533,6 +24730,145 @@ static void test_sysmem_draw(void)
DestroyWindow(window);
}
static void test_draw_mapped_buffer(void)
{
IDirect3DVertexBuffer9 *vb;
IDirect3DIndexBuffer9 *ib;
IDirect3DDevice9 *device;
IDirect3D9 *d3d;
unsigned int i;
D3DCOLOR color;
ULONG refcount;
BOOL test_pass;
HWND window;
HRESULT hr;
void *data;
static const short indices[] = {0, 1, 2};
static const struct
{
struct vec3 position;
DWORD diffuse;
}
quad[] =
{
{{-1.0f, -1.0f, 0.1f}, 0xffff0000},
{{-1.0f, 1.0f, 0.1f}, 0xffff0000},
{{ 1.0f, 1.0f, 0.1f}, 0xffff0000},
};
static const struct
{
D3DPOOL pool;
DWORD usage;
BOOL ignore_wine_result;
}
tests[] =
{
{D3DPOOL_DEFAULT, D3DUSAGE_DYNAMIC, TRUE},
{D3DPOOL_MANAGED, 0},
{D3DPOOL_SYSTEMMEM, 0},
};
window = create_window();
ok(!!window, "Failed to create a window.\n");
d3d = Direct3DCreate9(D3D_SDK_VERSION);
ok(!!d3d, "Failed to create a D3D object.\n");
if (!(device = create_device(d3d, window, window, TRUE)))
{
skip("Failed to create a D3D device, skipping tests.\n");
IDirect3D9_Release(d3d);
DestroyWindow(window);
return;
}
hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_CreateIndexBuffer(device, sizeof(indices), 0,
D3DFMT_INDEX16, D3DPOOL_DEFAULT, &ib, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DIndexBuffer9_Lock(ib, 0, sizeof(indices), &data, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
memcpy(data, indices, sizeof(indices));
hr = IDirect3DDevice9_SetIndices(device, ib);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad), tests[i].usage,
D3DFVF_XYZ | D3DFVF_DIFFUSE, tests[i].pool, &vb, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), &data, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
memcpy(data, quad, sizeof(quad));
hr = IDirect3DDevice9_SetStreamSource(device, 0, vb, 0, sizeof(quad[0]));
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 0, ARRAY_SIZE(quad), 0, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x, test %u.\n", hr, i);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 160, 120);
ok(color_match(color, 0x00ff0000, 1), "Got unexpected color 0x%08x, test %u.\n", color, i);
color = getPixelColor(device, 480, 360);
ok(color_match(color, 0x000000ff, 1), "Got unexpected color 0x%08x, test %u.\n", color, i);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DVertexBuffer9_Unlock(vb);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
/* One more time now when buffer object in wined3d is already created. */
hr = IDirect3DVertexBuffer9_Lock(vb, 0, sizeof(quad), &data, D3DLOCK_DISCARD);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
memcpy(data, quad, sizeof(quad));
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_BeginScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST, 0, 0, ARRAY_SIZE(quad), 0, 1);
ok(hr == D3D_OK, "Got unexpected hr %#x, test %u.\n", hr, i);
hr = IDirect3DDevice9_EndScene(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
color = getPixelColor(device, 160, 120);
test_pass = color_match(color, 0x00ff0000, 1);
todo_wine_if(tests[i].ignore_wine_result && !test_pass)
ok(test_pass, "Got unexpected color 0x%08x, test %u.\n", color, i);
color = getPixelColor(device, 480, 360);
ok(color_match(color, 0x000000ff, 1), "Got unexpected color 0x%08x, test %u.\n", color, i);
hr = IDirect3DVertexBuffer9_Unlock(vb);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DVertexBuffer9_Release(vb);
}
hr = IDirect3DIndexBuffer9_Unlock(ib);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DIndexBuffer9_Release(ib);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
IDirect3D9_Release(d3d);
DestroyWindow(window);
}
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER9 identifier;
@ -24673,4 +25009,5 @@ START_TEST(visual)
test_map_synchronisation();
test_color_vertex();
test_sysmem_draw();
test_draw_mapped_buffer();
}

View File

@ -903,7 +903,7 @@ static const struct hlsl_ir_function_decl *get_overloaded_func(struct wine_rb_tr
%}
%locations
%error-verbose
%define parse.error verbose
%expect 1
%union

View File

@ -6342,10 +6342,12 @@ static void test_viewport_clear1(void)
ret_color = IDirect3DRMFrame_GetSceneBackground(camera1);
ok(ret_color == 0xff00ff00, "Expected scene color returned == 0xff00ff00, got %#x.\n", ret_color);
CHECK_REFCOUNT(frame1, 1);
hr = IDirect3DRMViewport_Clear(viewport1);
ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr);
ret_color = get_surface_color(surface, 320, 240);
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color);
CHECK_REFCOUNT(frame1, 1);
hr = IDirect3DRMFrame_SetSceneBackgroundRGB(frame1, 0.0f, 0.0f, 1.0f);
ok(SUCCEEDED(hr), "Cannot set scene background RGB (hr = %#x)\n", hr);
@ -6545,10 +6547,12 @@ static void test_viewport_clear2(void)
ret_color = IDirect3DRMFrame3_GetSceneBackground(camera3);
ok(ret_color == 0xff00ff00, "Expected scene color returned == 0xff00ff00, got %#x.\n", ret_color);
CHECK_REFCOUNT(frame3, 1);
hr = IDirect3DRMViewport2_Clear(viewport2, D3DRMCLEAR_ALL);
ok(SUCCEEDED(hr), "Cannot clear viewport (hr = %#x).\n", hr);
ret_color = get_surface_color(surface, 320, 240);
ok(compare_color(ret_color, 0x00ffffff, 1), "Got unexpected color 0x%08x.\n", ret_color);
CHECK_REFCOUNT(frame3, 1);
hr = IDirect3DRMViewport2_GetDirect3DViewport(viewport2, &d3d_viewport);
ok(SUCCEEDED(hr), "Cannot get IDirect3DViewport interface (hr = %#x).\n", hr);

View File

@ -53,6 +53,7 @@ static HRESULT d3drm_update_background_material(struct d3drm_viewport *viewport)
if (FAILED(hr = IDirect3DRMFrame_GetScene(viewport->camera, &root_frame)))
return hr;
color = IDirect3DRMFrame_GetSceneBackground(root_frame);
IDirect3DRMFrame_Release(root_frame);
memset(&mat, 0, sizeof(mat));
mat.dwSize = sizeof(mat);

View File

@ -39,6 +39,6 @@
@ stub D3DX11PreprocessShaderFromResourceA
@ stub D3DX11PreprocessShaderFromResourceW
@ stub D3DX11SHProjectCubeMap
@ stub D3DX11SaveTextureToFileA
@ stub D3DX11SaveTextureToFileW
@ stdcall D3DX11SaveTextureToFileA(ptr ptr long str)
@ stdcall D3DX11SaveTextureToFileW(ptr ptr long wstr)
@ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long)

View File

@ -17,7 +17,7 @@
@ stub D3DX11CreateAsyncTextureProcessor
@ stub D3DX11CreateShaderResourceViewFromFileA
@ stub D3DX11CreateShaderResourceViewFromFileW
@ stub D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr)
@ stdcall D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr)
@ stub D3DX11CreateShaderResourceViewFromResourceA
@ stub D3DX11CreateShaderResourceViewFromResourceW
@ stdcall D3DX11CreateTextureFromFileA(ptr str ptr ptr ptr ptr)
@ -39,6 +39,6 @@
@ stub D3DX11PreprocessShaderFromResourceA
@ stub D3DX11PreprocessShaderFromResourceW
@ stub D3DX11SHProjectCubeMap
@ stub D3DX11SaveTextureToFileA
@ stub D3DX11SaveTextureToFileW
@ stdcall D3DX11SaveTextureToFileA(ptr ptr long str)
@ stdcall D3DX11SaveTextureToFileW(ptr ptr long wstr)
@ stdcall D3DX11SaveTextureToMemory(ptr ptr long ptr long)

View File

@ -65,6 +65,24 @@ HRESULT WINAPI D3DX11CreateTextureFromMemory(ID3D11Device *device, const void *d
return E_NOTIMPL;
}
HRESULT WINAPI D3DX11SaveTextureToFileW(ID3D11DeviceContext *context, ID3D11Resource *texture,
D3DX11_IMAGE_FILE_FORMAT format, const WCHAR *filename)
{
FIXME("context %p, texture %p, format %u, filename %s stub!\n",
context, texture, format, debugstr_w(filename));
return E_NOTIMPL;
}
HRESULT WINAPI D3DX11SaveTextureToFileA(ID3D11DeviceContext *context, ID3D11Resource *texture,
D3DX11_IMAGE_FILE_FORMAT format, const char *filename)
{
FIXME("context %p, texture %p, format %u, filename %s stub!\n",
context, texture, format, debugstr_a(filename));
return E_NOTIMPL;
}
HRESULT WINAPI D3DX11SaveTextureToMemory(ID3D11DeviceContext *context, ID3D11Resource *texture,
D3DX11_IMAGE_FILE_FORMAT format, ID3D10Blob **buffer, UINT flags)
{

View File

@ -121,6 +121,10 @@ HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *d
const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN;
HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data,
const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN;
HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock,
IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN;
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock,
IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN;
unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN;
float float_16_to_32(const unsigned short in) DECLSPEC_HIDDEN;

View File

@ -530,6 +530,7 @@ static void free_sampler(struct d3dx_sampler *sampler)
free_state(&sampler->states[i]);
}
HeapFree(GetProcessHeap(), 0, sampler->states);
HeapFree(GetProcessHeap(), 0, sampler);
}
static void d3dx_pool_release_shared_parameter(struct d3dx_top_level_parameter *param);
@ -562,7 +563,7 @@ static void free_parameter_data(struct d3dx_parameter *param, BOOL child)
case D3DXPT_SAMPLER3D:
case D3DXPT_SAMPLERCUBE:
free_sampler((struct d3dx_sampler *)param->data);
break;
return;
default:
FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type));
@ -592,6 +593,9 @@ static void free_parameter(struct d3dx_parameter *param, BOOL element, BOOL chil
HeapFree(GetProcessHeap(), 0, param->members);
}
if (param->full_name)
heap_free(param->full_name);
free_parameter_data(param, child);
/* only the parent has to release name and semantic */

View File

@ -744,157 +744,119 @@ D3DXMATRIX* WINAPI D3DXMatrixShadow(D3DXMATRIX *pout, const D3DXVECTOR4 *plight,
return pout;
}
D3DXMATRIX* WINAPI D3DXMatrixTransformation(D3DXMATRIX *pout, const D3DXVECTOR3 *pscalingcenter, const D3DXQUATERNION *pscalingrotation, const D3DXVECTOR3 *pscaling, const D3DXVECTOR3 *protationcenter, const D3DXQUATERNION *protation, const D3DXVECTOR3 *ptranslation)
D3DXMATRIX * WINAPI D3DXMatrixTransformation(D3DXMATRIX *out, const D3DXVECTOR3 *scaling_center,
const D3DXQUATERNION *scaling_rotation, const D3DXVECTOR3 *scaling,
const D3DXVECTOR3 *rotation_center, const D3DXQUATERNION *rotation,
const D3DXVECTOR3 *translation)
{
D3DXMATRIX m1, m2, m3, m4, m5, m6, m7;
D3DXQUATERNION prc;
D3DXVECTOR3 psc, pt;
static const D3DXVECTOR3 zero_vector;
D3DXMATRIX m1, msr1, ms, msr, msc, mrc1, mr, mrc, mt;
D3DXVECTOR3 sc, rc;
D3DXQUATERNION q;
TRACE("pout %p, pscalingcenter %p, pscalingrotation %p, pscaling %p, protationcentr %p, protation %p, ptranslation %p\n",
pout, pscalingcenter, pscalingrotation, pscaling, protationcenter, protation, ptranslation);
TRACE("out %p, scaling_center %p, scaling_rotation %p, scaling %p, rotation_center %p,"
" rotation %p, translation %p.\n",
out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation);
if ( !pscalingcenter )
if (scaling)
{
psc.x = 0.0f;
psc.y = 0.0f;
psc.z = 0.0f;
sc = scaling_center ? *scaling_center : zero_vector;
D3DXMatrixTranslation(&m1, -sc.x, -sc.y, -sc.z);
if (scaling_rotation)
{
q.x = -scaling_rotation->x;
q.y = -scaling_rotation->y;
q.z = -scaling_rotation->z;
q.w = scaling_rotation->w;
D3DXMatrixRotationQuaternion(&msr1, &q);
D3DXMatrixMultiply(&m1, &m1, &msr1);
}
D3DXMatrixScaling(&ms, scaling->x, scaling->y, scaling->z);
D3DXMatrixMultiply(&m1, &m1, &ms);
if (scaling_rotation)
{
D3DXMatrixRotationQuaternion(&msr, scaling_rotation);
D3DXMatrixMultiply(&m1, &m1, &msr);
}
D3DXMatrixTranslation(&msc, sc.x, sc.y, sc.z);
D3DXMatrixMultiply(&m1, &m1, &msc);
}
else
{
psc.x = pscalingcenter->x;
psc.y = pscalingcenter->y;
psc.z = pscalingcenter->z;
D3DXMatrixIdentity(&m1);
}
if ( !protationcenter )
if (rotation)
{
prc.x = 0.0f;
prc.y = 0.0f;
prc.z = 0.0f;
rc = rotation_center ? *rotation_center : zero_vector;
D3DXMatrixTranslation(&mrc1, -rc.x, -rc.y, -rc.z);
D3DXMatrixMultiply(&m1, &m1, &mrc1);
D3DXMatrixRotationQuaternion(&mr, rotation);
D3DXMatrixMultiply(&m1, &m1, &mr);
D3DXMatrixTranslation(&mrc, rc.x, rc.y, rc.z);
D3DXMatrixMultiply(&m1, &m1, &mrc);
}
if (translation)
{
D3DXMatrixTranslation(&mt, translation->x, translation->y, translation->z);
D3DXMatrixMultiply(out, &m1, &mt);
}
else
{
prc.x = protationcenter->x;
prc.y = protationcenter->y;
prc.z = protationcenter->z;
*out = m1;
}
if ( !ptranslation )
{
pt.x = 0.0f;
pt.y = 0.0f;
pt.z = 0.0f;
}
else
{
pt.x = ptranslation->x;
pt.y = ptranslation->y;
pt.z = ptranslation->z;
}
D3DXMatrixTranslation(&m1, -psc.x, -psc.y, -psc.z);
if ( !pscalingrotation )
{
D3DXMatrixIdentity(&m2);
D3DXMatrixIdentity(&m4);
}
else
{
D3DXMatrixRotationQuaternion(&m4, pscalingrotation);
D3DXMatrixInverse(&m2, NULL, &m4);
}
if ( !pscaling ) D3DXMatrixIdentity(&m3);
else D3DXMatrixScaling(&m3, pscaling->x, pscaling->y, pscaling->z);
if ( !protation ) D3DXMatrixIdentity(&m6);
else D3DXMatrixRotationQuaternion(&m6, protation);
D3DXMatrixTranslation(&m5, psc.x - prc.x, psc.y - prc.y, psc.z - prc.z);
D3DXMatrixTranslation(&m7, prc.x + pt.x, prc.y + pt.y, prc.z + pt.z);
D3DXMatrixMultiply(&m1, &m1, &m2);
D3DXMatrixMultiply(&m1, &m1, &m3);
D3DXMatrixMultiply(&m1, &m1, &m4);
D3DXMatrixMultiply(&m1, &m1, &m5);
D3DXMatrixMultiply(&m1, &m1, &m6);
D3DXMatrixMultiply(pout, &m1, &m7);
return pout;
return out;
}
D3DXMATRIX* WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *pout, const D3DXVECTOR2 *pscalingcenter, FLOAT scalingrotation, const D3DXVECTOR2 *pscaling, const D3DXVECTOR2 *protationcenter, FLOAT rotation, const D3DXVECTOR2 *ptranslation)
static void vec3_from_vec2(D3DXVECTOR3 *v3, const D3DXVECTOR2 *v2)
{
D3DXQUATERNION rot, sca_rot;
D3DXVECTOR3 rot_center, sca, sca_center, trans;
if (!v2)
return;
TRACE("pout %p, pscalingcenter %p, scalingrotation %f, pscaling %p, protztioncenter %p, rotation %f, ptranslation %p\n",
pout, pscalingcenter, scalingrotation, pscaling, protationcenter, rotation, ptranslation);
v3->x = v2->x;
v3->y = v2->y;
v3->z = 0.0f;
}
if ( pscalingcenter )
D3DXMATRIX * WINAPI D3DXMatrixTransformation2D(D3DXMATRIX *out, const D3DXVECTOR2 *scaling_center,
float scaling_rotation, const D3DXVECTOR2 *scaling, const D3DXVECTOR2 *rotation_center,
float rotation, const D3DXVECTOR2 *translation)
{
D3DXVECTOR3 r_c, s, s_c, t;
D3DXQUATERNION r, s_r;
TRACE("out %p, scaling_center %p, scaling_rotation %.8e, scaling %p, rotation_center %p, "
"rotation %.8e, translation %p.\n",
out, scaling_center, scaling_rotation, scaling, rotation_center, rotation, translation);
vec3_from_vec2(&s_c, scaling_center);
vec3_from_vec2(&s, scaling);
if (scaling)
s.z = 1.0f;
vec3_from_vec2(&r_c, rotation_center);
vec3_from_vec2(&t, translation);
if (rotation)
{
sca_center.x=pscalingcenter->x;
sca_center.y=pscalingcenter->y;
sca_center.z=0.0f;
}
else
{
sca_center.x=0.0f;
sca_center.y=0.0f;
sca_center.z=0.0f;
r.w = cosf(rotation / 2.0f);
r.x = 0.0f;
r.y = 0.0f;
r.z = sinf(rotation / 2.0f);
}
if ( pscaling )
if (scaling_rotation)
{
sca.x=pscaling->x;
sca.y=pscaling->y;
sca.z=1.0f;
}
else
{
sca.x=1.0f;
sca.y=1.0f;
sca.z=1.0f;
s_r.w = cosf(scaling_rotation / 2.0f);
s_r.x = 0.0f;
s_r.y = 0.0f;
s_r.z = sinf(scaling_rotation / 2.0f);
}
if ( protationcenter )
{
rot_center.x=protationcenter->x;
rot_center.y=protationcenter->y;
rot_center.z=0.0f;
}
else
{
rot_center.x=0.0f;
rot_center.y=0.0f;
rot_center.z=0.0f;
}
if ( ptranslation )
{
trans.x=ptranslation->x;
trans.y=ptranslation->y;
trans.z=0.0f;
}
else
{
trans.x=0.0f;
trans.y=0.0f;
trans.z=0.0f;
}
rot.w=cosf(rotation/2.0f);
rot.x=0.0f;
rot.y=0.0f;
rot.z=sinf(rotation/2.0f);
sca_rot.w=cosf(scalingrotation/2.0f);
sca_rot.x=0.0f;
sca_rot.y=0.0f;
sca_rot.z=sinf(scalingrotation/2.0f);
D3DXMatrixTransformation(pout, &sca_center, &sca_rot, &sca, &rot_center, &rot, &trans);
return pout;
return D3DXMatrixTransformation(out, scaling_center ? &s_c : NULL,
scaling_rotation ? &s_r : NULL, scaling ? &s : NULL, rotation_center ? &r_c: NULL,
rotation ? &r : NULL, translation ? &t : NULL);
}
D3DXMATRIX* WINAPI D3DXMatrixTranslation(D3DXMATRIX *pout, FLOAT x, FLOAT y, FLOAT z)

View File

@ -3332,6 +3332,13 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data,
goto end;
}
if ((provide_flags & PROVIDE_SKININFO) && !mesh_data->skin_info)
{
if (FAILED(hr = D3DXCreateSkinInfoFVF(mesh_data->num_vertices, mesh_data->fvf,
mesh_data->nb_bones, &mesh_data->skin_info)))
goto end;
}
hr = D3D_OK;
end:

View File

@ -426,6 +426,9 @@ HRESULT WINAPI D3DXCompileShader(const char *data, UINT length, const D3DXMACRO
debugstr_a(data), length, defines, include, debugstr_a(function), debugstr_a(profile),
flags, shader, error_msgs, constant_table);
if (D3DX_SDK_VERSION <= 36)
flags |= D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY;
hr = D3DCompile(data, length, NULL, (D3D_SHADER_MACRO *)defines, (ID3DInclude *)include,
function, profile, flags, 0, (ID3DBlob **)shader, (ID3DBlob **)error_msgs);
@ -506,6 +509,9 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(const WCHAR *filename, const D3DXMACRO
return D3DXERR_INVALIDDATA;
}
if (D3DX_SDK_VERSION <= 36)
flags |= D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY;
hr = D3DCompile(buffer, len, filename_a, (const D3D_SHADER_MACRO *)defines,
(ID3DInclude *)include, entrypoint, profile, flags, 0,
(ID3DBlob **)shader, (ID3DBlob **)error_messages);

View File

@ -199,6 +199,100 @@ static const struct {
{ 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000, D3DFMT_X8B8G8R8 },
};
HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock,
IDirect3DSurface9 **temp_surface, BOOL write)
{
unsigned int width, height;
IDirect3DDevice9 *device;
D3DSURFACE_DESC desc;
DWORD lock_flag;
HRESULT hr;
lock_flag = write ? D3DLOCK_DISCARD : D3DLOCK_READONLY;
*temp_surface = NULL;
if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, lock_flag)))
{
IDirect3DSurface9_GetDevice(surface, &device);
IDirect3DSurface9_GetDesc(surface, &desc);
if (surface_rect)
{
width = surface_rect->right - surface_rect->left;
height = surface_rect->bottom - surface_rect->top;
}
else
{
width = desc.Width;
height = desc.Height;
}
hr = write ? IDirect3DDevice9_CreateOffscreenPlainSurface(device, width, height,
desc.Format, D3DPOOL_SYSTEMMEM, temp_surface, NULL)
: IDirect3DDevice9_CreateRenderTarget(device, width, height,
desc.Format, D3DMULTISAMPLE_NONE, 0, TRUE, temp_surface, NULL);
if (FAILED(hr))
{
WARN("Failed to create temporary surface, surface %p, format %#x,"
" usage %#x, pool %#x, write %#x, width %u, height %u.\n",
surface, desc.Format, desc.Usage, desc.Pool, write, width, height);
IDirect3DDevice9_Release(device);
return hr;
}
if (write || SUCCEEDED(hr = IDirect3DDevice9_StretchRect(device, surface, surface_rect,
*temp_surface, NULL, D3DTEXF_NONE)))
hr = IDirect3DSurface9_LockRect(*temp_surface, lock, NULL, lock_flag);
IDirect3DDevice9_Release(device);
if (FAILED(hr))
{
WARN("Failed to lock surface %p, write %#x, usage %#x, pool %#x.\n",
surface, write, desc.Usage, desc.Pool);
IDirect3DSurface9_Release(*temp_surface);
*temp_surface = NULL;
return hr;
}
TRACE("Created temporary surface %p.\n", surface);
}
return hr;
}
HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock,
IDirect3DSurface9 *temp_surface, BOOL update)
{
IDirect3DDevice9 *device;
POINT surface_point;
HRESULT hr;
if (!temp_surface)
{
hr = IDirect3DSurface9_UnlockRect(surface);
return hr;
}
hr = IDirect3DSurface9_UnlockRect(temp_surface);
if (update)
{
if (surface_rect)
{
surface_point.x = surface_rect->left;
surface_point.y = surface_rect->top;
}
else
{
surface_point.x = 0;
surface_point.y = 0;
}
IDirect3DSurface9_GetDevice(surface, &device);
if (FAILED(hr = IDirect3DDevice9_UpdateSurface(device, temp_surface, NULL, surface, &surface_point)))
WARN("Updating surface failed, hr %#x, surface %p, temp_surface %p.\n",
hr, surface, temp_surface);
IDirect3DDevice9_Release(device);
}
IDirect3DSurface9_Release(temp_surface);
return hr;
}
static D3DFORMAT dds_rgb_to_d3dformat(const struct dds_pixel_format *pixel_format)
{
unsigned int i;
@ -462,6 +556,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
BYTE *pixels;
struct volume volume;
const struct pixel_format_desc *pixel_format;
IDirect3DSurface9 *temp_surface;
if (src_rect)
{
@ -501,7 +596,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
return hr;
}
hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, NULL, D3DLOCK_READONLY);
hr = lock_surface(src_surface, NULL, &locked_rect, &temp_surface, FALSE);
if (FAILED(hr))
{
ID3DXBuffer_Release(buffer);
@ -514,7 +609,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur
copy_pixels(locked_rect.pBits, locked_rect.Pitch, 0, pixels, dst_pitch, 0,
&volume, pixel_format);
IDirect3DSurface9_UnlockRect(src_surface);
unlock_surface(src_surface, NULL, &locked_rect, temp_surface, FALSE);
*dst_buffer = buffer;
return D3D_OK;
@ -1753,8 +1848,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
DWORD filter, D3DCOLOR color_key)
{
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
IDirect3DSurface9 *surface = dst_surface;
IDirect3DDevice9 *device;
IDirect3DSurface9 *surface;
D3DSURFACE_DESC surfdesc;
D3DLOCKED_RECT lockrect;
struct volume src_size, dst_size;
@ -1814,25 +1908,11 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
return E_NOTIMPL;
}
if (surfdesc.Pool == D3DPOOL_DEFAULT && !(surfdesc.Usage & D3DUSAGE_DYNAMIC))
{
IDirect3DSurface9_GetDevice(dst_surface, &device);
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, surfdesc.Width,
surfdesc.Height, surfdesc.Format, D3DPOOL_SYSTEMMEM, &surface, NULL);
IDirect3DDevice9_Release(device);
if (FAILED(hr))
{
WARN("Failed to create staging surface, hr %#x.\n", hr);
return D3DERR_INVALIDCALL;
}
}
if (FAILED(hr = lock_surface(dst_surface, dst_rect, &lockrect, &surface, TRUE)))
return hr;
if (FAILED(IDirect3DSurface9_LockRect(surface, &lockrect, dst_rect, 0)))
{
if (surface != dst_surface)
IDirect3DSurface9_Release(surface);
return D3DXERR_INVALIDDATA;
}
src_memory = (BYTE *)src_memory + src_rect->top / srcformatdesc->block_height * src_pitch
+ src_rect->left / srcformatdesc->block_width * srcformatdesc->block_byte_count;
if (src_format == surfdesc.Format
&& dst_size.width == src_size.width
@ -1847,8 +1927,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
&& src_size.height != surfdesc.Height))
{
WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect));
hr = D3DXERR_INVALIDDATA;
goto done;
unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE);
return D3DXERR_INVALIDDATA;
}
copy_pixels(src_memory, src_pitch, 0, lockrect.pBits, lockrect.Pitch, 0,
@ -1860,8 +1940,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|| !is_conversion_to_supported(destformatdesc))
{
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
hr = E_NOTIMPL;
goto done;
unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE);
return E_NOTIMPL;
}
if ((filter & 0xf) == D3DX_FILTER_NONE)
@ -1881,21 +1961,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
}
}
hr = D3D_OK;
done:
IDirect3DSurface9_UnlockRect(surface);
if (surface != dst_surface)
{
if (SUCCEEDED(hr))
{
IDirect3DSurface9_GetDevice(dst_surface, &device);
hr = IDirect3DDevice9_UpdateSurface(device, surface, NULL, dst_surface, NULL);
IDirect3DDevice9_Release(device);
}
IDirect3DSurface9_Release(surface);
}
return hr;
return unlock_surface(dst_surface, dst_rect, &lockrect, surface, TRUE);
}
/************************************************************
@ -1924,7 +1990,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface,
const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface,
const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key)
{
IDirect3DSurface9 *surface = src_surface;
IDirect3DSurface9 *temp_surface;
D3DTEXTUREFILTERTYPE d3d_filter;
IDirect3DDevice9 *device;
D3DSURFACE_DESC src_desc;
@ -1979,32 +2045,14 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface,
src_rect = &s;
}
if (FAILED(IDirect3DSurface9_LockRect(surface, &lock, NULL, D3DLOCK_READONLY)))
{
IDirect3DSurface9_GetDevice(src_surface, &device);
if (FAILED(IDirect3DDevice9_CreateRenderTarget(device, src_desc.Width, src_desc.Height,
src_desc.Format, D3DMULTISAMPLE_NONE, 0, TRUE, &surface, NULL)))
{
IDirect3DDevice9_Release(device);
return D3DXERR_INVALIDDATA;
}
if (SUCCEEDED(hr = IDirect3DDevice9_StretchRect(device, src_surface, NULL, surface, NULL, D3DTEXF_NONE)))
hr = IDirect3DSurface9_LockRect(surface, &lock, NULL, D3DLOCK_READONLY);
IDirect3DDevice9_Release(device);
if (FAILED(hr))
{
IDirect3DSurface9_Release(surface);
return D3DXERR_INVALIDDATA;
}
}
if (FAILED(lock_surface(src_surface, NULL, &lock, &temp_surface, FALSE)))
return D3DXERR_INVALIDDATA;
hr = D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, lock.pBits,
src_desc.Format, lock.Pitch, src_palette, src_rect, filter, color_key);
IDirect3DSurface9_UnlockRect(surface);
if (surface != src_surface)
IDirect3DSurface9_Release(surface);
if (FAILED(unlock_surface(src_surface, NULL, &lock, temp_surface, FALSE)))
return D3DXERR_INVALIDDATA;
return hr;
}
@ -2074,6 +2122,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
WICPixelFormatGUID wic_pixel_format;
D3DFORMAT d3d_pixel_format;
D3DSURFACE_DESC src_surface_desc;
IDirect3DSurface9 *temp_surface;
D3DLOCKED_RECT locked_rect;
int width, height;
STATSTG stream_stats;
@ -2081,7 +2130,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
ID3DXBuffer *buffer;
DWORD size;
TRACE("(%p, %#x, %p, %p, %s)\n",
TRACE("dst_buffer %p, file_format %#x, src_surface %p, src_palette %p, src_rect %s.\n",
dst_buffer, file_format, src_surface, src_palette, wine_dbgstr_rect(src_rect));
if (!dst_buffer || !src_surface) return D3DERR_INVALIDCALL;
@ -2175,16 +2224,14 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
if (SUCCEEDED(hr) && d3d_pixel_format != D3DFMT_UNKNOWN)
{
TRACE("Using pixel format %s %#x\n", debugstr_guid(&wic_pixel_format), d3d_pixel_format);
if (src_surface_desc.Format == d3d_pixel_format) /* Simple copy */
{
hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, src_rect, D3DLOCK_READONLY);
if (SUCCEEDED(hr))
{
IWICBitmapFrameEncode_WritePixels(frame, height,
locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits);
IDirect3DSurface9_UnlockRect(src_surface);
}
if (FAILED(hr = lock_surface(src_surface, src_rect, &locked_rect, &temp_surface, FALSE)))
goto cleanup;
IWICBitmapFrameEncode_WritePixels(frame, height,
locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits);
unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE);
}
else /* Pixel format conversion */
{
@ -2214,14 +2261,14 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE
hr = E_OUTOFMEMORY;
goto cleanup;
}
hr = IDirect3DSurface9_LockRect(src_surface, &locked_rect, src_rect, D3DLOCK_READONLY);
if (SUCCEEDED(hr))
if (FAILED(hr = lock_surface(src_surface, src_rect, &locked_rect, &temp_surface, FALSE)))
{
convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc,
dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL);
IDirect3DSurface9_UnlockRect(src_surface);
HeapFree(GetProcessHeap(), 0, dst_data);
goto cleanup;
}
convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc,
dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL);
unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE);
IWICBitmapFrameEncode_WritePixels(frame, height, dst_pitch, dst_pitch * height, dst_data);
HeapFree(GetProcessHeap(), 0, dst_data);

View File

@ -1093,16 +1093,16 @@ static void D3DXQuaternionTest(void)
expectedquat.x = 7.121285f; expectedquat.y = 2.159964f; expectedquat.z = -3.855094f; expectedquat.w = 5.362844f;
expect_quaternion(&expectedquat, &gotquat, 2);
expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f;
expect_quaternion(&expectedquat, &Nq, 2);
expect_quaternion(&expectedquat, &Nq, 4);
expectedquat.x = -1111.0f; expectedquat.y = 111.0f; expectedquat.z = -11.0f; expectedquat.w = 1.0f;
expect_quaternion(&expectedquat, &Nq1, 0);
gotquat = s;
D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &gotquat, &t, &u);
expectedquat.x = -1113.492920f; expectedquat.y = 82.679260f; expectedquat.z = -6.696645f; expectedquat.w = -4.090050f;
expect_quaternion(&expectedquat, &Nq, 2);
expect_quaternion(&expectedquat, &Nq, 4);
Nq1 = u;
D3DXQuaternionSquadSetup(&gotquat, &Nq, &Nq1, &r, &s, &t, &Nq1);
expect_quaternion(&expectedquat, &Nq, 2);
expect_quaternion(&expectedquat, &Nq, 4);
r.x = 0.2f; r.y = 0.3f; r.z = 1.3f; r.w = -0.6f;
s.x = -3.0f; s.y =-2.0f; s.z = 4.0f; s.w = 0.2f;
t.x = 0.4f; t.y = 8.3f; t.z = -3.1f; t.w = -2.7f;

View File

@ -25,6 +25,9 @@
#include <limits.h>
#include "wine/test.h"
#include "d3dx9.h"
#include "initguid.h"
#include "rmxftmpl.h"
#include "rmxfguid.h"
#ifndef NAN
/* From wine/port.h */
@ -11191,6 +11194,182 @@ static void test_D3DXFrameFind(void)
ok(ret == &child3, "Unexpected frame, %p.\n", ret);
}
static ID3DXFileData *get_mesh_data(const void *memory, SIZE_T length)
{
ID3DXFileData *file_data, *ret = NULL;
ID3DXFileEnumObject *enum_obj = NULL;
D3DXF_FILELOADMEMORY source;
ID3DXFile *file;
SIZE_T i, count;
GUID guid;
if (FAILED(D3DXFileCreate(&file)))
return NULL;
if (FAILED(file->lpVtbl->RegisterTemplates(file, D3DRM_XTEMPLATES, D3DRM_XTEMPLATE_BYTES)))
goto cleanup;
source.lpMemory = memory;
source.dSize = length;
if (FAILED(file->lpVtbl->CreateEnumObject(file, &source, D3DXF_FILELOAD_FROMMEMORY, &enum_obj)))
goto cleanup;
if (FAILED(enum_obj->lpVtbl->GetChildren(enum_obj, &count)))
goto cleanup;
for (i = 0; i < count; ++i)
{
if (FAILED(enum_obj->lpVtbl->GetChild(enum_obj, i, &file_data)))
goto cleanup;
if (SUCCEEDED(file_data->lpVtbl->GetType(file_data, &guid))
&& IsEqualGUID(&guid, &TID_D3DRMMesh))
{
ret = file_data;
break;
}
else
{
file_data->lpVtbl->Release(file_data);
}
}
cleanup:
if (enum_obj)
enum_obj->lpVtbl->Release(enum_obj);
file->lpVtbl->Release(file);
return ret;
}
static void test_load_skin_mesh_from_xof(void)
{
static const char simple_xfile[] =
"xof 0303txt 0032"
"Mesh {"
"3;"
"0.0; 0.0; 0.0;,"
"0.0; 1.0; 0.0;,"
"1.0; 1.0; 0.0;;"
"1;"
"3; 0, 1, 2;;"
"}";
static const D3DVERTEXELEMENT9 expected_declaration[] =
{
{0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0},
D3DDECL_END(),
};
D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE];
ID3DXBuffer *adjacency, *materials, *effects;
DWORD max_influences[3], count, fvf;
D3DPRESENT_PARAMETERS d3dpp;
IDirect3DDevice9 *device;
ID3DXSkinInfo *skin_info;
ID3DXFileData *file_data;
const char *bone_name;
D3DXMATRIX *matrix;
float influence;
ID3DXMesh *mesh;
IDirect3D9 *d3d;
ULONG refcount;
HRESULT hr;
HWND hwnd;
if (!(hwnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
640, 480, NULL, NULL, NULL, NULL)))
{
skip("Failed to create application window.\n");
return;
}
d3d = Direct3DCreate9(D3D_SDK_VERSION);
if (!d3d)
{
skip("Failed to create d3d object.\n");
DestroyWindow(hwnd);
return;
}
memset(&d3dpp, 0, sizeof(d3dpp));
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device);
IDirect3D9_Release(d3d);
if (FAILED(hr))
{
skip("Failed to create device, hr %#x.\n", hr);
DestroyWindow(hwnd);
return;
}
file_data = get_mesh_data(simple_xfile, sizeof(simple_xfile) - 1);
ok(!!file_data, "Failed to load mesh data.\n");
adjacency = materials = effects = (void *)0xdeadbeef;
count = ~0u;
skin_info = (void *)0xdeadbeef;
mesh = (void *)0xdeadbeef;
hr = D3DXLoadSkinMeshFromXof(file_data, 0, device, &adjacency, &materials, &effects, &count,
&skin_info, &mesh);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(!!adjacency, "Got unexpected value %p.\n", adjacency);
ok(!materials, "Got unexpected value %p.\n", materials);
ok(!effects, "Got unexpected value %p.\n", effects);
ok(!count, "Got unexpected value %u.\n", count);
ok(!!skin_info, "Got unexpected value %p.\n", skin_info);
ok(!!mesh, "Got unexpected value %p.\n", mesh);
count = mesh->lpVtbl->GetNumVertices(mesh);
ok(count == 3, "Got unexpected value %u.\n", count);
count = mesh->lpVtbl->GetNumFaces(mesh);
ok(count == 1, "Got unexpected value %u.\n", count);
hr = skin_info->lpVtbl->GetDeclaration(skin_info, declaration);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
compare_elements(declaration, expected_declaration, __LINE__, 0);
fvf = skin_info->lpVtbl->GetFVF(skin_info);
ok(fvf == D3DFVF_XYZ, "Got unexpected value %u.\n", fvf);
count = skin_info->lpVtbl->GetNumBones(skin_info);
ok(!count, "Got unexpected value %u.\n", count);
influence = skin_info->lpVtbl->GetMinBoneInfluence(skin_info);
ok(!influence, "Got unexpected value %.8e.\n", influence);
memset(max_influences, 0x55, sizeof(max_influences));
hr = skin_info->lpVtbl->GetMaxVertexInfluences(skin_info, max_influences);
todo_wine ok(hr == D3D_OK, "Got unexpected value %#x.\n", hr);
todo_wine ok(!max_influences[0], "Got unexpected value %u.\n", max_influences[0]);
ok(max_influences[1] == 0x55555555, "Got unexpected value %u.\n", max_influences[1]);
ok(max_influences[2] == 0x55555555, "Got unexpected value %u.\n", max_influences[2]);
bone_name = skin_info->lpVtbl->GetBoneName(skin_info, 0);
ok(!bone_name, "Got unexpected value %p.\n", bone_name);
count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 0);
ok(!count, "Got unexpected value %u.\n", count);
count = skin_info->lpVtbl->GetNumBoneInfluences(skin_info, 1);
ok(!count, "Got unexpected value %u.\n", count);
matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, -1);
ok(!matrix, "Got unexpected value %p.\n", matrix);
matrix = skin_info->lpVtbl->GetBoneOffsetMatrix(skin_info, 0);
ok(!matrix, "Got unexpected value %p.\n", matrix);
skin_info->lpVtbl->Release(skin_info);
mesh->lpVtbl->Release(mesh);
adjacency->lpVtbl->Release(adjacency);
file_data->lpVtbl->Release(file_data);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %u references left.\n", refcount);
DestroyWindow(hwnd);
}
START_TEST(mesh)
{
D3DXBoundProbeTest();
@ -11222,4 +11401,5 @@ START_TEST(mesh)
test_optimize_faces();
test_compute_normals();
test_D3DXFrameFind();
test_load_skin_mesh_from_xof();
}

View File

@ -881,8 +881,19 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
check_release((IUnknown*)surf, 0);
SetRect(&rect, 1, 1, 2, 2);
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 1, 1, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8,
D3DFMT_A8R8G8B8, 8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
check_pixel_4bpp(&lockrect, 0, 0, 0x8dc32bf6);
IDirect3DSurface9_UnlockRect(surf);
check_release((IUnknown *)surf, 0);
/* test color conversion */
SetRect(&rect, 0, 0, 2, 2);
/* A8R8G8B8 */
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &surf, NULL);
if(FAILED(hr)) skip("Failed to create a surface (%#x)\n", hr);
@ -927,17 +938,34 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
check_pixel_4bpp(&lockrect, 1, 1, 0xfffe9aff);
IDirect3DSurface9_UnlockRect(surf);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK);
IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8,
8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39);
check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a);
check_pixel_4bpp(&lockrect, 0, 1, 0x09fd97b1);
check_pixel_4bpp(&lockrect, 1, 1, 0x8df62bc3);
IDirect3DSurface9_UnlockRect(surf);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, 8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK);
SetRect(&rect, 0, 0, 1, 1);
SetRect(&destrect, 1, 1, 2, 2);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8,
8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39);
check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a);
check_pixel_4bpp(&lockrect, 0, 1, 0x09fd97b1);
check_pixel_4bpp(&lockrect, 1, 1, 0xc3f04c39);
IDirect3DSurface9_UnlockRect(surf);
SetRect(&rect, 0, 0, 2, 2);
hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10,
8, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY);
check_pixel_4bpp(&lockrect, 0, 0, 0x555c95bf);
check_pixel_4bpp(&lockrect, 1, 0, 0x556d663f);
@ -1253,16 +1281,30 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
{
HRESULT hr;
RECT rect;
ID3DXBuffer *buffer;
IDirect3DSurface9 *surface;
static const struct
{
DWORD usage;
D3DPOOL pool;
}
test_access_types[] =
{
{0, D3DPOOL_MANAGED},
{0, D3DPOOL_DEFAULT},
{D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT},
};
struct
{
DWORD magic;
struct dds_header header;
BYTE *data;
} *dds;
IDirect3DSurface9 *surface;
IDirect3DTexture9 *texture;
ID3DXBuffer *buffer;
unsigned int i;
HRESULT hr;
RECT rect;
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 4, 4, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &surface, NULL);
if (FAILED(hr)) {
@ -1317,102 +1359,146 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device)
ID3DXBuffer_Release(buffer);
IDirect3DSurface9_Release(surface);
for (i = 0; i < ARRAY_SIZE(test_access_types); ++i)
{
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 0, test_access_types[i].usage,
D3DFMT_A8R8G8B8, test_access_types[i].pool, &texture, NULL);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_DDS, surface, NULL, NULL);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
ID3DXBuffer_Release(buffer);
hr = D3DXSaveSurfaceToFileInMemory(&buffer, D3DXIFF_BMP, surface, NULL, NULL);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
ID3DXBuffer_Release(buffer);
IDirect3DSurface9_Release(surface);
IDirect3DTexture9_Release(texture);
}
}
static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device)
{
HRESULT hr;
IDirect3DSurface9 *surface;
RECT rect;
D3DLOCKED_RECT lock_rect;
D3DXIMAGE_INFO image_info;
const BYTE pixels[] = { 0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0x00, 0xff, 0x00, 0x00, 0xff };
const BYTE pixels[] =
{0xff, 0x00, 0x00, 0x00, 0xff, 0x00,
0x00, 0x00, 0xff, 0x00, 0x00, 0xff,};
DWORD pitch = sizeof(pixels) / 2;
IDirect3DSurface9 *surface;
D3DXIMAGE_INFO image_info;
D3DLOCKED_RECT lock_rect;
HRESULT hr;
RECT rect;
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_R8G8B8, D3DPOOL_SCRATCH, &surface, NULL);
if (FAILED(hr)) {
skip("Couldn't create surface\n");
if (FAILED(hr))
{
skip("Couldn't create surface.\n");
return;
}
SetRect(&rect, 0, 0, 2, 2);
hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, pitch, NULL, &rect, D3DX_FILTER_NONE, 0);
if (SUCCEEDED(hr)) {
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, NULL);
ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8,
pitch, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.bmp", NULL, D3DX_FILTER_NONE, 0, &image_info);
ok(hr == D3D_OK, "Couldn't load saved surface %#x\n", hr);
if (FAILED(hr)) goto next_tests;
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(image_info.Width == 2, "Wrong width %u\n", image_info.Width);
ok(image_info.Height == 2, "Wrong height %u\n", image_info.Height);
ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x\n", image_info.Format);
ok(image_info.ImageFileFormat == D3DXIFF_BMP, "Wrong file format %u\n", image_info.ImageFileFormat);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.bmp",
NULL, D3DX_FILTER_NONE, 0, &image_info);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Couldn't lock surface %#x\n", hr);
if (FAILED(hr)) goto next_tests;
ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width);
ok(image_info.Height == 2, "Wrong height %u.\n", image_info.Height);
ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x.\n", image_info.Format);
ok(image_info.ImageFileFormat == D3DXIFF_BMP, "Wrong file format %u.\n", image_info.ImageFileFormat);
ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in first row\n");
ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), "Pixel data mismatch in second row\n");
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
IDirect3DSurface9_UnlockRect(surface);
} else skip("Couldn't fill surface\n");
ok(!memcmp(lock_rect.pBits, pixels, pitch),
"Pixel data mismatch in the first row.\n");
ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch),
"Pixel data mismatch in the second row.\n");
IDirect3DSurface9_UnlockRect(surface);
SetRect(&rect, 0, 1, 2, 2);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
SetRect(&rect, 0, 0, 2, 1);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, &rect, "saved_surface.bmp", NULL,
D3DX_FILTER_NONE, 0, &image_info);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(!memcmp(lock_rect.pBits, pixels + pitch, pitch),
"Pixel data mismatch in the first row.\n");
ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch),
"Pixel data mismatch in the second row.\n");
IDirect3DSurface9_UnlockRect(surface);
SetRect(&rect, 0, 0, 2, 2);
hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8,
pitch, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
next_tests:
hr = D3DXSaveSurfaceToFileA(NULL, D3DXIFF_BMP, surface, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
/* PPM and TGA are supported, even though MSDN claims they aren't */
todo_wine {
hr = D3DXSaveSurfaceToFileA("saved_surface.ppm", D3DXIFF_PPM, surface, NULL, NULL);
ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
hr = D3DXSaveSurfaceToFileA("saved_surface.tga", D3DXIFF_TGA, surface, NULL, NULL);
ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
todo_wine
{
hr = D3DXSaveSurfaceToFileA("saved_surface.ppm", D3DXIFF_PPM, surface, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = D3DXSaveSurfaceToFileA("saved_surface.tga", D3DXIFF_TGA, surface, NULL, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
}
hr = D3DXSaveSurfaceToFileA("saved_surface.dds", D3DXIFF_DDS, surface, NULL, NULL);
ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
if (SUCCEEDED(hr)) {
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.dds", NULL, D3DX_FILTER_NONE, 0, &image_info);
ok(hr == D3D_OK, "Couldn't load saved surface %#x\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr)) {
ok(image_info.Width == 2, "Wrong width %u\n", image_info.Width);
ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x\n", image_info.Format);
ok(image_info.ImageFileFormat == D3DXIFF_DDS, "Wrong file format %u\n", image_info.ImageFileFormat);
hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.dds",
NULL, D3DX_FILTER_NONE, 0, &image_info);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Couldn't lock surface %#x\n", hr);
if (SUCCEEDED(hr)) {
ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in first row\n");
ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), "Pixel data mismatch in second row\n");
IDirect3DSurface9_UnlockRect(surface);
}
}
} else skip("Couldn't save surface\n");
ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width);
ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x.\n", image_info.Format);
ok(image_info.ImageFileFormat == D3DXIFF_DDS, "Wrong file format %u.\n", image_info.ImageFileFormat);
hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(!memcmp(lock_rect.pBits, pixels, pitch),
"Pixel data mismatch in the first row.\n");
ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch),
"Pixel data mismatch in the second row.\n");
IDirect3DSurface9_UnlockRect(surface);
hr = D3DXSaveSurfaceToFileA("saved_surface", D3DXIFF_PFM + 1, surface, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
SetRect(&rect, 0, 0, 4, 4);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
SetRect(&rect, 2, 0, 1, 4);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
SetRect(&rect, 0, 2, 4, 1);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
SetRect(&rect, -1, -1, 2, 2);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
SetRectEmpty(&rect);
hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect);
/* fails when debug version of d3d9 is used */
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK);
ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "Got unexpected hr %#x.\n", hr);
DeleteFileA("saved_surface.bmp");
DeleteFileA("saved_surface.ppm");

View File

@ -1007,59 +1007,103 @@ static void WINAPI fillfunc(D3DXVECTOR4 *value, const D3DXVECTOR2 *texcoord,
static void test_D3DXFillTexture(IDirect3DDevice9 *device)
{
static const struct
{
DWORD usage;
D3DPOOL pool;
}
test_access_types[] =
{
{0, D3DPOOL_MANAGED},
{0, D3DPOOL_DEFAULT},
{D3DUSAGE_RENDERTARGET, D3DPOOL_DEFAULT},
};
IDirect3DTexture9 *tex;
HRESULT hr;
D3DLOCKED_RECT lock_rect;
DWORD x, y, m;
DWORD v[4], e[4];
DWORD value, expected, size, pitch;
unsigned int i;
size = 4;
hr = IDirect3DDevice9_CreateTexture(device, size, size, 0, 0, D3DFMT_A8R8G8B8,
D3DPOOL_MANAGED, &tex, NULL);
if (SUCCEEDED(hr))
for (i = 0; i < ARRAY_SIZE(test_access_types); ++i)
{
size = 4;
hr = IDirect3DDevice9_CreateTexture(device, size, size, 0, test_access_types[i].usage,
D3DFMT_A8R8G8B8, test_access_types[i].pool, &tex, NULL);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
hr = D3DXFillTexture(tex, fillfunc, NULL);
ok(hr == D3D_OK, "D3DXFillTexture returned %#x, expected %#x\n", hr, D3D_OK);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u.\n", hr, i);
for (m = 0; m < 3; m++)
{
hr = IDirect3DTexture9_LockRect(tex, m, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Couldn't lock the texture, error %#x\n", hr);
if (SUCCEEDED(hr))
IDirect3DSurface9 *src_surface, *temp_surface;
hr = IDirect3DTexture9_GetSurfaceLevel(tex, m, &src_surface);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m);
temp_surface = src_surface;
if (FAILED(hr = IDirect3DSurface9_LockRect(src_surface, &lock_rect, NULL, D3DLOCK_READONLY)))
{
pitch = lock_rect.Pitch / sizeof(DWORD);
for (y = 0; y < size; y++)
{
for (x = 0; x < size; x++)
{
value = ((DWORD *)lock_rect.pBits)[y * pitch + x];
v[0] = (value >> 24) & 0xff;
v[1] = (value >> 16) & 0xff;
v[2] = (value >> 8) & 0xff;
v[3] = value & 0xff;
e[0] = 0xff;
e[1] = (x + 0.5f) / size * 255.0f + 0.5f;
e[2] = (y + 0.5f) / size * 255.0f + 0.5f;
e[3] = 255.0f / size + 0.5f;
expected = e[0] << 24 | e[1] << 16 | e[2] << 8 | e[3];
ok(color_match(v, e),
"Texel at (%u, %u) doesn't match: %#x, expected %#x\n",
x, y, value, expected);
}
}
IDirect3DTexture9_UnlockRect(tex, m);
hr = IDirect3DDevice9_CreateRenderTarget(device, size, size,
D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &temp_surface, NULL);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m);
hr = IDirect3DDevice9_StretchRect(device, src_surface, NULL, temp_surface, NULL, D3DTEXF_NONE);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m);
hr = IDirect3DSurface9_LockRect(temp_surface, &lock_rect, NULL, D3DLOCK_READONLY);
ok(hr == D3D_OK, "Unexpected hr %#x, i %u, m %u.\n", hr, i, m);
}
pitch = lock_rect.Pitch / sizeof(DWORD);
for (y = 0; y < size; y++)
{
for (x = 0; x < size; x++)
{
value = ((DWORD *)lock_rect.pBits)[y * pitch + x];
v[0] = (value >> 24) & 0xff;
v[1] = (value >> 16) & 0xff;
v[2] = (value >> 8) & 0xff;
v[3] = value & 0xff;
e[0] = 0xff;
e[1] = (x + 0.5f) / size * 255.0f + 0.5f;
e[2] = (y + 0.5f) / size * 255.0f + 0.5f;
e[3] = 255.0f / size + 0.5f;
expected = e[0] << 24 | e[1] << 16 | e[2] << 8 | e[3];
ok(color_match(v, e),
"Texel at (%u, %u) doesn't match: %#x, expected %#x, i %u, m %u.\n",
x, y, value, expected, i, m);
}
}
IDirect3DSurface9_UnlockRect(temp_surface);
if (temp_surface != src_surface)
IDirect3DSurface9_Release(temp_surface);
IDirect3DSurface9_Release(src_surface);
size >>= 1;
}
IDirect3DTexture9_Release(tex);
}
else
skip("Failed to create texture\n");
hr = IDirect3DDevice9_CreateTexture(device, 256, 256, 1, D3DUSAGE_DEPTHSTENCIL,
D3DFMT_D16_LOCKABLE, D3DPOOL_DEFAULT, &tex, NULL);
if (hr == D3D_OK)
{
hr = D3DXFillTexture(tex, fillfunc, NULL);
todo_wine ok(hr == D3D_OK, "Unexpected hr %#x.\n", hr);
IDirect3DTexture9_Release(tex);
}
hr = IDirect3DDevice9_CreateTexture(device, 256, 256, 1, D3DUSAGE_DEPTHSTENCIL,
D3DFMT_D16, D3DPOOL_DEFAULT, &tex, NULL);
if (hr == D3D_OK)
{
hr = D3DXFillTexture(tex, fillfunc, NULL);
ok(hr == D3DERR_INVALIDCALL, "Unexpected hr %#x.\n", hr);
IDirect3DTexture9_Release(tex);
}
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_A1R5G5B5,
D3DPOOL_MANAGED, &tex, NULL);

View File

@ -1323,6 +1323,7 @@ static inline void fill_texture(const struct pixel_format_desc *format, BYTE *po
HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D function, void *funcdata)
{
IDirect3DSurface9 *surface, *temp_surface;
DWORD miplevels;
DWORD m, x, y;
D3DSURFACE_DESC desc;
@ -1331,26 +1332,34 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f
D3DXVECTOR2 coord, size;
const struct pixel_format_desc *format;
BYTE *data;
HRESULT hr;
if (texture == NULL || function == NULL)
TRACE("texture %p, function %p, funcdata %p.\n", texture, function, funcdata);
if (!texture || !function)
return D3DERR_INVALIDCALL;
miplevels = IDirect3DBaseTexture9_GetLevelCount(texture);
for (m = 0; m < miplevels; m++)
{
if (FAILED(IDirect3DTexture9_GetLevelDesc(texture, m, &desc)))
return D3DERR_INVALIDCALL;
if (FAILED(hr = IDirect3DTexture9_GetLevelDesc(texture, m, &desc)))
return hr;
format = get_format_info(desc.Format);
if (format->type != FORMAT_ARGB && format->type != FORMAT_ARGBF16 && format->type != FORMAT_ARGBF)
{
FIXME("Unsupported texture format %#x\n", desc.Format);
FIXME("Unsupported texture format %#x.\n", desc.Format);
return D3DERR_INVALIDCALL;
}
if (FAILED(IDirect3DTexture9_LockRect(texture, m, &lock_rect, NULL, D3DLOCK_DISCARD)))
return D3DERR_INVALIDCALL;
if (FAILED(hr = IDirect3DTexture9_GetSurfaceLevel(texture, m, &surface)))
return hr;
if (FAILED(hr = lock_surface(surface, NULL, &lock_rect, &temp_surface, TRUE)))
{
IDirect3DSurface9_Release(surface);
return hr;
}
size.x = 1.0f / desc.Width;
size.y = 1.0f / desc.Height;
@ -1372,7 +1381,12 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f
fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value);
}
}
IDirect3DTexture9_UnlockRect(texture, m);
if (FAILED(hr = unlock_surface(surface, NULL, &lock_rect, temp_surface, TRUE)))
{
IDirect3DSurface9_Release(surface);
return hr;
}
IDirect3DSurface9_Release(surface);
}
return D3D_OK;

View File

@ -517,6 +517,7 @@ struct d3d_viewport *unsafe_impl_from_IDirect3DViewport(IDirect3DViewport *iface
/* Helper functions */
void viewport_activate(struct d3d_viewport *viewport, BOOL ignore_lights) DECLSPEC_HIDDEN;
void viewport_deactivate(struct d3d_viewport *viewport) DECLSPEC_HIDDEN;
void d3d_viewport_init(struct d3d_viewport *viewport, struct ddraw *ddraw) DECLSPEC_HIDDEN;
/*****************************************************************************

View File

@ -819,7 +819,9 @@ static HRESULT WINAPI d3d_device3_DeleteViewport(IDirect3DDevice3 *iface, IDirec
if (device->current_viewport == vp)
{
TRACE("Deleting current viewport, unsetting and releasing\n");
TRACE("Deleting current viewport, unsetting and releasing.\n");
viewport_deactivate(vp);
IDirect3DViewport3_Release(viewport);
device->current_viewport = NULL;
}
@ -1689,48 +1691,42 @@ static HRESULT WINAPI d3d_device1_GetDirect3D(IDirect3DDevice *iface, IDirect3D
* (Is a NULL viewport valid?)
*
*****************************************************************************/
static HRESULT WINAPI d3d_device3_SetCurrentViewport(IDirect3DDevice3 *iface, IDirect3DViewport3 *Direct3DViewport3)
static HRESULT WINAPI d3d_device3_SetCurrentViewport(IDirect3DDevice3 *iface, IDirect3DViewport3 *viewport)
{
struct d3d_device *This = impl_from_IDirect3DDevice3(iface);
struct d3d_viewport *vp = unsafe_impl_from_IDirect3DViewport3(Direct3DViewport3);
struct d3d_viewport *vp = unsafe_impl_from_IDirect3DViewport3(viewport);
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
TRACE("iface %p, viewport %p.\n", iface, Direct3DViewport3);
TRACE("iface %p, viewport %p, current_viewport %p.\n", iface, viewport, device->current_viewport);
if (!vp)
{
WARN("Direct3DViewport3 is NULL, returning DDERR_INVALIDPARAMS\n");
WARN("Direct3DViewport3 is NULL.\n");
return DDERR_INVALIDPARAMS;
}
wined3d_mutex_lock();
/* Do nothing if the specified viewport is the same as the current one */
if (This->current_viewport == vp)
if (device->current_viewport == vp)
{
wined3d_mutex_unlock();
return D3D_OK;
}
if (vp->active_device != This)
if (vp->active_device != device)
{
WARN("Viewport %p active device is %p.\n", vp, vp->active_device);
WARN("Viewport %p, active device %p.\n", vp, vp->active_device);
wined3d_mutex_unlock();
return DDERR_INVALIDPARAMS;
}
/* Release previous viewport and AddRef the new one */
if (This->current_viewport)
IDirect3DViewport3_AddRef(viewport);
if (device->current_viewport)
{
TRACE("ViewportImpl is at %p, interface is at %p\n", This->current_viewport,
&This->current_viewport->IDirect3DViewport3_iface);
IDirect3DViewport3_Release(&This->current_viewport->IDirect3DViewport3_iface);
viewport_deactivate(device->current_viewport);
IDirect3DViewport3_Release(&device->current_viewport->IDirect3DViewport3_iface);
}
IDirect3DViewport3_AddRef(Direct3DViewport3);
/* Set this viewport as the current viewport */
This->current_viewport = vp;
/* Activate this viewport */
viewport_activate(This->current_viewport, FALSE);
device->current_viewport = vp;
viewport_activate(device->current_viewport, FALSE);
wined3d_mutex_unlock();
@ -3919,7 +3915,20 @@ static HRESULT WINAPI d3d_device2_SetClipStatus(IDirect3DDevice2 *iface, D3DCLIP
*****************************************************************************/
static HRESULT WINAPI d3d_device7_GetClipStatus(IDirect3DDevice7 *iface, D3DCLIPSTATUS *clip_status)
{
FIXME("iface %p, clip_status %p stub!\n", iface, clip_status);
struct d3d_device *device = impl_from_IDirect3DDevice7(iface);
struct wined3d_viewport vp;
FIXME("iface %p, clip_status %p stub.\n", iface, clip_status);
wined3d_device_get_viewports(device->wined3d_device, NULL, &vp);
clip_status->minx = vp.x;
clip_status->maxx = vp.x + vp.width;
clip_status->miny = vp.y;
clip_status->maxy = vp.y + vp.height;
clip_status->minz = 0.0f;
clip_status->maxz = 0.0f;
clip_status->dwFlags = D3DCLIPSTATUS_EXTENTS2;
clip_status->dwStatus = 0;
return D3D_OK;
}
@ -4410,6 +4419,8 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
{
TRACE("Drawing from D3DVBCAPS_SYSTEMMEMORY vertex buffer, forwarding to DrawIndexedPrimitive().\n");
wined3d_mutex_lock();
wined3d_box.left = start_vertex * stride;
wined3d_box.right = wined3d_box.left + vertex_count * stride;
wined3d_resource = wined3d_buffer_get_resource(vb_impl->wined3d_buffer);
if (FAILED(hr = wined3d_resource_map(wined3d_resource, 0, &wined3d_map_desc,
&wined3d_box, WINED3D_MAP_READ)))
@ -4417,8 +4428,8 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface,
wined3d_mutex_unlock();
return D3DERR_VERTEXBUFFERLOCKED;
}
hr = d3d_device7_DrawIndexedPrimitive(iface, primitive_type, vb_impl->fvf, wined3d_map_desc.data,
start_vertex + vertex_count, indices, index_count, flags);
hr = d3d_device7_DrawIndexedPrimitive(iface, primitive_type, vb_impl->fvf,
wined3d_map_desc.data, vertex_count, indices, index_count, flags);
wined3d_resource_unmap(wined3d_resource, 0);
wined3d_mutex_unlock();
return hr;
@ -4506,19 +4517,24 @@ static HRESULT WINAPI d3d_device7_DrawIndexedPrimitiveVB_FPUPreserve(IDirect3DDe
}
static HRESULT WINAPI d3d_device3_DrawIndexedPrimitiveVB(IDirect3DDevice3 *iface,
D3DPRIMITIVETYPE PrimitiveType, IDirect3DVertexBuffer *D3DVertexBuf, WORD *Indices,
DWORD IndexCount, DWORD Flags)
D3DPRIMITIVETYPE primitive_type, IDirect3DVertexBuffer *vertex_buffer,
WORD *indices, DWORD index_count, DWORD flags)
{
struct d3d_vertex_buffer *vb =
unsafe_impl_from_IDirect3DVertexBuffer7((IDirect3DVertexBuffer7 *)vertex_buffer);
struct d3d_device *device = impl_from_IDirect3DDevice3(iface);
struct d3d_vertex_buffer *vb = unsafe_impl_from_IDirect3DVertexBuffer7((IDirect3DVertexBuffer7 *)D3DVertexBuf);
DWORD stride;
TRACE("iface %p, primitive_type %#x, vb %p, indices %p, index_count %u, flags %#x.\n",
iface, PrimitiveType, D3DVertexBuf, Indices, IndexCount, Flags);
iface, primitive_type, vertex_buffer, indices, index_count, flags);
setup_lighting(device, vb->fvf, Flags);
setup_lighting(device, vb->fvf, flags);
return IDirect3DDevice7_DrawIndexedPrimitiveVB(&device->IDirect3DDevice7_iface, PrimitiveType,
&vb->IDirect3DVertexBuffer7_iface, 0, IndexCount, Indices, IndexCount, Flags);
if (!(stride = get_flexible_vertex_size(vb->fvf)))
return D3D_OK;
return IDirect3DDevice7_DrawIndexedPrimitiveVB(&device->IDirect3DDevice7_iface, primitive_type,
&vb->IDirect3DVertexBuffer7_iface, 0, vb->size / stride, indices, index_count, flags);
}
/*****************************************************************************

View File

@ -121,7 +121,6 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
}
index_count = count * primitive_size;
if (buffer->index_size < index_count)
{
unsigned int new_size = max(buffer->index_size * 2, index_count);
@ -317,22 +316,12 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
case D3DPROCESSVERTICES_TRANSFORMLIGHT:
case D3DPROCESSVERTICES_TRANSFORM:
wined3d_device_set_stream_source(device->wined3d_device, 0,
buffer->src_vertex_buffer, buffer->src_vertex_pos, sizeof(D3DVERTEX));
if (op == D3DPROCESSVERTICES_TRANSFORMLIGHT)
{
wined3d_device_set_vertex_declaration(device->wined3d_device,
ddraw_find_decl(device->ddraw, D3DFVF_VERTEX));
wined3d_device_set_render_state(device->wined3d_device,
WINED3D_RS_LIGHTING, TRUE);
}
else
{
wined3d_device_set_vertex_declaration(device->wined3d_device,
ddraw_find_decl(device->ddraw, D3DFVF_LVERTEX));
wined3d_device_set_render_state(device->wined3d_device,
WINED3D_RS_LIGHTING, FALSE);
}
buffer->src_vertex_buffer, buffer->src_vertex_pos * sizeof(D3DVERTEX), sizeof(D3DVERTEX));
wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_LIGHTING,
op == D3DPROCESSVERTICES_TRANSFORMLIGHT && !!device->material);
wined3d_device_set_vertex_declaration(device->wined3d_device,
ddraw_find_decl(device->ddraw, op == D3DPROCESSVERTICES_TRANSFORMLIGHT
? D3DFVF_VERTEX : D3DFVF_LVERTEX));
wined3d_device_process_vertices(device->wined3d_device, ci->wStart, ci->wDest,
ci->dwCount, buffer->dst_vertex_buffer, NULL, 0, D3DFVF_TLVERTEX);
break;

View File

@ -54,15 +54,14 @@ void light_activate(struct d3d_light *light)
TRACE("light %p.\n", light);
if (!light->active_viewport || !light->active_viewport->active_device) return;
if (!light->active_viewport || !light->active_viewport->active_device
|| light->active_viewport->active_device->current_viewport != light->active_viewport)
return;
device = light->active_viewport->active_device;
light_update(light);
if (!(light->light.dwFlags & D3DLIGHT_ACTIVE))
{
if (light->light.dwFlags & D3DLIGHT_ACTIVE)
IDirect3DDevice7_LightEnable(&device->IDirect3DDevice7_iface, light->dwLightIndex, TRUE);
light->light.dwFlags |= D3DLIGHT_ACTIVE;
}
}
/*****************************************************************************
@ -78,14 +77,13 @@ void light_deactivate(struct d3d_light *light)
TRACE("light %p.\n", light);
if (!light->active_viewport || !light->active_viewport->active_device) return;
device = light->active_viewport->active_device;
if (!light->active_viewport || !light->active_viewport->active_device
|| light->active_viewport->active_device->current_viewport != light->active_viewport)
return;
device = light->active_viewport->active_device;
if (light->light.dwFlags & D3DLIGHT_ACTIVE)
{
IDirect3DDevice7_LightEnable(&device->IDirect3DDevice7_iface, light->dwLightIndex, FALSE);
light->light.dwFlags &= ~D3DLIGHT_ACTIVE;
}
}
static inline struct d3d_light *impl_from_IDirect3DLight(IDirect3DLight *iface)
@ -195,13 +193,12 @@ static HRESULT WINAPI d3d_light_SetLight(IDirect3DLight *iface, D3DLIGHT *data)
wined3d_mutex_lock();
memcpy(&light->light, data, sizeof(*data));
if (!(light->light.dwFlags & D3DLIGHT_ACTIVE) && flags & D3DLIGHT_ACTIVE)
light_activate(light);
else if (light->light.dwFlags & D3DLIGHT_ACTIVE && !(flags & D3DLIGHT_ACTIVE))
if (!(flags & D3DLIGHT_ACTIVE))
light_deactivate(light);
else if (flags & D3DLIGHT_ACTIVE)
light_update(light);
light->light.dwFlags = flags;
light_activate(light);
wined3d_mutex_unlock();
return D3D_OK;

View File

@ -760,38 +760,47 @@ static ULONG WINAPI d3d_texture1_Release(IDirect3DTexture *iface)
*
*****************************************************************************/
static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *iface,
DDSCAPS2 *Caps, IDirectDrawSurface7 **Surface)
DDSCAPS2 *caps, IDirectDrawSurface7 **surface)
{
struct ddraw_surface *This = impl_from_IDirectDrawSurface7(iface);
struct ddraw_surface *head_surface = impl_from_IDirectDrawSurface7(iface);
struct ddraw_surface *surf;
DDSCAPS2 our_caps;
int i;
TRACE("iface %p, caps %p, attachment %p.\n", iface, Caps, Surface);
TRACE("iface %p, caps %p, attachment %p.\n", iface, caps, surface);
if (IDirectDrawSurface7_IsLost(&head_surface->IDirectDrawSurface7_iface) != DD_OK)
{
WARN("Surface %p is lost.\n", head_surface);
*surface = NULL;
return DDERR_SURFACELOST;
}
wined3d_mutex_lock();
if(This->version < 7)
if(head_surface->version < 7)
{
/* Earlier dx apps put garbage into these members, clear them */
our_caps.dwCaps = Caps->dwCaps;
our_caps.dwCaps = caps->dwCaps;
our_caps.dwCaps2 = 0;
our_caps.dwCaps3 = 0;
our_caps.u1.dwCaps4 = 0;
}
else
{
our_caps = *Caps;
our_caps = *caps;
}
TRACE("(%p): Looking for caps: %x,%x,%x,%x\n", This, our_caps.dwCaps, our_caps.dwCaps2, our_caps.dwCaps3, our_caps.u1.dwCaps4); /* FIXME: Better debugging */
TRACE("head_surface %p, looking for caps %#x, %#x, %#x, %#x.\n", head_surface, our_caps.dwCaps,
our_caps.dwCaps2, our_caps.dwCaps3, our_caps.u1.dwCaps4); /* FIXME: Better debugging */
for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
{
surf = This->complex_array[i];
surf = head_surface->complex_array[i];
if(!surf) break;
TRACE("Surface: (%p) caps: %#x, %#x, %#x, %#x.\n", surf,
TRACE("Surface %p, caps %#x, %#x, %#x, %#x.\n", surf,
surf->surface_desc.ddsCaps.dwCaps,
surf->surface_desc.ddsCaps.dwCaps2,
surf->surface_desc.ddsCaps.dwCaps3,
@ -806,9 +815,9 @@ static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *ifa
* Not sure how to test this.
*/
TRACE("(%p): Returning surface %p\n", This, surf);
*Surface = &surf->IDirectDrawSurface7_iface;
ddraw_surface7_AddRef(*Surface);
TRACE("head_surface %p, returning surface %p.\n", head_surface, surf);
*surface = &surf->IDirectDrawSurface7_iface;
ddraw_surface7_AddRef(*surface);
wined3d_mutex_unlock();
return DD_OK;
@ -816,11 +825,11 @@ static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *ifa
}
/* Next, look at the attachment chain */
surf = This;
surf = head_surface;
while( (surf = surf->next_attached) )
{
TRACE("Surface: (%p) caps: %#x, %#x, %#x, %#x.\n", surf,
TRACE("Surface %p, caps %#x, %#x, %#x, %#x.\n", surf,
surf->surface_desc.ddsCaps.dwCaps,
surf->surface_desc.ddsCaps.dwCaps2,
surf->surface_desc.ddsCaps.dwCaps3,
@ -829,19 +838,19 @@ static HRESULT WINAPI ddraw_surface7_GetAttachedSurface(IDirectDrawSurface7 *ifa
if (((surf->surface_desc.ddsCaps.dwCaps & our_caps.dwCaps) == our_caps.dwCaps) &&
((surf->surface_desc.ddsCaps.dwCaps2 & our_caps.dwCaps2) == our_caps.dwCaps2)) {
TRACE("(%p): Returning surface %p\n", This, surf);
*Surface = &surf->IDirectDrawSurface7_iface;
ddraw_surface7_AddRef(*Surface);
TRACE("head_surface %p, returning surface %p.\n", head_surface, surf);
*surface = &surf->IDirectDrawSurface7_iface;
ddraw_surface7_AddRef(*surface);
wined3d_mutex_unlock();
return DD_OK;
}
}
TRACE("(%p) Didn't find a valid surface\n", This);
TRACE("head_surface %p, didn't find a valid surface.\n", head_surface);
wined3d_mutex_unlock();
*Surface = NULL;
*surface = NULL;
return DDERR_NOTFOUND;
}
@ -3720,6 +3729,7 @@ static HRESULT WINAPI ddraw_surface1_IsLost(IDirectDrawSurface *iface)
static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
unsigned int i;
TRACE("iface %p.\n", iface);
@ -3760,6 +3770,12 @@ static HRESULT WINAPI ddraw_surface7_Restore(IDirectDrawSurface7 *iface)
ddraw_update_lost_surfaces(surface->ddraw);
surface->is_lost = FALSE;
for(i = 0; i < MAX_COMPLEX_ATTACHED; i++)
{
if (surface->complex_array[i])
surface->complex_array[i]->is_lost = FALSE;
}
return DD_OK;
}
@ -6339,6 +6355,8 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
{
mip = wined3d_texture_get_sub_resource_parent(wined3d_texture, i * levels + j);
mip_desc = &mip->surface_desc;
if (desc->ddsCaps.dwCaps & DDSCAPS_MIPMAP)
mip_desc->u2.dwMipMapCount = levels - j;
if (j)
{

View File

@ -5396,10 +5396,10 @@ static void test_create_surface_pitch(void)
static void test_mipmap(void)
{
IDirectDrawSurface *surface, *surface2;
IDirectDrawSurface *surface, *surface_base, *surface_mip;
unsigned int i, mipmap_count;
DDSURFACEDESC surface_desc;
IDirectDraw *ddraw;
unsigned int i;
ULONG refcount;
HWND window;
HRESULT hr;
@ -5468,24 +5468,45 @@ static void test_mipmap(void)
ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out,
"Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount);
if (U2(surface_desc).dwMipMapCount > 1)
surface_base = surface;
IDirectDrawSurface2_AddRef(surface_base);
mipmap_count = U2(surface_desc).dwMipMapCount;
while (mipmap_count > 1)
{
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &surface2);
ok(SUCCEEDED(hr), "Test %u: Failed to get attached surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface_base, &caps, &surface_mip);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface_GetSurfaceDesc(surface_base, &surface_desc);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT,
"Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags);
ok(U2(surface_desc).dwMipMapCount == mipmap_count,
"Test %u, %u: Got unexpected mipmap count %u.\n",
i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface2, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
IDirectDrawSurface_Unlock(surface2, NULL);
IDirectDrawSurface_Unlock(surface, NULL);
hr = IDirectDrawSurface_Lock(surface_base, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count,
"Test %u, %u: unexpected change of mipmap count %u.\n",
i, mipmap_count, surface_desc.dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface_Lock(surface_mip, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count - 1,
"Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount);
IDirectDrawSurface_Unlock(surface_mip, NULL);
IDirectDrawSurface_Unlock(surface_base, NULL);
IDirectDrawSurface_Release(surface2);
IDirectDrawSurface_Release(surface_base);
surface_base = surface_mip;
--mipmap_count;
}
IDirectDrawSurface_Release(surface_base);
IDirectDrawSurface_Release(surface);
}
@ -6714,11 +6735,12 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
IDirectDrawSurface *surface;
IDirectDrawSurface *surface, *back_buffer;
DDSURFACEDESC surface_desc;
HWND window1, window2;
IDirectDraw *ddraw;
ULONG refcount;
DDSCAPS caps;
HRESULT hr;
BOOL ret;
@ -6856,6 +6878,19 @@ static void test_lost_device(void)
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Restore(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(back_buffer);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);

View File

@ -6422,10 +6422,10 @@ static void test_create_surface_pitch(void)
static void test_mipmap(void)
{
IDirectDrawSurface *surface1;
IDirectDrawSurface2 *surface, *surface2;
IDirectDrawSurface2 *surface, *surface_base, *surface_mip;
unsigned int i, mipmap_count;
DDSURFACEDESC surface_desc;
IDirectDraw2 *ddraw;
unsigned int i;
ULONG refcount;
HWND window;
HRESULT hr;
@ -6498,24 +6498,45 @@ static void test_mipmap(void)
ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out,
"Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount);
if (U2(surface_desc).dwMipMapCount > 1)
surface_base = surface;
IDirectDrawSurface2_AddRef(surface_base);
mipmap_count = U2(surface_desc).dwMipMapCount;
while (mipmap_count > 1)
{
hr = IDirectDrawSurface2_GetAttachedSurface(surface, &caps, &surface2);
ok(SUCCEEDED(hr), "Test %u: Failed to get attached surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface2_GetAttachedSurface(surface_base, &caps, &surface_mip);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface2_Lock(surface, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface2_GetSurfaceDesc(surface_base, &surface_desc);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT,
"Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags);
ok(U2(surface_desc).dwMipMapCount == mipmap_count,
"Test %u, %u: Got unexpected mipmap count %u.\n",
i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface2_Lock(surface2, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
IDirectDrawSurface2_Unlock(surface2, NULL);
IDirectDrawSurface2_Unlock(surface, NULL);
hr = IDirectDrawSurface2_Lock(surface_base, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count,
"Test %u, %u: unexpected change of mipmap count %u.\n",
i, mipmap_count, surface_desc.dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface2_Lock(surface_mip, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count - 1,
"Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount);
IDirectDrawSurface2_Unlock(surface_mip, NULL);
IDirectDrawSurface2_Unlock(surface_base, NULL);
IDirectDrawSurface2_Release(surface2);
IDirectDrawSurface2_Release(surface_base);
surface_base = surface_mip;
--mipmap_count;
}
IDirectDrawSurface2_Release(surface_base);
IDirectDrawSurface2_Release(surface);
}
@ -7984,11 +8005,12 @@ static void test_palette_alpha(void)
static void test_lost_device(void)
{
IDirectDrawSurface *surface;
IDirectDrawSurface *surface, *back_buffer;
DDSURFACEDESC surface_desc;
HWND window1, window2;
IDirectDraw2 *ddraw;
ULONG refcount;
DDSCAPS caps;
HRESULT hr;
BOOL ret;
@ -8126,6 +8148,19 @@ static void test_lost_device(void)
hr = IDirectDrawSurface_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_Restore(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface_IsLost(back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface_Release(back_buffer);
IDirectDrawSurface_Release(surface);
refcount = IDirectDraw2_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);

View File

@ -4051,21 +4051,21 @@ static void test_lighting(void)
{&mat_nonaffine, translatedquad, 0x000000ff, "Lit quad with non-affine matrix"},
};
HWND window;
IDirect3D3 *d3d;
DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL;
IDirect3DViewport3 *viewport, *viewport2;
DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE;
IDirect3DMaterial3 *material;
D3DMATERIALHANDLE mat_handle;
IDirect3DDevice3 *device;
IDirectDrawSurface4 *rt;
IDirect3DViewport3 *viewport;
IDirect3DMaterial3 *material;
IDirect3DLight *light;
D3DMATERIALHANDLE mat_handle;
D3DLIGHT2 light_desc;
HRESULT hr;
DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE;
DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL;
IDirect3D3 *d3d;
D3DCOLOR color;
ULONG refcount;
unsigned int i;
HWND window;
HRESULT hr;
window = create_window();
if (!(device = create_device(window, DDSCL_NORMAL)))
@ -4160,9 +4160,16 @@ static void test_lighting(void)
U4(light_desc.dcvColor).a = 1.0f;
U3(light_desc.dvDirection).z = 1.0f;
hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc);
ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DViewport3_AddLight(viewport, light);
ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DViewport3_AddLight(viewport, light);
ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr);
viewport2 = create_viewport(device, 0, 0, 640, 480);
hr = IDirect3DViewport3_AddLight(viewport2, light);
ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr);
IDirect3DViewport3_Release(viewport2);
hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr);
@ -4182,7 +4189,16 @@ static void test_lighting(void)
light_desc.dwFlags = D3DLIGHT_ACTIVE;
hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc);
ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DViewport3_DeleteLight(viewport, light);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
light_desc.dwFlags = 0;
hr = IDirect3DLight_GetLight(light, (D3DLIGHT *)&light_desc);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ok(light_desc.dwFlags == D3DLIGHT_ACTIVE, "Got unexpected flags %#x.\n", light_desc.dwFlags);
hr = IDirect3DViewport3_AddLight(viewport, light);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
@ -7954,10 +7970,10 @@ static void test_create_surface_pitch(void)
static void test_mipmap(void)
{
IDirectDrawSurface4 *surface, *surface2;
IDirectDrawSurface4 *surface, *surface_base, *surface_mip;
unsigned int i, mipmap_count;
DDSURFACEDESC2 surface_desc;
IDirectDraw4 *ddraw;
unsigned int i;
ULONG refcount;
HWND window;
HRESULT hr;
@ -8026,24 +8042,45 @@ static void test_mipmap(void)
ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out,
"Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount);
if (U2(surface_desc).dwMipMapCount > 1)
surface_base = surface;
IDirectDrawSurface4_AddRef(surface_base);
mipmap_count = U2(surface_desc).dwMipMapCount;
while (mipmap_count > 1)
{
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &surface2);
ok(SUCCEEDED(hr), "Test %u: Failed to get attached surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface4_GetAttachedSurface(surface_base, &caps, &surface_mip);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface4_GetSurfaceDesc(surface_base, &surface_desc);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT,
"Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags);
ok(U2(surface_desc).dwMipMapCount == mipmap_count,
"Test %u, %u: Got unexpected mipmap count %u.\n",
i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface2, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
IDirectDrawSurface4_Unlock(surface2, NULL);
IDirectDrawSurface4_Unlock(surface, NULL);
hr = IDirectDrawSurface4_Lock(surface_base, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count,
"Test %u, %u: unexpected change of mipmap count %u.\n",
i, mipmap_count, surface_desc.dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface_mip, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count - 1,
"Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount);
IDirectDrawSurface4_Unlock(surface_mip, NULL);
IDirectDrawSurface4_Unlock(surface_base, NULL);
IDirectDrawSurface4_Release(surface2);
IDirectDrawSurface4_Release(surface_base);
surface_base = surface_mip;
--mipmap_count;
}
IDirectDrawSurface4_Release(surface_base);
IDirectDrawSurface4_Release(surface);
}
@ -9001,11 +9038,12 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
IDirectDrawSurface4 *surface;
IDirectDrawSurface4 *surface, *back_buffer;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
IDirectDraw4 *ddraw;
ULONG refcount;
DDSCAPS2 caps;
HRESULT hr;
BOOL ret;
@ -9172,9 +9210,23 @@ static void test_lost_device(void)
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_Restore(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface4_IsLost(back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface4_Release(back_buffer);
IDirectDrawSurface4_Release(surface);
refcount = IDirectDraw4_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);
@ -15442,12 +15494,16 @@ static void test_sysmem_draw(void)
}
quad[] =
{
{{ 0.0f, 0.0f, 0.0f}, 0x00000000},
{{ 0.0f, 0.0f, 0.0f}, 0x00000000},
{{ 0.0f, 0.0f, 0.0f}, 0x00000000},
{{ 0.0f, 0.0f, 0.0f}, 0x00000000},
{{-1.0f, -1.0f, 0.0f}, 0xffff0000},
{{-1.0f, 1.0f, 0.0f}, 0xff00ff00},
{{ 1.0f, -1.0f, 0.0f}, 0xff0000ff},
{{ 1.0f, 1.0f, 0.0f}, 0xffffffff},
};
static WORD indices[] = {0, 1, 2, 3};
static WORD indices[] = {4, 5, 6, 7};
window = create_window();
ok(!!window, "Failed to create a window.\n");
@ -15474,7 +15530,7 @@ static void test_sysmem_draw(void)
vb_desc.dwSize = sizeof(vb_desc);
vb_desc.dwCaps = D3DVBCAPS_SYSTEMMEMORY;
vb_desc.dwFVF = D3DFVF_XYZ | D3DFVF_DIFFUSE;
vb_desc.dwNumVertices = 4;
vb_desc.dwNumVertices = ARRAY_SIZE(quad);
hr = IDirect3D3_CreateVertexBuffer(d3d, &vb_desc, &vb, 0, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
@ -15489,7 +15545,7 @@ static void test_sysmem_draw(void)
hr = IDirect3DDevice3_BeginScene(device);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 0, 4, 0);
hr = IDirect3DDevice3_DrawPrimitiveVB(device, D3DPT_TRIANGLESTRIP, vb, 4, 4, 0);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice3_EndScene(device);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);

View File

@ -996,6 +996,7 @@ static void test_coop_level_d3d_state(void)
IDirectDraw7 *ddraw;
IDirect3D7 *d3d;
D3DCOLOR color;
DDSCAPS2 caps;
DWORD value;
HWND window;
HRESULT hr;
@ -1009,44 +1010,63 @@ static void test_coop_level_d3d_state(void)
}
hr = IDirect3DDevice7_GetRenderTarget(device, &rt);
ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(!!value, "Got unexpected z-enable state %#x.\n", value);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(!value, "Got unexpected alpha blend enable state %#x.\n", value);
hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, TRUE);
ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
color = get_surface_color(rt, 320, 240);
ok(compare_color(color, 0x00ff0000, 1), "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice7_GetDirect3D(device, &d3d);
ok(SUCCEEDED(hr), "Failed to get d3d interface, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3D7_QueryInterface(d3d, &IID_IDirectDraw7, (void **)&ddraw);
ok(SUCCEEDED(hr), "Failed to get ddraw interface, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirect3D7_Release(d3d);
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(rt);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_ZBUFFER;
hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDraw7_RestoreAllSurfaces(ddraw);
ok(SUCCEEDED(hr), "Failed to restore surfaces, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
caps.dwCaps = DDSCAPS_ZBUFFER;
hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface7_Release(surface);
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface7_GetAttachedSurface(rt, &caps, &surface);
ok(hr == DDERR_NOTFOUND, "Got unexpected hr %#x.\n", hr);
IDirectDraw7_Release(ddraw);
hr = IDirect3DDevice7_GetRenderTarget(device, &surface);
ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(surface == rt, "Got unexpected surface %p.\n", surface);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ZENABLE, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(!!value, "Got unexpected z-enable state %#x.\n", value);
hr = IDirect3DDevice7_GetRenderState(device, D3DRENDERSTATE_ALPHABLENDENABLE, &value);
ok(SUCCEEDED(hr), "Failed to get render state, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(!!value, "Got unexpected alpha blend enable state %#x.\n", value);
hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xff00ff00, 0.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear render target, hr %#x.\n", hr);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
color = get_surface_color(rt, 320, 240);
ok(compare_color(color, 0x0000ff00, 1), "Got unexpected color 0x%08x.\n", color);
@ -7788,10 +7808,10 @@ static void test_create_surface_pitch(void)
static void test_mipmap(void)
{
IDirectDrawSurface7 *surface, *surface2;
IDirectDrawSurface7 *surface, *surface_base, *surface_mip;
unsigned int i, mipmap_count;
DDSURFACEDESC2 surface_desc;
IDirectDraw7 *ddraw;
unsigned int i;
ULONG refcount;
HWND window;
HRESULT hr;
@ -7861,24 +7881,45 @@ static void test_mipmap(void)
ok(U2(surface_desc).dwMipMapCount == tests[i].mipmap_count_out,
"Test %u: Got unexpected mipmap count %u.\n", i, U2(surface_desc).dwMipMapCount);
if (U2(surface_desc).dwMipMapCount > 1)
surface_base = surface;
IDirectDrawSurface7_AddRef(surface_base);
mipmap_count = U2(surface_desc).dwMipMapCount;
while (mipmap_count > 1)
{
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &surface2);
ok(SUCCEEDED(hr), "Test %u: Failed to get attached surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface7_GetAttachedSurface(surface_base, &caps, &surface_mip);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get attached surface, hr %#x.\n", i, mipmap_count, hr);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_Lock(surface, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
hr = IDirectDrawSurface7_GetSurfaceDesc(surface_base, &surface_desc);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to get surface desc, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwFlags & DDSD_MIPMAPCOUNT,
"Test %u, %u: Got unexpected flags %#x.\n", i, mipmap_count, surface_desc.dwFlags);
ok(U2(surface_desc).dwMipMapCount == mipmap_count,
"Test %u, %u: Got unexpected mipmap count %u.\n",
i, mipmap_count, U2(surface_desc).dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_Lock(surface2, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u: Failed to lock surface, hr %#x.\n", i, hr);
IDirectDrawSurface7_Unlock(surface2, NULL);
IDirectDrawSurface7_Unlock(surface, NULL);
hr = IDirectDrawSurface7_Lock(surface_base, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count,
"Test %u, %u: unexpected change of mipmap count %u.\n",
i, mipmap_count, surface_desc.dwMipMapCount);
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_Lock(surface_mip, NULL, &surface_desc, 0, NULL);
ok(SUCCEEDED(hr), "Test %u, %u: Failed to lock surface, hr %#x.\n", i, mipmap_count, hr);
ok(surface_desc.dwMipMapCount == mipmap_count - 1,
"Test %u, %u: Child mipmap count unexpected %u\n", i, mipmap_count, surface_desc.dwMipMapCount);
IDirectDrawSurface7_Unlock(surface_mip, NULL);
IDirectDrawSurface7_Unlock(surface_base, NULL);
IDirectDrawSurface7_Release(surface2);
IDirectDrawSurface7_Release(surface_base);
surface_base = surface_mip;
--mipmap_count;
}
IDirectDrawSurface7_Release(surface_base);
IDirectDrawSurface7_Release(surface);
}
@ -8736,11 +8777,12 @@ static void test_vb_writeonly(void)
static void test_lost_device(void)
{
IDirectDrawSurface7 *surface;
IDirectDrawSurface7 *surface, *back_buffer;
DDSURFACEDESC2 surface_desc;
HWND window1, window2;
IDirectDraw7 *ddraw;
ULONG refcount;
DDSCAPS2 caps;
HRESULT hr;
BOOL ret;
@ -8910,6 +8952,19 @@ static void test_lost_device(void)
hr = IDirectDrawSurface7_Flip(surface, NULL, DDFLIP_WAIT);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
memset(&caps, 0, sizeof(caps));
caps.dwCaps = DDSCAPS_FLIP;
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_Restore(surface);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirectDrawSurface7_IsLost(back_buffer);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDrawSurface7_Release(back_buffer);
IDirectDrawSurface7_Release(surface);
refcount = IDirectDraw7_Release(ddraw);
ok(!refcount, "Got unexpected refcount %u.\n", refcount);

View File

@ -112,6 +112,16 @@ void viewport_activate(struct d3d_viewport *This, BOOL ignore_lights)
IDirect3DDevice7_SetViewport(&This->active_device->IDirect3DDevice7_iface, &vp);
}
void viewport_deactivate(struct d3d_viewport *viewport)
{
struct d3d_light *light;
LIST_FOR_EACH_ENTRY(light, &viewport->light_list, struct d3d_light, entry)
{
light_deactivate(light);
}
}
/*****************************************************************************
* _dump_D3DVIEWPORT, _dump_D3DVIEWPORT2
*
@ -760,6 +770,13 @@ static HRESULT WINAPI d3d_viewport_AddLight(IDirect3DViewport3 *iface, IDirect3D
return DDERR_INVALIDPARAMS;
}
if (light_impl->active_viewport)
{
wined3d_mutex_unlock();
WARN("Light %p is active in viewport %p.\n", light_impl, light_impl->active_viewport);
return D3DERR_LIGHTHASVIEWPORT;
}
/* Find a light number and update both light and viewports objects accordingly */
while (map & 1)
{
@ -776,14 +793,7 @@ static HRESULT WINAPI d3d_viewport_AddLight(IDirect3DViewport3 *iface, IDirect3D
/* Attach the light to the viewport */
light_impl->active_viewport = This;
/* If active, activate the light */
if (This->active_device && light_impl->light.dwFlags & D3DLIGHT_ACTIVE)
{
/* Disable the flag so that light_activate actually does its job. */
light_impl->light.dwFlags &= ~D3DLIGHT_ACTIVE;
light_activate(light_impl);
}
light_activate(light_impl);
wined3d_mutex_unlock();

View File

@ -862,7 +862,23 @@ static HRESULT WINAPI DEVENUM_ICreateDevEnum_CreateClassEnumerator(
else if (IsEqualGUID(class, &CLSID_VideoInputDeviceCategory))
register_avicap_devices();
return create_EnumMoniker(class, out);
if (SUCCEEDED(hr = create_EnumMoniker(class, out)))
{
IMoniker *mon;
hr = IEnumMoniker_Next(*out, 1, &mon, NULL);
if (hr == S_OK)
{
IMoniker_Release(mon);
IEnumMoniker_Reset(*out);
}
else
{
IEnumMoniker_Release(*out);
*out = NULL;
}
}
return hr;
}
/**********************************************************************

View File

@ -68,6 +68,7 @@ static void test_devenum(IBindCtx *bind_ctx)
WCHAR *displayname;
VARIANT var;
HRESULT hr;
int count;
hr = CoCreateInstance(&CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC,
&IID_ICreateDevEnum, (LPVOID*)&create_devenum);
@ -104,6 +105,8 @@ static void test_devenum(IBindCtx *bind_ctx)
if (hr == S_OK)
{
count = 0;
while (IEnumMoniker_Next(enum_moniker, 1, &moniker, NULL) == S_OK)
{
hr = IMoniker_GetDisplayName(moniker, NULL, NULL, &displayname);
@ -134,8 +137,11 @@ static void test_devenum(IBindCtx *bind_ctx)
CoTaskMemFree(displayname);
IPropertyBag_Release(prop_bag);
IMoniker_Release(moniker);
count++;
}
IEnumMoniker_Release(enum_moniker);
ok(count > 0, "CreateClassEnumerator() returned S_OK but no devices were enumerated.\n");
}
}

View File

@ -298,10 +298,11 @@ static void assign_action(HWND dialog)
int obj = lv_get_cur_item(dialog);
int old_action = lv_get_item_data(dialog, obj);
int used_obj;
DIDEVICEOBJECTINSTANCEW ddo = device->ddo[obj];
DWORD type;
if (old_action == action) return;
if (obj < 0) return;
type = device->ddo[obj].dwType;
/* Clear old action */
if (old_action != -1)
@ -320,7 +321,7 @@ static void assign_action(HWND dialog)
lv_set_action(dialog, used_obj, -1, lpdiaf);
/* Set new action */
lpdiaf->rgoAction[action].dwObjID = ddo.dwType;
lpdiaf->rgoAction[action].dwObjID = type;
lpdiaf->rgoAction[action].guidInstance = device->ddi.guidInstance;
lpdiaf->rgoAction[action].dwHow = DIAH_USERCONFIG;
@ -374,9 +375,15 @@ static INT_PTR CALLBACK ConfigureDevicesDlgProc(HWND dialog, UINT uMsg, WPARAM w
SendDlgItemMessageW(dialog, IDC_CONTROLLERCOMBO, CB_SETCURSEL, 0, 0);
fill_device_object_list(dialog);
ShowCursor(TRUE);
break;
}
case WM_DESTROY:
ShowCursor(FALSE);
break;
case WM_NOTIFY:
switch (((LPNMHDR)lParam)->code)

View File

@ -994,9 +994,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Acquire(LPDIRECTINPUTDEVICE8W iface)
EnterCriticalSection(&This->crit);
res = This->acquired ? S_FALSE : DI_OK;
This->acquired = 1;
if (res == DI_OK)
check_dinput_hooks(iface);
LeaveCriticalSection(&This->crit);
if (res == DI_OK)
check_dinput_hooks(iface, TRUE);
return res;
}
@ -1022,9 +1022,9 @@ HRESULT WINAPI IDirectInputDevice2WImpl_Unacquire(LPDIRECTINPUTDEVICE8W iface)
EnterCriticalSection(&This->crit);
res = !This->acquired ? DI_NOEFFECT : DI_OK;
This->acquired = 0;
if (res == DI_OK)
check_dinput_hooks(iface);
LeaveCriticalSection(&This->crit);
if (res == DI_OK)
check_dinput_hooks(iface, FALSE);
return res;
}
@ -1305,7 +1305,7 @@ HRESULT WINAPI IDirectInputDevice2WImpl_GetProperty(LPDIRECTINPUTDEVICE8W iface,
if (pdiph->dwSize != sizeof(DIPROPDWORD)) return DIERR_INVALIDPARAM;
pd->dwData = This->queue_len;
pd->dwData = This->buffersize;
TRACE("buffersize = %d\n", pd->dwData);
break;
}
@ -1394,12 +1394,14 @@ HRESULT WINAPI IDirectInputDevice2WImpl_SetProperty(
TRACE("buffersize = %d\n", pd->dwData);
EnterCriticalSection(&This->crit);
This->buffersize = pd->dwData;
This->queue_len = min(This->buffersize, 1024);
HeapFree(GetProcessHeap(), 0, This->data_queue);
This->data_queue = !pd->dwData ? NULL : HeapAlloc(GetProcessHeap(), 0,
pd->dwData * sizeof(DIDEVICEOBJECTDATA));
This->data_queue = !This->queue_len ? NULL : HeapAlloc(GetProcessHeap(), 0,
This->queue_len * sizeof(DIDEVICEOBJECTDATA));
This->queue_head = This->queue_tail = This->overflow = 0;
This->queue_len = pd->dwData;
LeaveCriticalSection(&This->crit);
break;

Some files were not shown because too many files have changed in this diff Show More