diff -Nru wine1.7-1.7.22/ANNOUNCE wine1.7-1.7.24/ANNOUNCE
--- wine1.7-1.7.22/ANNOUNCE 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/ANNOUNCE 2014-08-08 20:19:29.000000000 +0000
@@ -1,16 +1,15 @@
-The Wine development release 1.7.22 is now available.
+The Wine development release 1.7.24 is now available.
What's new in this release (see below for details):
- - Support for Unicode bracketing pairs.
- - Improved Internet cookie support.
- - OS X CoreAudio driver uses AUHAL instead of AudioQueue.
- - Initial support for geographical information.
+ - Beginning of some DirectWrite classes implementation.
+ - Initial wrapper dll for the packet capture library.
+ - Some crypto improvements.
- Various bug fixes.
The source is available from the following locations:
- http://prdownloads.sourceforge.net/wine/wine-1.7.22.tar.bz2
- http://mirrors.ibiblio.org/wine/source/1.7/wine-1.7.22.tar.bz2
+ http://prdownloads.sourceforge.net/wine/wine-1.7.24.tar.bz2
+ http://mirrors.ibiblio.org/wine/source/1.7/wine-1.7.24.tar.bz2
Binary packages for various distributions will be available from:
@@ -26,232 +25,201 @@
----------------------------------------------------------------
-Bugs fixed in 1.7.22 (total 68):
+Bugs fixed in 1.7.24 (total 44):
- 4122 Picasa 2.x/3.x: "Open File" from photo menu does nothing
- 7404 ShowWindow(SW_MINIMIZE) should not generate a WM_PAINT message
- 8284 Wild Earth: Photo Safari Demo: Freezes at a loading screen following main menu start game selection choices
- 10182 Hapedit doesn't launch web browser
- 10264 Multiple games wrapped with Tages Protection 5.x DRM scheme fail to start (Tages driver needs 'IoAllocateMdl' implementation)
- 10480 Safari refuses to load secure URLs
- 13075 Planetside crashes Character selection screen
- 15353 Safari 3.1.2: crash when clicking on tab
- 15520 DVD version of Riven fails to start.
- 16648 Defense Grid, the Awakening: Fails to load, X3DAudio1_4.dll, d3dx9_38.dll
- 19303 Sketchup 7 shows toolbars and menus, but work area is blank
- 19838 Treeview 'access violation' in ImgBurn v2.5.0.0's Disc Layout Editor window
- 21804 FPS Creator trial crashes on startup
- 22698 mshtml: iexplore crash after click "Install" at www.browserchoice.eu
- 22829 Sysinternals RAMMap crashes (shell32.CommandLineToArgvW needs to include terminating NULL element in returned array of pointers starting with WinVer >= Windows Vista)
- 23210 REDCINE v20.0.0 silently exits during startup
- 24286 Google SketchUp 8 crashes when using Phototextures feature
- 24904 No$Zoomer.exe 2.3.x crashes when run.
- 25110 PDF Password Cracker 3.2 Enterprise immediately page faults
- 25916 MediaGet v1.12.x crashes when starting downloading file
- 26166 Google Sketchup 8.0.4811 is not functional
- 26635 SketchUp 8 cannot use the components tool
- 27249 Edcast 3.1.21 fails on startup
- 27259 progeCAD 10.x installer causes spurious 'winemenubuilder' hangs
- 27487 Rift crashes on exit in winebrowser
- 27878 Picasa 3.8 in Fedora 15 just displays a black window
- 27880 Google Sketchup: moving tool windows: mouse button state not correct?
- 28465 shlwapi/path.c test crashes if CFLAGS="-fstack-protector-all" is used
- 28469 Lahore Trading Work Station crashes on startup
- 28490 IE 3.02 installer crashes with builtin shdocvw - unimplemented function shdocvw.dll.InstallReg_RunDLL
- 29159 Multiple apps and games fail due to 'HTTP_HttpOpenRequestW' being unable to escape some characters
- 29191 Google Sketchup 8 - no scrollbar on template selection screen
- 29408 Call to Power 1.2 crashes on startup
- 30258 NIPO Odin Developer crashes on unimplemented function rpcrt4.dll.RpcSsDontSerializeContext
- 30416 Live Baduk fails to start
- 30829 Fallout 3: Game of the Year Edition (Steam) crashes on startup
- 30865 Flash Player 11 "downloader" fails
- 31048 Dolphin XPS Viewer crashes on load
- 31224 Toribash 3.x/4.x crashes with hardware acceleration disabled in nouveau
- 31269 Multiple .NET apps and games crash with System.OverflowException (incorrect scaling for DECIMAL values in VarDecAdd)(Dungeons, Space Engineers)
- 31559 Planetside 2 (Beta), extremely low FPS
- 31577 Avast! antivirus protection driver crashes on unimplemented function ntoskrnl.exe.ExCreateCallback
- 31844 CitiesXL (all versions) needs native D3DXCreateSphere (purist)
- 31966 Babylon 9 installer crashes
- 32207 Planetside 2 (Beta) Crash when opening ingame Menus
- 32415 Distance 6.x randomly crashes on startup
- 32711 Multiple applications crash on unimplemented function ADVAPI32.dll.RegSetKeyValueA/W (Vista+ API)(BSAopt, Microsoft OneDrive)
- 32912 Wine Crash following champion select
- 33125 Tomb Raider (2013) freezes (bug in game engine, semaphore object handle value must be zero on all error paths)
- 33529 Planetside 2 0.608.21.21306 crashed ingame
- 34015 crash problem planetside 2
- 34069 "wine winemenubuilder" chokes on safari shortcut.
- 34456 Rift installer crashes
- 35395 Google SketchUp 8.2 draw pane freezes after save
- 35703 Lingea Lexicon 5 crashes on start up
- 36021 In the KDE Plasma desktop the mousepointer disappears in wine windows
- 36435 Adobe Flash Builder 4.6 uses potentially erroneous shell32.dll PathYetAnotherMakeUniqueName stub
- 36483 Multiple applications crash on unimplemented function ADVAPI32.dll.RegDeleteKeyValueA/W (Vista+ API)(Age of Mythology: Extended Edition)
- 36641 valgrind shows several invalid reads in wininet/tests/http.c
- 36651 shlwapi/tests/path.c: stack smashing detected (valgrind/gcc-4.9.0)
- 36810 valgrind shows a definite leak in winspool.drv/tests/info.c
- 36811 Avast! Free Antivirus 9.0.2013 'AvastSvc.exe' crashes on unimplemented function KERNEL32.dll.GetFirmwareEnvironmentVariableA
- 36817 valgrind shows a mismatched free in msvcrt/tests/file.c
- 36829 Can not recieve kindle delivery
- 36832 winetricks ie7 / riched20/tests/editor.c crash
- 36840 Tron 2.0 Demo crashes with "Out of memory" error
- 36858 Wine 1.7.16 does not work correctly with Pacestar LanFlow
- 36867 Localization bug in gdi32 font.c test
+ 9121 Crash when launching winning eleven 8
+ 14240 FC_Edit fails to initialize
+ 14943 CoDeSys 3.2 (Patch2) development environment does not work
+ 16365 Archlord Episode 3 Client crashes on startup (decrypting files with a RC4 session key derived from MD5 hash fails, only 40 bits are used, salt is dropped)
+ 17441 Anarchy Online: First run has messed up graphics and pointer
+ 17678 Anarchy Online fullscreen followes you when you switch desktops
+ 22177 Standalone version of DivX fails to install
+ 22896 Multiple applications and games need support for shell32 FOLDERID_LocalAppDataLow (.NET based Unity Engine games, Java JRE 6 in Vista mode)
+ 24711 AV Voice Changer Software Diamond 7.0 (VcsCore.exe) crashes on startup
+ 26346 Letters from Nowhere 2 demo: 'play trial' button does not work
+ 26887 Magicka crashes a few seconds after title screen
+ 26951 REALTEK 11n USB Wireless LAN Driver installer crashes
+ 27969 wine explorer crashes on startup
+ 28312 Assassin's Creed Brotherhood v1.03 needs "Saved Games" folder
+ 30454 Unknown program crashes on start
+ 30496 Serif WebPlus X2 and X5 crash on startup in mshtml
+ 30803 CCleaner 3.19 won't start, err:seh:setup_exception stack overflow
+ 30945 Jammer 6 demo fails to install without native ie7
+ 31008 WinUAE "Browse for folder" works incorrectly
+ 31408 anarchy online crash new zone
+ 31566 Fallout 3: regression causes block at critical section when radio is enabled
+ 31599 Serif Photoplus X6 installer fails, reporting 'Invalid command line.' (registry command association for msi package, 'msiexec.exe' must be a fully qualified path)
+ 31687 DYMO Stamps can't connect to its server
+ 31846 World of Warcraft: graphical glitches with particle weather effects using D3D9 engine
+ 32318 Excel 2007 files password-protected in Wine cannot be opened in Windows, and vice versa
+ 32480 Shogun: Total War Demo crashes at startup
+ 32758 .NET 3.5 and 4.x apps using Microsoft Enhanced RSA and AES Cryptographic Provider with default WinVer = Windows XP report "PlatformNotSupportedException" (TurboTax 2012, Adicom PNV, GOG.com downloader)
+ 33805 LEGO Digital Designer 4.3.6 crashes on start
+ 33867 Uplay shop doesn't let you buy things
+ 34141 Thunderbird 17.07 Crashes when clicking done in account configuration window
+ 34324 QQ2013 SP1 can't install
+ 35342 Office 2013 full offline install setup crash at startup
+ 35571 Questrade IQ Divide by Zero error
+ 36629 .NET Framework 4.0 fails to install
+ 36716 World Of Tanks black screen
+ 36833 app aborted because call unimplemented function iphlpapi.dll._PfBindInterfaceToIPAddress@12
+ 36835 Microsoft OneDrive/SkyDrive needs support for Shell32.dll.SHGetKnownFolderPath with 'KNOWNFOLDERID_Links'
+ 36888 DDO Wine website not work any more
+ 36927 SADX Mod Loader crashes due to missing msvcp100 function std::basic_istream::swap()
+ 36995 Regression: crash in msxml3
+ 36998 Cube World crashes on unimplemented function msvcp110.dll.?_Xbad_alloc@std@@YAXXZ
+ 37001 APB Reloaded 1.x (MMORPG) launcher crashes on startup (some CIM data type to OLE variant (VT) mappings are incorrect)
+ 37005 Serif WebPlus Starter Edition crashes on startup (IPropertyBag2::GetPropertyInfo returns more properties than the caller requested, leading to stack smashing)
+ 37039 When copying data into memory, shows a dialog message then crashes (but info passes to memory)
----------------------------------------------------------------
-Changes since 1.7.21:
+Changes since 1.7.23:
Akihiro Sagawa (1):
- winmm: Fallback to SND_FILENAME if the alias isn't found in the profile.
+ po: Update Japanese translation.
-Alexandre Julliard (2):
- configure: Always build wine.inf even if we don't install it.
- tools: Don't include wine/unicode.h if not necessary.
-
-Andrew Eikum (3):
- mmdevapi: Standardize period sizes.
- mmdevapi: Don't stop sending event signals after IAudioClient::Stop.
- winecoreaudio.drv: Use AUHAL API instead of AudioQueue.
+Andreas Mohr (1):
+ kernel32: Fix naming/spelling/typo of macro to HasOverlappedIoCompleted().
+
+Andrei Slăvoiu (5):
+ wined3d: Make the card selection for Nvidia binary driver use arrays only.
+ wined3d: Make the card selection for AMD binary driver use arrays only.
+ wined3d: Replace vendor specific callbacks with generic code that uses vendor specific renderer string tables.
+ wined3d: Make d3d_level_from_gl_info return an enum instead of a plain int.
+ wined3d: Use capabilities from the shader backend or the fragment pipeline to determine the D3D level.
+
+André Hentschel (2):
+ wpcap: Initial stub implementation.
+ wpcap: Implement pcap_lib_version.
Aric Stewart (2):
- tools: Generate the Unicode Bidi Bracketing table.
- usp10: Implement N0: bracketing pairs.
+ dwrite: Make dwritefactory an allocated object.
+ dwrite: Basic implementation for FontCollectionLoader registration.
-Austin English (5):
- kernel32: Add stubs for GetFirmwareEnvironmentVariableA/W.
- loader: Add WBEM installation directory key.
- rpcrt4: Add a stub for RpcSsDontSerializeContext.
- kernel32: Initialize return value in CreateSemaphoreExW.
- advapi32: Fix a memory leak in test_process_security.
-
-Bruno Jesus (7):
- dssenh/tests: Add tests for the default encryption chaining mode.
- rsaenh/tests: Add tests for the default encryption chaining mode.
- rsaenh/tests: Add more AES encrypt/decrypt tests.
- ws2_32: Only declare IPX support if the required definitions are found.
- ws2_32: Improve WSAStartup/WSACleanup tracing.
- dnsapi: Do not fail if NETDB_INTERNAL is not present.
- winspool: Fix a leak in DocumentPropertiesA (valgrind).
-
-Erich Hoover (1):
- advapi32: Implement RegSetKeySecurity on top of NtSetSecurityObject.
-
-François Gouget (1):
- shlwapi/tests: Make test_PathIsRelative[AW]() static.
-
-Frédéric Delanoy (3):
- msvcrt: Avoid potential integer overflow when computing median position in bsearch.
- Assorted spelling/grammar fixes.
- ntdll: Avoid potential integer overflow when computing median position in bsearch.
-
-Gediminas Jakutis (2):
- d3dx9: Add adjacency generation for D3DXCreateSphere().
- d3dx9: Implement D3DXCreateTorus() + tests.
-
-Grazvydas Ignotas (1):
- kernel32: Don't return uninitialized values on failures.
-
-Henri Verbeet (10):
- d3d9: Improve d3d9_device_CheckDeviceState() a little.
- d3d8: Improve d3d8_device_TestCooperativeLevel().
- d3d8: Check the device status in present calls.
- ddraw: Improve ddraw7_TestCooperativeLevel().
- ddraw: Implement ddraw7_RestoreAllSurfaces().
- ddraw: Check for a lost surface in ddraw_surface7_Flip().
- wined3d: Print a winediag message if we failed to create a DXTn texture because of lack of driver support.
- ddraw/tests: Get rid of struct vertex.
- ddraw/tests: Get rid of struct tvertex.
- ddraw/tests: Get rid of struct nvertex.
-
-Huw D. M. Davies (4):
- comctl32: Don't use the RECT from the custom draw structure when referring to the button alone.
- comctl32: The RECT in the custom draw structure should be the entire item's size. This includes any separated dropdown arrow.
- comctl32: Propagate the return value of WM_ERASEBKGND.
- tools: Only allow the absolute difference in bracket pairs to be less than 128, since we need the sign.
-
-Jacek Caban (13):
- iphlpapi: Protect res_init call with critical section.
- urlmon: Don't decode percent-encoded characters in file URLs with implicit scheme.
- urlmon.idl: Added missing Uri_CREATE_* flags.
- wininet: Forward InternetGetCookieA to InternetGetCookieExA, not the other way around.
- wininet: Forward InternetGetCookieW to InternetGetCookieExW, not the other way around.
- wininet.h: Added missing INTERNET_COOKIE_* flags.
- wininet: Forward InternetSetCookieExA to InternetSetCookieExW instead of InternetSetCookieA.
- wininet.h: Added InternetCookieState declaration.
- wininet: Fixed InternetSetCookieExW return type and forward InternetSetCookieW to InternetSetCookieExW instead of the other way around.
- wininet: Added support for INTERNET_COOKIE_HTTPONLY flag to InternetSetCookieEx.
- wininet: Added support for INTERNET_COOKIE_HTTPONLY flag to InternetGetCookieEx.
- wininet/tests: Added INTERNET_COOKIE_HTTPONLY tests.
- wininet: Don't allow overriding httponly cookies with non-httponly ones.
-
-Jactry Zeng (3):
- riched20: Don't create too many IRichEditOle interface for a RichEdit.
- riched20: Initialize ed->reOle in ME_MakeEditor().
- riched20: Return nonzero value instead of zero when EM_SETREADONLY succeeds.
-
-Joris van der Wel (4):
- server: Any of the 4 SE_*_DEFAULTED controls should not be stored on objects, their usage is transient.
- advapi32/tests: Changed an invalid comment.
- advapi32/tests: Refactor the retrieval of a security descriptor into a separate function so that it can be used in other tests.
- server: Setting a security descriptor should not replace an existing owner or group with a default, if only a DACL is being set.
-
-Ken Thomases (2):
- dbghelp: If the caller didn't provide a module load address use the segment start address.
- dbghelp: Ignore the __PAGEZERO segment.
-
-Marcus Meissner (2):
- windowscodecs: Fixed incorrect memset (Coverity).
- packager: Fixed incorrect size (Coverity).
-
-Nikolay Sivov (5):
- shell32: Implement PathYetAnotherMakeUniqueName().
- advapi32: Implement RegDeleteKeyValue().
- kernel32: Added support for C3_HIGHSURROGATE/C3_LOWSURROGATE in GetStringTypeW().
- advapi32: Implement RegSetKeyValue().
- kernel32: Partially implement GetGeoInfo().
-
-Piotr Caban (4):
- msvcrt: Fix buffer allocation in setvbuf.
- ole32: Don't do any message processing when we're already done with dragdrop operation.
- msvcrt: Always set fd to -1 in _sopen_s on failure.
- urlmon: Recognize
tag in FindMimeFromData function.
-
-Qian Hong (3):
- mshtml: Fixed typo.
- gdi32/tests: Improve font name localization tests by not requiring a strict language match.
- gdiplus: Set outer pointer to NULL when image loading functions fail.
-
-Sebastian Lackner (4):
- wininet: Fix invalid memory access in HTTP_QUERY_RAW_HEADERS (Valgrind).
- oleaut32/tests: Add additional tests for VarDecAdd.
- oleaut32: Decrease accuracy if scaling is not possible in VarDecAdd.
- shell32: Return NULL-terminated list of arguments in CommandLineToArgvW.
-
-Shuai Meng (2):
- vbscript: Implemented VarType.
- vbscript: Implemented Sgn.
-
-Stefan Dösinger (8):
- wined3d: Set palettes on the swapchain.
- wined3d: Do not write a FIXME about WINED3DUSAGE_WRITEONLY.
- ddraw: Refuse SetPalette and GetPalette on lost surfaces.
- d3d9: Ignore SetPriority and GetPriority calls on surfaces.
- wined3d: Ignore set_priority calls on non-managed resources.
- d3d9/tests: Add a test for SetPriority and GetPriority.
- d3d8/tests: Add a test for SetPriority and GetPriority.
- d3d9/tests: Fix some ok() call style issues.
-
-Vincent Povirk (7):
- ole32: Simplify the FileMonikerImpl_BindToStorage code.
- winebrowser: Manually percent-encode file: paths for unix filenames.
- winebrowser: Add traces for file uri conversion steps.
- winebrowser: Don't use IUriBuilder with unix file: uri's.
- urlmon: Add tests for implicit file uri's with percent encodings.
- gdiplus: Account for transforms when calculating hdc bounds.
- winex11: Leave fullscreen state alone when minimizing.
+Aurimas Fišeras (1):
+ po: Update Lithuanian translation.
-Zhenbo Li (1):
- shlwapi/tests: Add tests for PathIsRelativeA/W.
+Austin English (3):
+ wine.inf: Use full path to msiexec.
+ hid: Add HidD_GetProductString stub.
+ wine.inf: Fix quoting for msiexec commands.
+
+Bernhard Reiter (1):
+ imagehlp/tests: Add test for BindImageEx.
+
+Bruno Jesus (11):
+ rsaenh: Detect AES prototype provider correctly.
+ dmime/tests: Fix a crash in Windows 2000.
+ winhttp/tests: Add a no-content header test.
+ rsaenh/tests: Run the tests in the Base and Strong providers too.
+ rsaenh: Use a helper to get the key container.
+ rsaenh: The RC2 algorithm from Base provider supports only 40 bit keys.
+ rsaenh/tests: Add SHA-256 tests.
+ rsaenh/tests: Update some tests.
+ rsaenh: Handle the failure to set Base provider effective key length properly.
+ rsaenh: Use the remaining hash data as salt if requested.
+ rsaenh: A 40 bit key on Enhanced provider will not have salt even if asked for.
+
+David Hedberg (8):
+ shell32/tests: Tests for IShellItemGetAttributes.
+ shell32: Mask out attributes we didn't ask for in ShellItem::GetAttributes.
+ shell32: Return S_OK only if the flags matches the result exactly.
+ shell32: Always initialize shellitem to NULL in SHCreateShellItem.
+ shell32: Implement SHCreateShellItemFromIDLists.
+ shell32: Implement IShellItemArray::GetAttributes.
+ comdlg32: Support browsing for folders.
+ shell32: Implement IEnumShellItems for IShellItemArray.
+
+Erich Hoover (6):
+ strmbase: Fix race condition on InputPin_BeginFlush between csRenderLock and filter.csFilter.
+ strmbase: Fix race condition on InputPin_EndFlush between csRenderLock and filter.csFilter.
+ strmbase: Fix race condition on InputPin_EndOfStream between csRenderLock and filter.csFilter.
+ quartz: Fix race condition on EndOfStream between csRenderLock and filter.csFilter.
+ quartz: Fix race condition on EndFlush between csRenderLock and filter.csFilter.
+ quartz: Fix race condition between EndOfStream and Pause.
+
+Gerald Pfeifer (4):
+ winebuild: Remove unused empty_name_table.
+ winhttp: Remove unused constant proxymsg.
+ dbghelp: Do not try to ignore the return codes in PEV_ERROR and and PEV_ERROR1.
+ scrrun: Add a check for empty string in start_enumeration.
+
+Hao Peng (3):
+ iphlpapi: Add PfBindInterfaceToIPAddress function stub.
+ iphlpapi: Add PfDeleteInterface function stub.
+ iphlpapi: Add PfUnBindInterface function stub.
+
+Henri Verbeet (5):
+ wined3d: Add constant buffer support to the GLSL shader backend.
+ d3d10core: Implement d3d10_device_CopyResource().
+ wined3d: Make the "desc" parameter to wined3d_buffer_create() const.
+ wined3d: Get rid of the get_drawable_size() callback in struct wined3d_surface.
+ wined3d: Move the "draw_binding" field from struct wined3d_surface to struct wined3d_resource.
+
+Indrek Altpere (1):
+ wbemprox: Fix a few OLE variant mappings.
+
+Jacek Caban (2):
+ mshtml: Added IHTMLWindow2::navigate implementation.
+ mshtml: Added IHTMLElement:scrollIntoView implementation.
+
+Jactry Zeng (1):
+ include: Fix wrong type in tom.idl.
+
+Ken Thomases (3):
+ ntdll: In find_file_in_dir(), don't test directory entries' short names if the target name isn't a short name.
+ winemac: Use new API when available to list all display modes available on Retina Macs.
+ winemac: When removing the status item for a systray icon, discard any associated events in the queue.
+
+Michael Müller (2):
+ shell32: Create profile directories available in Vista and above.
+ windowscodecs: Fix number of returned properties in PropertyBag_GetPropertyInfo.
+
+Nikolay Sivov (8):
+ dwrite: Added some layout tests, simplify debug output for text ranges.
+ dwrite: Store maximum width/height for text layout.
+ dwrite/tests: Added some tests for inline object and ranges handling.
+ msxml3/saxreader: Fix attributes array growing size.
+ include: Added IDWriteLocalFontFileLoader.
+ dwrite: Implement Resize() for bitmap render target.
+ dwrite: Added GetCurrentTransform() for a render target.
+ dwrite/tests: Some tests for drawing sequence for a layout.
+
+Piotr Caban (8):
+ msvcp100: Add ios_base::swap implementation.
+ msvcp100: Add basic_ios::swap implementation.
+ msvcp100: Add basic_istream::swap implementation.
+ msvcp100: Add basic_ostream::swap implementaiton.
+ msvcp100: Add basic_iostream::swap implementation.
+ msvcp100: Add basic_streambuf::swap implementation.
+ msvcrt: Only check for flag presence in isatty function.
+ msvcp110: Add _Xbad_alloc implementation.
+
+Shuai Meng (4):
+ vbscript: Implemented ScriptEngine.
+ vbscript: Inplemented ScriptEngineBuildVersion.
+ vbscript: Implemented ScriptEngineMajorVersion.
+ vbscript: Implemented ScriptEngineMinorVersion.
+
+Stefan Dösinger (1):
+ user32: Make GetRegisteredRawInputDevices hotpatchable.
+
+Thomas Faber (10):
+ amstream: Destroy BaseFilter after MediaStreamFilterImpl child class.
+ quartz: Avoid side-effects in asserts.
+ quartz/tests: Fix memory leaks.
+ dsound: Do not call CoUninitialize if CoInitialize failed.
+ qcap: Reference module only on successful object creation.
+ strmbase: Separate BasePin destructors from Release.
+ qcap: Destroy BaseOutputPin in VfwPin_Release.
+ quartz: Destroy BaseOutputPin in FileAsyncReaderPin_Release.
+ quartz: Fix IEnumFiltersImpl memory leak.
+ quartz: Destroy BaseRenderer in NullRendererInner_Release.
+
+Zhenbo Li (2):
+ mshtml/tests: Better output when an exception is caught.
+ mshtml: Added IHTMLStyle:: textTransform property implementation.
--
Alexandre Julliard
diff -Nru wine1.7-1.7.22/AUTHORS wine1.7-1.7.24/AUTHORS
--- wine1.7-1.7.22/AUTHORS 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/AUTHORS 2014-08-08 20:19:29.000000000 +0000
@@ -161,6 +161,7 @@
Bernd Paysan
Bernd Schmidt
Bernhard Loos
+Bernhard Reiter
Bernhard Rosenkraenzer
Bernhard Übelacker
Bertho Stultiens
@@ -493,6 +494,7 @@
Hannu Valtonen
Hans de Graaff
Hans Leidekker
+Hao Peng
Harald Hoyer
Harry Jeffery
Harry McNally
@@ -538,6 +540,7 @@
Ilya Konstantinov
Ilya Korniyko
Ilya Shpigor
+Indrek Altpere
Ingmar Thiemann
Ingo Schneider
Ismael Barros
diff -Nru wine1.7-1.7.22/configure wine1.7-1.7.24/configure
--- wine1.7-1.7.22/configure 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/configure 2014-08-08 20:19:29.000000000 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Wine 1.7.22.
+# Generated by GNU Autoconf 2.69 for Wine 1.7.24.
#
# Report bugs to .
#
@@ -580,8 +580,8 @@
# Identity of this package.
PACKAGE_NAME='Wine'
PACKAGE_TARNAME='wine'
-PACKAGE_VERSION='1.7.22'
-PACKAGE_STRING='Wine 1.7.22'
+PACKAGE_VERSION='1.7.24'
+PACKAGE_STRING='Wine 1.7.24'
PACKAGE_BUGREPORT='wine-devel@winehq.org'
PACKAGE_URL='http://www.winehq.org'
@@ -676,6 +676,7 @@
XSLT_CFLAGS
XML2_LIBS
XML2_CFLAGS
+LIBPCAP
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
@@ -822,6 +823,7 @@
with_opengl
with_osmesa
with_oss
+with_pcap
with_png
with_pthread
with_sane
@@ -1282,6 +1284,7 @@
enable_wmp
enable_wmvcore
enable_wnaspi32
+enable_wpcap
enable_ws2_32
enable_wshom_ocx
enable_wsnmp32
@@ -1976,7 +1979,7 @@
# 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 1.7.22 to adapt to many kinds of systems.
+\`configure' configures Wine 1.7.24 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -2045,7 +2048,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Wine 1.7.22:";;
+ short | recursive ) echo "Configuration of Wine 1.7.24:";;
esac
cat <<\_ACEOF
@@ -2090,6 +2093,7 @@
--without-opengl do not use OpenGL
--without-osmesa do not use the OSMesa library
--without-oss do not use the OSS sound support
+ --without-pcap do not use the Packet Capture library
--without-png do not use PNG
--without-pthread do not use the pthread library
--without-sane do not use SANE (scanner support)
@@ -2240,7 +2244,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Wine configure 1.7.22
+Wine configure 1.7.24
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2758,7 +2762,7 @@
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 1.7.22, which was
+It was created by Wine $as_me 1.7.24, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3321,6 +3325,12 @@
fi
+# Check whether --with-pcap was given.
+if test "${with_pcap+set}" = set; then :
+ withval=$with_pcap; if test "x$withval" = "xno"; then ac_cv_header_pcap_pcap_h=no; fi
+fi
+
+
# Check whether --with-png was given.
if test "${with_png+set}" = set; then :
withval=$with_png;
@@ -6494,6 +6504,7 @@
netinet/in_systm.h \
netinet/tcp.h \
netinet/tcp_fsm.h \
+ pcap/pcap.h \
poll.h \
port.h \
process.h \
@@ -6812,13 +6823,13 @@
done
-for ac_header in ucontext.h
+for ac_header in sys/ucontext.h
do :
- ac_fn_c_check_header_compile "$LINENO" "ucontext.h" "ac_cv_header_ucontext_h" "#include
+ ac_fn_c_check_header_compile "$LINENO" "sys/ucontext.h" "ac_cv_header_sys_ucontext_h" "#include
"
-if test "x$ac_cv_header_ucontext_h" = xyes; then :
+if test "x$ac_cv_header_sys_ucontext_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
-#define HAVE_UCONTEXT_H 1
+#define HAVE_SYS_UCONTEXT_H 1
_ACEOF
fi
@@ -6829,8 +6840,8 @@
for ac_header in sys/thr.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/thr.h" "ac_cv_header_sys_thr_h" "#include
-#ifdef HAVE_UCONTEXT_H
-#include
+#ifdef HAVE_SYS_UCONTEXT_H
+#include
#endif
"
if test "x$ac_cv_header_sys_thr_h" = xyes; then :
@@ -10509,6 +10520,60 @@
fi
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no}
+if test "$ac_cv_header_pcap_pcap_h" = "yes"
+then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_create in -lpcap" >&5
+$as_echo_n "checking for pcap_create in -lpcap... " >&6; }
+if ${ac_cv_lib_pcap_pcap_create+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpcap $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pcap_create ();
+int
+main ()
+{
+return pcap_create ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_pcap_pcap_create=yes
+else
+ ac_cv_lib_pcap_pcap_create=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_create" >&5
+$as_echo "$ac_cv_lib_pcap_pcap_create" >&6; }
+if test "x$ac_cv_lib_pcap_pcap_create" = xyes; then :
+ LIBPCAP="-lpcap"
+
+fi
+
+fi
+if test "x$ac_cv_lib_pcap_pcap_create" != xyes; then :
+ case "x$with_pcap" in
+ x) as_fn_append wine_notices "|pcap ${notice_platform}development files not found, wpcap won't be supported." ;;
+ xno) ;;
+ *) as_fn_error $? "pcap ${notice_platform}development files not found, wpcap won't be supported.
+This is an error since --with-pcap was requested." "$LINENO" 5 ;;
+esac
+fi
+test "x$ac_cv_lib_pcap_pcap_create" != xyes && enable_wpcap=${enable_wpcap:-no}
+
if test "x$with_xml" != "xno"
then
@@ -11687,11 +11752,16 @@
if test "$ac_cv_header_resolv_h" = "yes"
then
- ac_save_LIBS="$LIBS"
- for lib in '' -lresolv
- do
- LIBS="$lib $ac_save_LIBS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolver library" >&5
+$as_echo_n "checking for resolver library... " >&6; }
+if ${ac_cv_have_resolv+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_LIBS="$LIBS"
+ for lib in '' -lresolv
+ do
+ LIBS="$lib $ac_save_LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#ifdef HAVE_NETINET_IN_H
#include
@@ -11700,25 +11770,37 @@
int
main ()
{
-res_query("foo",ns_c_in,0,0,0);
+if (!(_res.options & RES_INIT)) res_init(); res_query("foo",ns_c_in,0,0,0)
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
-
-$as_echo "#define HAVE_RESOLV 1" >>confdefs.h
-
- RESOLV_LIBS="$lib"
-
+ ac_cv_have_resolv=${lib:-"none required"}
+else
+ ac_cv_have_resolv="not found"
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- if test "${RESOLV_LIBS+set}" = set; then
- break
- fi
- done
- LIBS="$ac_save_LIBS"
+ test "x$ac_cv_have_resolv" = "xnot found" || break
+ done
+ LIBS="$ac_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_resolv" >&5
+$as_echo "$ac_cv_have_resolv" >&6; }
+
+ case "$ac_cv_have_resolv" in
+ "not found") ;;
+ "none required")
+
+$as_echo "#define HAVE_RESOLV 1" >>confdefs.h
+ ;;
+ *)
+ $as_echo "#define HAVE_RESOLV 1" >>confdefs.h
+
+ RESOLV_LIBS=$ac_cv_have_resolv
+ ;;
+ esac
fi
if test "x$with_lcms2" != "xno"
@@ -17298,6 +17380,7 @@
wine_fn_config_dll wmvcore enable_wmvcore
wine_fn_config_dll wnaspi32 enable_wnaspi32 implib
wine_fn_config_dll wow32 enable_win16 implib
+wine_fn_config_dll wpcap enable_wpcap
wine_fn_config_dll ws2_32 enable_ws2_32 implib
wine_fn_config_test dlls/ws2_32/tests ws2_32_test
wine_fn_config_dll wshom.ocx enable_wshom_ocx clean
@@ -18089,7 +18172,7 @@
# 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 1.7.22, which was
+This file was extended by Wine $as_me 1.7.24, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -18160,7 +18243,7 @@
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 1.7.22
+Wine config.status 1.7.24
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -Nru wine1.7-1.7.22/configure.ac wine1.7-1.7.24/configure.ac
--- wine1.7-1.7.22/configure.ac 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/configure.ac 2014-08-08 20:19:29.000000000 +0000
@@ -67,6 +67,8 @@
AC_ARG_WITH(opengl, AS_HELP_STRING([--without-opengl],[do not use OpenGL]))
AC_ARG_WITH(osmesa, AS_HELP_STRING([--without-osmesa],[do not use the OSMesa library]))
AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],[do not use the OSS sound support]))
+AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Capture library]),
+ [if test "x$withval" = "xno"; then ac_cv_header_pcap_pcap_h=no; fi])
AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]))
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
@@ -448,6 +450,7 @@
netinet/in_systm.h \
netinet/tcp.h \
netinet/tcp_fsm.h \
+ pcap/pcap.h \
poll.h \
port.h \
process.h \
@@ -631,12 +634,12 @@
AC_CHECK_HEADERS([ifaddrs.h],,,[#include ])
-AC_CHECK_HEADERS(ucontext.h,,,[#include ])
+AC_CHECK_HEADERS(sys/ucontext.h,,,[#include ])
AC_CHECK_HEADERS([sys/thr.h],,,
[#include
-#ifdef HAVE_UCONTEXT_H
-#include
+#ifdef HAVE_SYS_UCONTEXT_H
+#include
#endif])
AC_CHECK_HEADERS([pthread_np.h],,,
@@ -1268,6 +1271,15 @@
[OpenCL ${notice_platform}development files not found, OpenCL won't be supported.])
test "x$ac_cv_lib_OpenCL_clGetPlatformInfo" != xyes && enable_opencl=${enable_opencl:-no}
+dnl **** Check for libpcap ****
+if test "$ac_cv_header_pcap_pcap_h" = "yes"
+then
+ AC_CHECK_LIB(pcap,pcap_create,[AC_SUBST(LIBPCAP,["-lpcap"])])
+fi
+WINE_NOTICE_WITH(pcap,[test "x$ac_cv_lib_pcap_pcap_create" != xyes],
+ [pcap ${notice_platform}development files not found, wpcap won't be supported.])
+test "x$ac_cv_lib_pcap_pcap_create" != xyes && enable_wpcap=${enable_wpcap:-no}
+
dnl **** Check for libxml2 ****
if test "x$with_xml" != "xno"
@@ -1419,21 +1431,28 @@
dnl **** Check for resolver library ***
if test "$ac_cv_header_resolv_h" = "yes"
then
- ac_save_LIBS="$LIBS"
- for lib in '' -lresolv
- do
- LIBS="$lib $ac_save_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
+ AC_CACHE_CHECK([for resolver library], ac_cv_have_resolv,
+ [ac_save_LIBS="$LIBS"
+ for lib in '' -lresolv
+ do
+ LIBS="$lib $ac_save_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#ifdef HAVE_NETINET_IN_H
#include
#endif
-#include ]],[[res_query("foo",ns_c_in,0,0,0);]])],
- [AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header])
- AC_SUBST(RESOLV_LIBS,"$lib")])
- if test "${RESOLV_LIBS+set}" = set; then
- break
- fi
- done
- LIBS="$ac_save_LIBS"
+#include ]],[[if (!(_res.options & RES_INIT)) res_init(); res_query("foo",ns_c_in,0,0,0)]])],
+ [ac_cv_have_resolv=${lib:-"none required"}],[ac_cv_have_resolv="not found"])
+ test "x$ac_cv_have_resolv" = "xnot found" || break
+ done
+ LIBS="$ac_save_LIBS"])
+
+ case "$ac_cv_have_resolv" in
+ "not found") ;;
+ "none required")
+ AC_DEFINE(HAVE_RESOLV, 1, [Define if you have the resolver library and header]) ;;
+ *)
+ AC_DEFINE(HAVE_RESOLV, 1)
+ AC_SUBST(RESOLV_LIBS,$ac_cv_have_resolv) ;;
+ esac
fi
dnl **** Check for LittleCMS ***
@@ -3272,6 +3291,7 @@
WINE_CONFIG_DLL(wmvcore)
WINE_CONFIG_DLL(wnaspi32,,[implib])
WINE_CONFIG_DLL(wow32,enable_win16,[implib])
+WINE_CONFIG_DLL(wpcap)
WINE_CONFIG_DLL(ws2_32,,[implib])
WINE_CONFIG_TEST(dlls/ws2_32/tests)
WINE_CONFIG_DLL(wshom.ocx,,[clean])
diff -Nru wine1.7-1.7.22/debian/changelog wine1.7-1.7.24/debian/changelog
--- wine1.7-1.7.22/debian/changelog 2014-07-14 08:07:22.000000000 +0000
+++ wine1.7-1.7.24/debian/changelog 2014-08-16 21:40:29.000000000 +0000
@@ -1,3 +1,13 @@
+wine1.7 (1:1.7.24-0ubuntu1~ppa1) trusty; urgency=medium
+
+ * New upstream release
+ - Beginning of some DirectWrite classes implementation.
+ - Initial wrapper dll for the packet capture library.
+ - Some crypto improvements.
+ - Various bug fixes.
+
+ -- Scott Ritchie Sat, 16 Aug 2014 14:11:47 -0700
+
wine1.7 (1:1.7.22-0ubuntu1) trusty; urgency=medium
* New upstream release
diff -Nru wine1.7-1.7.22/debian/patches/0003-server-Use-rtkit-to-set-realtime-priority-try-4.patch wine1.7-1.7.24/debian/patches/0003-server-Use-rtkit-to-set-realtime-priority-try-4.patch
--- wine1.7-1.7.22/debian/patches/0003-server-Use-rtkit-to-set-realtime-priority-try-4.patch 2014-07-14 08:03:09.000000000 +0000
+++ wine1.7-1.7.24/debian/patches/0003-server-Use-rtkit-to-set-realtime-priority-try-4.patch 2014-08-16 21:40:48.000000000 +0000
@@ -11,11 +11,11 @@
4 files changed, 225 insertions(+)
create mode 100644 server/rtkit.c
-diff --git a/libs/wine/loader.c b/libs/wine/loader.c
-index 6cc8555..28f511e 100644
---- a/libs/wine/loader.c
-+++ b/libs/wine/loader.c
-@@ -915,6 +915,32 @@ jint JNI_OnLoad( JavaVM *vm, void *reserved )
+Index: wine1.7-1.7.24/libs/wine/loader.c
+===================================================================
+--- wine1.7-1.7.24.orig/libs/wine/loader.c 2014-08-16 14:40:42.981883766 -0700
++++ wine1.7-1.7.24/libs/wine/loader.c 2014-08-16 14:40:42.977883850 -0700
+@@ -921,6 +921,32 @@
#endif /* __ANDROID__ */
/***********************************************************************
@@ -48,7 +48,7 @@
* wine_init
*
* Main Wine initialisation.
-@@ -933,6 +959,7 @@ void wine_init( int argc, char *argv[], char *error, int error_size )
+@@ -939,6 +965,7 @@
#ifdef RLIMIT_AS
set_max_limit( RLIMIT_AS );
#endif
@@ -56,17 +56,17 @@
wine_init_argv0_path( argv[0] );
build_dll_path();
-diff --git a/server/Makefile.in b/server/Makefile.in
-index 19a4fac..76bdb96 100644
---- a/server/Makefile.in
-+++ b/server/Makefile.in
+Index: wine1.7-1.7.24/server/Makefile.in
+===================================================================
+--- wine1.7-1.7.24.orig/server/Makefile.in 2014-08-16 14:40:42.981883766 -0700
++++ wine1.7-1.7.24/server/Makefile.in 2014-08-16 14:40:42.977883850 -0700
@@ -1,4 +1,5 @@
EXTRALIBS = $(POLL_LIBS) $(RT_LIBS)
+EXTRAINCL = $(DBUS_CFLAGS)
C_SRCS = \
async.c \
-@@ -30,6 +31,7 @@ C_SRCS = \
+@@ -30,6 +31,7 @@
region.c \
registry.c \
request.c \
@@ -74,11 +74,10 @@
semaphore.c \
serial.c \
signal.c \
-diff --git a/server/rtkit.c b/server/rtkit.c
-new file mode 100644
-index 0000000..a212106
---- /dev/null
-+++ b/server/rtkit.c
+Index: wine1.7-1.7.24/server/rtkit.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ wine1.7-1.7.24/server/rtkit.c 2014-08-16 14:40:42.977883850 -0700
@@ -0,0 +1,180 @@
+/*
+ * Rtkit dbus calls
@@ -260,10 +259,10 @@
+}
+
+#endif
-diff --git a/server/thread.c b/server/thread.c
-index 50d6940..57b4a16 100644
---- a/server/thread.c
-+++ b/server/thread.c
+Index: wine1.7-1.7.24/server/thread.c
+===================================================================
+--- wine1.7-1.7.24.orig/server/thread.c 2014-08-16 14:40:42.981883766 -0700
++++ wine1.7-1.7.24/server/thread.c 2014-08-16 14:40:42.977883850 -0700
@@ -52,6 +52,8 @@
#include "user.h"
#include "security.h"
@@ -273,7 +272,7 @@
#ifdef __i386__
static const unsigned int supported_cpus = CPU_FLAG(CPU_x86);
-@@ -476,7 +478,17 @@ static void set_thread_info( struct thread *thread,
+@@ -476,7 +478,17 @@
if ((req->priority >= min && req->priority <= max) ||
req->priority == THREAD_PRIORITY_IDLE ||
req->priority == THREAD_PRIORITY_TIME_CRITICAL)
@@ -291,7 +290,7 @@
else
set_error( STATUS_INVALID_PARAMETER );
}
-@@ -1301,6 +1313,10 @@ DECL_HANDLER(init_thread)
+@@ -1301,6 +1313,10 @@
}
debug_level = max( debug_level, req->debug_level );
@@ -302,6 +301,3 @@
reply->pid = get_process_id( process );
reply->tid = get_thread_id( current );
reply->version = SERVER_PROTOCOL_VERSION;
---
-2.0.0
-
diff -Nru wine1.7-1.7.22/debian/patches/0006-rtkit-add-SIGXCPU-handling-to-wineserver.patch wine1.7-1.7.24/debian/patches/0006-rtkit-add-SIGXCPU-handling-to-wineserver.patch
--- wine1.7-1.7.22/debian/patches/0006-rtkit-add-SIGXCPU-handling-to-wineserver.patch 2014-07-14 08:03:09.000000000 +0000
+++ wine1.7-1.7.24/debian/patches/0006-rtkit-add-SIGXCPU-handling-to-wineserver.patch 2014-08-16 21:40:58.000000000 +0000
@@ -19,11 +19,11 @@
server/thread.h | 2 +
7 files changed, 261 insertions(+), 35 deletions(-)
-diff --git a/dlls/avrt/main.c b/dlls/avrt/main.c
-index aa6b95d..4e29abf 100644
---- a/dlls/avrt/main.c
-+++ b/dlls/avrt/main.c
-@@ -80,7 +80,7 @@ HANDLE WINAPI AvSetMmThreadCharacteristicsW(LPCWSTR TaskName, LPDWORD TaskIndex)
+Index: wine1.7-1.7.24/dlls/avrt/main.c
+===================================================================
+--- wine1.7-1.7.24.orig/dlls/avrt/main.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/dlls/avrt/main.c 2014-08-16 14:40:54.781644951 -0700
+@@ -80,7 +80,7 @@
SetLastError(ERROR_INVALID_HANDLE);
return NULL;
}
@@ -32,11 +32,11 @@
return (HANDLE)0x12345678;
}
-diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
-index f3c6b38..8c48fd2 100644
---- a/dlls/ntdll/server.c
-+++ b/dlls/ntdll/server.c
-@@ -79,6 +79,9 @@
+Index: wine1.7-1.7.24/dlls/ntdll/server.c
+===================================================================
+--- wine1.7-1.7.24.orig/dlls/ntdll/server.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/dlls/ntdll/server.c 2014-08-16 14:40:54.785644872 -0700
+@@ -81,6 +81,9 @@
#include "ntdll_misc.h"
WINE_DEFAULT_DEBUG_CHANNEL(server);
@@ -46,7 +46,7 @@
/* Some versions of glibc don't define this */
#ifndef SCM_RIGHTS
-@@ -1328,6 +1331,88 @@ static int get_unix_tid(void)
+@@ -1330,6 +1333,88 @@
}
@@ -135,7 +135,7 @@
/***********************************************************************
* server_init_process
*
-@@ -1337,6 +1422,14 @@ void server_init_process(void)
+@@ -1339,6 +1424,14 @@
{
obj_handle_t version;
const char *env_socket = getenv( "WINESERVERSOCKET" );
@@ -150,7 +150,7 @@
server_pid = -1;
if (env_socket)
-@@ -1420,7 +1513,6 @@ NTSTATUS server_init_process_done(void)
+@@ -1422,7 +1515,6 @@
return status;
}
@@ -158,11 +158,11 @@
/***********************************************************************
* server_init_thread
*
-diff --git a/libs/wine/loader.c b/libs/wine/loader.c
-index 28f511e..a9ad0be 100644
---- a/libs/wine/loader.c
-+++ b/libs/wine/loader.c
-@@ -929,10 +929,12 @@ static void set_rttime_limit(void)
+Index: wine1.7-1.7.24/libs/wine/loader.c
+===================================================================
+--- wine1.7-1.7.24.orig/libs/wine/loader.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/libs/wine/loader.c 2014-08-16 14:40:54.785644872 -0700
+@@ -935,10 +935,12 @@
if (!getrlimit( RLIMIT_RTTIME, &rlimit ))
{
@@ -179,10 +179,10 @@
setrlimit( RLIMIT_RTTIME, &rlimit );
}
-diff --git a/server/main.c b/server/main.c
-index 6c257b4..f78c0fb 100644
---- a/server/main.c
-+++ b/server/main.c
+Index: wine1.7-1.7.24/server/main.c
+===================================================================
+--- wine1.7-1.7.24.orig/server/main.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/server/main.c 2014-08-16 14:40:54.785644872 -0700
@@ -39,7 +39,7 @@
#include "request.h"
#include "wine/library.h"
@@ -192,7 +192,7 @@
/* command-line options */
int debug_level = 0;
-@@ -148,7 +148,7 @@ int main( int argc, char *argv[] )
+@@ -148,7 +148,7 @@
init_signals();
init_directories();
init_registry();
@@ -201,10 +201,10 @@
main_loop();
return 0;
}
-diff --git a/server/rtkit.c b/server/rtkit.c
-index a212106..53e5ce4 100644
---- a/server/rtkit.c
-+++ b/server/rtkit.c
+Index: wine1.7-1.7.24/server/rtkit.c
+===================================================================
+--- wine1.7-1.7.24.orig/server/rtkit.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/server/rtkit.c 2014-08-16 14:40:54.785644872 -0700
@@ -35,7 +35,11 @@
#include
#include
@@ -217,7 +217,7 @@
#ifndef RLIMIT_RTTIME
#define RLIMIT_RTTIME 15
-@@ -53,6 +57,8 @@ FUNCPTR(dbus_message_unref);
+@@ -53,6 +57,8 @@
FUNCPTR(dbus_set_error_from_message);
#undef FUNCPTR
@@ -226,7 +226,7 @@
static int translate_error( unsigned tid, const char *name )
{
if (!strcmp( name, DBUS_ERROR_NO_MEMORY ))
-@@ -85,6 +91,88 @@ static void init_dbus(void)
+@@ -85,6 +91,88 @@
#undef FUNCPTR
}
@@ -315,7 +315,7 @@
static DBusConnection *get_dbus(void)
{
static DBusConnection *bus;
-@@ -96,16 +184,18 @@ static DBusConnection *get_dbus(void)
+@@ -96,16 +184,18 @@
pdbus_error_init( &error );
bus = pdbus_bus_get( DBUS_BUS_SYSTEM, &error );
@@ -337,7 +337,7 @@
DBusError error;
int ret;
-@@ -133,16 +223,29 @@ int rtkit_make_realtime( pid_t process, pid_t thread, int priority )
+@@ -133,16 +223,29 @@
ret = -ENOMEM;
goto out;
}
@@ -369,7 +369,7 @@
out:
if (m)
pdbus_message_unref( m );
-@@ -150,29 +253,38 @@ out:
+@@ -150,29 +253,38 @@
pdbus_message_unref( r );
pdbus_error_free( &error );
if (debug_level)
@@ -419,10 +419,10 @@
{
return -ENOTSUP;
}
-diff --git a/server/thread.c b/server/thread.c
-index 57b4a16..778015e 100644
---- a/server/thread.c
-+++ b/server/thread.c
+Index: wine1.7-1.7.24/server/thread.c
+===================================================================
+--- wine1.7-1.7.24.orig/server/thread.c 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/server/thread.c 2014-08-16 14:40:54.785644872 -0700
@@ -52,8 +52,8 @@
#include "user.h"
#include "security.h"
@@ -434,7 +434,7 @@
#ifdef __i386__
static const unsigned int supported_cpus = CPU_FLAG(CPU_x86);
-@@ -203,6 +203,8 @@ static inline void init_thread_structure( struct thread *thread )
+@@ -203,6 +203,8 @@
list_init( &thread->mutex_list );
list_init( &thread->system_apc );
list_init( &thread->user_apc );
@@ -443,7 +443,7 @@
for (i = 0; i < MAX_INFLIGHT_FDS; i++)
thread->inflight[i].server = thread->inflight[i].client = -1;
-@@ -271,6 +273,9 @@ static void cleanup_thread( struct thread *thread )
+@@ -271,6 +273,9 @@
{
int i;
@@ -453,7 +453,7 @@
clear_apc_queue( &thread->system_apc );
clear_apc_queue( &thread->user_apc );
free( thread->req_data );
-@@ -462,6 +467,15 @@ affinity_t get_thread_affinity( struct thread *thread )
+@@ -462,6 +467,15 @@
#define THREAD_PRIORITY_REALTIME_HIGHEST 6
#define THREAD_PRIORITY_REALTIME_LOWEST -7
@@ -469,7 +469,7 @@
/* set all information about a thread */
static void set_thread_info( struct thread *thread,
const struct set_thread_info_request *req )
-@@ -477,17 +491,21 @@ static void set_thread_info( struct thread *thread,
+@@ -477,17 +491,21 @@
}
if ((req->priority >= min && req->priority <= max) ||
req->priority == THREAD_PRIORITY_IDLE ||
@@ -499,7 +499,7 @@
}
else
set_error( STATUS_INVALID_PARAMETER );
-@@ -1315,7 +1333,7 @@ DECL_HANDLER(init_thread)
+@@ -1315,7 +1333,7 @@
/* Raced with SetThreadPriority */
if (current->priority == THREAD_PRIORITY_TIME_CRITICAL)
@@ -508,11 +508,11 @@
reply->pid = get_process_id( process );
reply->tid = get_thread_id( current );
-diff --git a/server/thread.h b/server/thread.h
-index 996d95b..36f09ce 100644
---- a/server/thread.h
-+++ b/server/thread.h
-@@ -87,6 +87,8 @@ struct thread
+Index: wine1.7-1.7.24/server/thread.h
+===================================================================
+--- wine1.7-1.7.24.orig/server/thread.h 2014-08-16 14:40:54.789644794 -0700
++++ wine1.7-1.7.24/server/thread.h 2014-08-16 14:40:54.785644872 -0700
+@@ -87,6 +87,8 @@
timeout_t creation_time; /* Thread creation time */
timeout_t exit_time; /* Thread exit time */
struct token *token; /* security token associated with this thread */
@@ -521,6 +521,3 @@
};
struct thread_snapshot
---
-2.0.0
-
diff -Nru wine1.7-1.7.22/debian/patches/0009-winepulse-Add-initial-stub-for-pulseaudio-support.patch wine1.7-1.7.24/debian/patches/0009-winepulse-Add-initial-stub-for-pulseaudio-support.patch
--- wine1.7-1.7.22/debian/patches/0009-winepulse-Add-initial-stub-for-pulseaudio-support.patch 2014-07-14 08:03:09.000000000 +0000
+++ wine1.7-1.7.24/debian/patches/0009-winepulse-Add-initial-stub-for-pulseaudio-support.patch 2014-08-16 21:41:10.000000000 +0000
@@ -18,11 +18,11 @@
create mode 100644 dlls/winepulse.drv/mmdevdrv.c
create mode 100644 dlls/winepulse.drv/winepulse.drv.spec
-diff --git a/configure b/configure
-index d7efbfd..011b8a3 100755
---- a/configure
-+++ b/configure
-@@ -653,6 +653,8 @@ OSS4_CFLAGS
+Index: wine1.7-1.7.24/configure
+===================================================================
+--- wine1.7-1.7.24.orig/configure 2014-08-16 14:41:06.269423068 -0700
++++ wine1.7-1.7.24/configure 2014-08-16 14:41:06.261423219 -0700
+@@ -653,6 +653,8 @@
ALSA_LIBS
GSTREAMER_LIBS
GSTREAMER_CFLAGS
@@ -31,15 +31,15 @@
GETTEXTPO_LIBS
Z_LIBS
FREETYPE_LIBS
-@@ -824,6 +826,7 @@ with_osmesa
- with_oss
+@@ -826,6 +828,7 @@
+ with_pcap
with_png
with_pthread
+with_pulse
with_sane
with_tiff
with_v4l
-@@ -1263,6 +1266,7 @@ enable_winemapi
+@@ -1265,6 +1268,7 @@
enable_winemp3_acm
enable_wineoss_drv
enable_wineps_drv
@@ -47,15 +47,15 @@
enable_wineqtdecoder
enable_winex11_drv
enable_wing32
-@@ -2092,6 +2096,7 @@ Optional Packages:
- --without-oss do not use the OSS sound support
+@@ -2096,6 +2100,7 @@
+ --without-pcap do not use the Packet Capture library
--without-png do not use PNG
--without-pthread do not use the pthread library
+ --without-pulse do not use PulseAudio sound support
--without-sane do not use SANE (scanner support)
--without-tiff do not use TIFF
--without-v4l do not use v4l1 (v4l support)
-@@ -3333,6 +3338,12 @@ if test "${with_pthread+set}" = set; then :
+@@ -3343,6 +3348,12 @@
fi
@@ -68,7 +68,7 @@
# Check whether --with-sane was given.
if test "${with_sane+set}" = set; then :
withval=$with_sane;
-@@ -12105,6 +12116,87 @@ esac
+@@ -12187,6 +12198,87 @@
fi
fi
@@ -156,7 +156,7 @@
if test "x$with_gstreamer" != "xno"
then
if ${GSTREAMER_CFLAGS:+false} :; then :
-@@ -13416,12 +13508,14 @@ fi
+@@ -13498,12 +13590,14 @@
test -n "$ALSA_LIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO_LIBS" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
@@ -173,7 +173,7 @@
then
as_fn_append wine_warnings "|No sound system was found. Windows applications will be silent."
fi
-@@ -17265,6 +17359,7 @@ wine_fn_config_dll winemp3.acm enable_winemp3_acm
+@@ -17347,6 +17441,7 @@
wine_fn_config_dll wineoss.drv enable_wineoss_drv
wine_fn_config_dll wineps.drv enable_wineps_drv clean,po
wine_fn_config_dll wineps16.drv16 enable_win16
@@ -181,11 +181,11 @@
wine_fn_config_dll wineqtdecoder enable_wineqtdecoder
wine_fn_config_dll winex11.drv enable_winex11_drv
wine_fn_config_dll wing.dll16 enable_win16
-diff --git a/configure.ac b/configure.ac
-index c913f9f..6539100 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -70,6 +70,7 @@ AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],[do not use the OSS sound
+Index: wine1.7-1.7.24/configure.ac
+===================================================================
+--- wine1.7-1.7.24.orig/configure.ac 2014-08-16 14:41:06.269423068 -0700
++++ wine1.7-1.7.24/configure.ac 2014-08-16 14:41:06.265423144 -0700
+@@ -72,6 +72,7 @@
AC_ARG_WITH(png, AS_HELP_STRING([--without-png],[do not use PNG]))
AC_ARG_WITH(pthread, AS_HELP_STRING([--without-pthread],[do not use the pthread library]),
[if test "x$withval" = "xno"; then ac_cv_header_pthread_h=no; fi])
@@ -193,7 +193,7 @@
AC_ARG_WITH(sane, AS_HELP_STRING([--without-sane],[do not use SANE (scanner support)]))
AC_ARG_WITH(tiff, AS_HELP_STRING([--without-tiff],[do not use TIFF]))
AC_ARG_WITH(v4l, AS_HELP_STRING([--without-v4l],[do not use v4l1 (v4l support)]))
-@@ -1518,6 +1519,30 @@ then
+@@ -1537,6 +1538,30 @@
[GetText ${notice_platform}development files not found (or too old), po files can't be rebuilt.])
fi
@@ -224,7 +224,7 @@
dnl **** Check for gstreamer ****
if test "x$with_gstreamer" != "xno"
then
-@@ -1736,13 +1761,15 @@ fi
+@@ -1755,13 +1780,15 @@
dnl **** Disable unsupported winmm drivers ****
test -n "$ALSA_LIBS" || enable_winealsa_drv=${enable_winealsa_drv:-no}
test -n "$COREAUDIO_LIBS" || enable_winecoreaudio_drv=${enable_winecoreaudio_drv:-no}
@@ -242,7 +242,7 @@
then
WINE_WARNING([No sound system was found. Windows applications will be silent.])
fi
-@@ -3239,6 +3266,7 @@ WINE_CONFIG_DLL(winemp3.acm)
+@@ -3258,6 +3285,7 @@
WINE_CONFIG_DLL(wineoss.drv)
WINE_CONFIG_DLL(wineps.drv,,[clean,po])
WINE_CONFIG_DLL(wineps16.drv16,enable_win16)
@@ -250,11 +250,11 @@
WINE_CONFIG_DLL(wineqtdecoder)
WINE_CONFIG_DLL(winex11.drv)
WINE_CONFIG_DLL(wing.dll16,enable_win16)
-diff --git a/dlls/mmdevapi/main.c b/dlls/mmdevapi/main.c
-index 447813f..b9ae99e 100644
---- a/dlls/mmdevapi/main.c
-+++ b/dlls/mmdevapi/main.c
-@@ -110,7 +110,7 @@ static BOOL init_driver(void)
+Index: wine1.7-1.7.24/dlls/mmdevapi/main.c
+===================================================================
+--- wine1.7-1.7.24.orig/dlls/mmdevapi/main.c 2014-08-16 14:41:06.269423068 -0700
++++ wine1.7-1.7.24/dlls/mmdevapi/main.c 2014-08-16 14:41:06.265423144 -0700
+@@ -110,7 +110,7 @@
{
static const WCHAR drv_value[] = {'A','u','d','i','o',0};
@@ -263,11 +263,10 @@
'c','o','r','e','a','u','d','i','o',0};
DriverFuncs driver;
-diff --git a/dlls/winepulse.drv/Makefile.in b/dlls/winepulse.drv/Makefile.in
-new file mode 100644
-index 0000000..158bbc0
---- /dev/null
-+++ b/dlls/winepulse.drv/Makefile.in
+Index: wine1.7-1.7.24/dlls/winepulse.drv/Makefile.in
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ wine1.7-1.7.24/dlls/winepulse.drv/Makefile.in 2014-08-16 14:41:06.265423144 -0700
@@ -0,0 +1,7 @@
+MODULE = winepulse.drv
+IMPORTS = dxguid uuid winmm user32 advapi32 ole32
@@ -276,11 +275,10 @@
+
+C_SRCS = \
+ mmdevdrv.c
-diff --git a/dlls/winepulse.drv/mmdevdrv.c b/dlls/winepulse.drv/mmdevdrv.c
-new file mode 100644
-index 0000000..d187bdc
---- /dev/null
-+++ b/dlls/winepulse.drv/mmdevdrv.c
+Index: wine1.7-1.7.24/dlls/winepulse.drv/mmdevdrv.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ wine1.7-1.7.24/dlls/winepulse.drv/mmdevdrv.c 2014-08-16 14:41:06.265423144 -0700
@@ -0,0 +1,290 @@
+/*
+ * Copyright 2011-2012 Maarten Lankhorst
@@ -572,17 +570,13 @@
+ *out = NULL;
+ return E_NOTIMPL;
+}
-diff --git a/dlls/winepulse.drv/winepulse.drv.spec b/dlls/winepulse.drv/winepulse.drv.spec
-new file mode 100644
-index 0000000..a089166
---- /dev/null
-+++ b/dlls/winepulse.drv/winepulse.drv.spec
+Index: wine1.7-1.7.24/dlls/winepulse.drv/winepulse.drv.spec
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ wine1.7-1.7.24/dlls/winepulse.drv/winepulse.drv.spec 2014-08-16 14:41:06.265423144 -0700
@@ -0,0 +1,5 @@
+# MMDevAPI driver functions
+@ stdcall -private GetPriority() AUDDRV_GetPriority
+@ stdcall -private GetEndpointIDs(long ptr ptr ptr ptr) AUDDRV_GetEndpointIDs
+@ stdcall -private GetAudioEndpoint(ptr ptr long ptr) AUDDRV_GetAudioEndpoint
+@ stdcall -private GetAudioSessionManager(ptr ptr) AUDDRV_GetAudioSessionManager
---
-2.0.0
-
diff -Nru wine1.7-1.7.22/dlls/amstream/mediastreamfilter.c wine1.7-1.7.24/dlls/amstream/mediastreamfilter.c
--- wine1.7-1.7.22/dlls/amstream/mediastreamfilter.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/amstream/mediastreamfilter.c 2014-08-08 20:19:29.000000000 +0000
@@ -238,7 +238,7 @@
static ULONG WINAPI MediaStreamFilterImpl_Release(IMediaStreamFilter *iface)
{
IMediaStreamFilterImpl *This = impl_from_IMediaStreamFilter(iface);
- ULONG ref = BaseFilterImpl_Release(&This->filter.IBaseFilter_iface);
+ ULONG ref = InterlockedDecrement(&This->filter.refCount);
TRACE("(%p)->(): new ref = %u\n", iface, ref);
@@ -250,6 +250,7 @@
IMediaStream_Release(This->streams[i]);
IPin_Release(This->pins[i]);
}
+ BaseFilter_Destroy(&This->filter);
HeapFree(GetProcessHeap(), 0, This);
}
diff -Nru wine1.7-1.7.22/dlls/atl/atl_ax.c wine1.7-1.7.24/dlls/atl/atl_ax.c
--- wine1.7-1.7.22/dlls/atl/atl_ax.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/atl/atl_ax.c 2014-08-08 20:19:29.000000000 +0000
@@ -1382,3 +1382,29 @@
FIXME("(%p %s %p %p %lx)\n", hInstance, debugstr_a(lpTemplateName), hWndParent, lpDialogProc, dwInitParam);
return 0;
}
+
+#if _ATL_VER >= _ATL_VER_80
+
+/***********************************************************************
+ * AtlAxCreateControlLic [atl100.59]
+ *
+ */
+HRESULT WINAPI AtlAxCreateControlLic(const WCHAR *lpTricsData, HWND hwnd, IStream *stream, IUnknown **container, BSTR lic)
+{
+ FIXME("(%s %p %p %p %s)\n", debugstr_w(lpTricsData), hwnd, stream, container, debugstr_w(lic));
+ return E_NOTIMPL;
+}
+
+/***********************************************************************
+ * AtlAxCreateControlLicEx [atl100.60]
+ *
+ */
+HRESULT WINAPI AtlAxCreateControlLicEx(const WCHAR *lpTricsData, HWND hwnd, IStream *stream,
+ IUnknown **container, IUnknown **control, REFIID iidSink, IUnknown *punkSink, BSTR lic)
+{
+ FIXME("(%s %p %p %p %p %s %p %s)\n", debugstr_w(lpTricsData), hwnd, stream, container, control,
+ debugstr_guid(iidSink), punkSink, debugstr_w(lic));
+ return E_NOTIMPL;
+}
+
+#endif
diff -Nru wine1.7-1.7.22/dlls/atl100/atl100.spec wine1.7-1.7.24/dlls/atl100/atl100.spec
--- wine1.7-1.7.22/dlls/atl100/atl100.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/atl100/atl100.spec 2014-08-08 20:19:29.000000000 +0000
@@ -40,8 +40,8 @@
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
-59 stub AtlAxCreateControlLic
-60 stub AtlAxCreateControlLicEx
+59 stdcall AtlAxCreateControlLic(wstr long ptr ptr wstr)
+60 stdcall AtlAxCreateControlLicEx(wstr long ptr ptr ptr ptr ptr wstr)
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
diff -Nru wine1.7-1.7.22/dlls/atl110/atl110.spec wine1.7-1.7.24/dlls/atl110/atl110.spec
--- wine1.7-1.7.22/dlls/atl110/atl110.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/atl110/atl110.spec 2014-08-08 20:19:29.000000000 +0000
@@ -40,8 +40,8 @@
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
-59 stub AtlAxCreateControlLic
-60 stub AtlAxCreateControlLicEx
+59 stdcall AtlAxCreateControlLic(wstr long ptr ptr wstr)
+60 stdcall AtlAxCreateControlLicEx(wstr long ptr ptr ptr ptr ptr wstr)
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
diff -Nru wine1.7-1.7.22/dlls/atl80/atl80.spec wine1.7-1.7.24/dlls/atl80/atl80.spec
--- wine1.7-1.7.22/dlls/atl80/atl80.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/atl80/atl80.spec 2014-08-08 20:19:29.000000000 +0000
@@ -43,8 +43,8 @@
55 stub AtlUnRegisterTypeLib
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
-59 stub AtlAxCreateControlLic
-60 stub AtlAxCreateControlLicEx
+59 stdcall AtlAxCreateControlLic(wstr long ptr ptr wstr)
+60 stdcall AtlAxCreateControlLicEx(wstr long ptr ptr ptr ptr ptr wstr)
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
diff -Nru wine1.7-1.7.22/dlls/atl90/atl90.spec wine1.7-1.7.24/dlls/atl90/atl90.spec
--- wine1.7-1.7.22/dlls/atl90/atl90.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/atl90/atl90.spec 2014-08-08 20:19:29.000000000 +0000
@@ -40,8 +40,8 @@
54 stdcall AtlGetObjectSourceInterface(ptr ptr ptr ptr ptr)
56 stdcall AtlLoadTypeLib(long wstr ptr ptr)
58 stdcall AtlModuleAddTermFunc(ptr ptr long)
-59 stub AtlAxCreateControlLic
-60 stub AtlAxCreateControlLicEx
+59 stdcall AtlAxCreateControlLic(wstr long ptr ptr wstr)
+60 stdcall AtlAxCreateControlLicEx(wstr long ptr ptr ptr ptr ptr wstr)
61 stdcall AtlCreateRegistrar(ptr)
62 stub AtlWinModuleRegisterClassExW
63 stub AtlWinModuleRegisterClassExA
diff -Nru wine1.7-1.7.22/dlls/comdlg32/cdlg.h wine1.7-1.7.24/dlls/comdlg32/cdlg.h
--- wine1.7-1.7.22/dlls/comdlg32/cdlg.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/comdlg32/cdlg.h 2014-08-08 20:19:29.000000000 +0000
@@ -176,6 +176,7 @@
#define IDS_SAVE 1203
#define IDS_SAVE_AS 1204
#define IDS_OPEN_FILE 1205
+#define IDS_SELECT_FOLDER 1206
#define IDS_FAKEDOCTEXT 1300
diff -Nru wine1.7-1.7.22/dlls/comdlg32/comdlg32.rc wine1.7-1.7.24/dlls/comdlg32/comdlg32.rc
--- wine1.7-1.7.22/dlls/comdlg32/comdlg32.rc 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/comdlg32/comdlg32.rc 2014-08-08 20:19:29.000000000 +0000
@@ -36,6 +36,7 @@
IDS_INVALID_FILENAME "A filename cannot contain any of the following characters:\n / : < > |"
IDS_PATHNOTEXISTING "Path does not exist"
IDS_FILENOTEXISTING "File does not exist"
+ IDS_INVALID_FOLDERNAME "The selection contains a non-folder object"
}
STRINGTABLE
@@ -142,6 +143,7 @@
IDS_SAVE "Save"
IDS_SAVE_AS "Save As"
IDS_OPEN_FILE "Open File"
+ IDS_SELECT_FOLDER "Select Folder"
}
/*
diff -Nru wine1.7-1.7.22/dlls/comdlg32/filedlgbrowser.h wine1.7-1.7.24/dlls/comdlg32/filedlgbrowser.h
--- wine1.7-1.7.22/dlls/comdlg32/filedlgbrowser.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/comdlg32/filedlgbrowser.h 2014-08-08 20:19:29.000000000 +0000
@@ -105,6 +105,7 @@
#define IDS_INVALID_FILENAME 121
#define IDS_PATHNOTEXISTING 122
#define IDS_FILENOTEXISTING 123
+#define IDS_INVALID_FOLDERNAME 124
/* File Dialog Tooltips string IDs */
diff -Nru wine1.7-1.7.22/dlls/comdlg32/itemdlg.c wine1.7-1.7.24/dlls/comdlg32/itemdlg.c
--- wine1.7-1.7.22/dlls/comdlg32/itemdlg.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/comdlg32/itemdlg.c 2014-08-08 20:19:29.000000000 +0000
@@ -346,8 +346,10 @@
UINT attr;
hr = IShellItem_GetAttributes(psi, SFGAO_FOLDER, &attr);
- if(SUCCEEDED(hr) && (attr & SFGAO_FOLDER))
- continue; /* FIXME: FOS_PICKFOLDERS */
+ if(SUCCEEDED(hr) &&
+ (( (This->options & FOS_PICKFOLDERS) && !(attr & SFGAO_FOLDER)) ||
+ (!(This->options & FOS_PICKFOLDERS) && (attr & SFGAO_FOLDER))))
+ continue;
hr = IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &names[valid_count]);
if(SUCCEEDED(hr))
@@ -536,21 +538,42 @@
break;
case ONOPEN_OPEN:
- if(events_OnFileOk(This) != S_OK)
- break;
-
hr = SHGetDesktopFolder(&psf_desktop);
if(SUCCEEDED(hr))
{
if(This->psia_results)
+ {
IShellItemArray_Release(This->psia_results);
+ This->psia_results = NULL;
+ }
hr = SHCreateShellItemArray(NULL, psf_desktop, file_count, (PCUITEMID_CHILD_ARRAY)pidla,
&This->psia_results);
- if(SUCCEEDED(hr))
- ret = S_OK;
IShellFolder_Release(psf_desktop);
+
+ if(FAILED(hr))
+ break;
+
+ if(This->options & FOS_PICKFOLDERS)
+ {
+ SFGAOF attributes;
+ hr = IShellItemArray_GetAttributes(This->psia_results, SIATTRIBFLAGS_AND, SFGAO_FOLDER, &attributes);
+ if(hr != S_OK)
+ {
+ WCHAR buf[64];
+ LoadStringW(COMDLG32_hInstance, IDS_INVALID_FOLDERNAME, buf, sizeof(buf)/sizeof(WCHAR));
+
+ MessageBoxW(This->dlg_hwnd, buf, This->custom_title, MB_OK | MB_ICONEXCLAMATION);
+
+ IShellItemArray_Release(This->psia_results);
+ This->psia_results = NULL;
+ break;
+ }
+ }
+
+ if(events_OnFileOk(This) == S_OK)
+ ret = S_OK;
}
break;
@@ -1817,6 +1840,13 @@
FileDialogImpl *This = impl_from_IFileDialog2(iface);
TRACE("%p (0x%x)\n", This, fos);
+ if( !(This->options & FOS_PICKFOLDERS) && (fos & FOS_PICKFOLDERS) )
+ {
+ WCHAR buf[30];
+ LoadStringW(COMDLG32_hInstance, IDS_SELECT_FOLDER, buf, sizeof(buf)/sizeof(WCHAR));
+ IFileDialog2_SetTitle(iface, buf);
+ }
+
This->options = fos;
return S_OK;
@@ -2848,7 +2878,7 @@
ULONG attr;
TRACE("%p (%p, %p)\n", This, shv, pidl);
- if(!This->filterspec_count)
+ if(!This->filterspec_count && !(This->options & FOS_PICKFOLDERS))
return S_OK;
hr = SHGetIDListFromObject((IUnknown*)shv, &parent_pidl);
@@ -2872,6 +2902,12 @@
return S_OK;
}
+ if((This->options & FOS_PICKFOLDERS) && !(attr & (SFGAO_FOLDER | SFGAO_LINK)))
+ {
+ IShellItem_Release(psi);
+ return S_FALSE;
+ }
+
hr = S_OK;
if(SUCCEEDED(IShellItem_GetDisplayName(psi, SIGDN_PARENTRELATIVEPARSING, &filename)))
{
diff -Nru wine1.7-1.7.22/dlls/crypt32/cert.c wine1.7-1.7.24/dlls/crypt32/cert.c
--- wine1.7-1.7.22/dlls/crypt32/cert.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/cert.c 2014-08-08 20:19:29.000000000 +0000
@@ -1883,6 +1883,12 @@
CertFreeCertificateContext(ret);
ret = NULL;
}
+ if (CRYPT_IsCertificateSelfSigned(pSubjectContext))
+ {
+ CertFreeCertificateContext(ret);
+ ret = NULL;
+ SetLastError(CRYPT_E_SELF_SIGNED);
+ }
}
TRACE("returning %p\n", ret);
return ret;
diff -Nru wine1.7-1.7.22/dlls/crypt32/chain.c wine1.7-1.7.24/dlls/crypt32/chain.c
--- wine1.7-1.7.22/dlls/crypt32/chain.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/chain.c 2014-08-08 20:19:29.000000000 +0000
@@ -265,7 +265,7 @@
LONG ref;
} CertificateChain;
-static BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert)
+BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert)
{
PCERT_EXTENSION ext;
DWORD size;
diff -Nru wine1.7-1.7.22/dlls/crypt32/crypt32_private.h wine1.7-1.7.24/dlls/crypt32/crypt32_private.h
--- wine1.7-1.7.22/dlls/crypt32/crypt32_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/crypt32_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -337,6 +337,7 @@
WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreW(HCRYPTPROV hCryptProv,
DWORD dwFlags, const void *pvPara) DECLSPEC_HIDDEN;
WINECRYPT_CERTSTORE *CRYPT_RootOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags) DECLSPEC_HIDDEN;
+BOOL CRYPT_IsCertificateSelfSigned(PCCERT_CONTEXT cert) DECLSPEC_HIDDEN;
/* Allocates and initializes a certificate chain engine, but without creating
* the root store. Instead, it uses root, and assumes the caller has done any
diff -Nru wine1.7-1.7.22/dlls/crypt32/str.c wine1.7-1.7.24/dlls/crypt32/str.c
--- wine1.7-1.7.22/dlls/crypt32/str.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/str.c 2014-08-08 20:19:29.000000000 +0000
@@ -840,13 +840,14 @@
/* Assumes separators are characters in the 0-255 range */
static BOOL CRYPT_GetNextValueW(LPCWSTR str, DWORD dwFlags, LPCWSTR separators,
- struct X500TokenW *token, LPCWSTR *ppszError)
+ WCHAR *separator_used, struct X500TokenW *token, LPCWSTR *ppszError)
{
BOOL ret = TRUE;
TRACE("(%s, %s, %p, %p)\n", debugstr_w(str), debugstr_w(separators), token,
ppszError);
+ *separator_used = 0;
while (*str && isspaceW(*str))
str++;
if (*str)
@@ -886,6 +887,7 @@
while (*str && (*str >= 0xff || !map[*str]))
str++;
token->end = str;
+ if (map[*str]) *separator_used = *str;
}
}
else
@@ -1077,6 +1079,7 @@
static const WCHAR allSepsWithoutPlus[] = { ',',';','\r','\n',0 };
static const WCHAR allSeps[] = { '+',',',';','\r','\n',0 };
LPCWSTR sep;
+ WCHAR sep_used;
str++;
if (dwStrType & CERT_NAME_STR_COMMA_FLAG)
@@ -1089,11 +1092,14 @@
sep = allSepsWithoutPlus;
else
sep = allSeps;
- ret = CRYPT_GetNextValueW(str, dwStrType, sep, &token,
+ ret = CRYPT_GetNextValueW(str, dwStrType, sep, &sep_used, &token,
ppszError);
if (ret)
{
str = token.end;
+ /* if token.end points to the separator, skip it */
+ if (str && sep_used && *str == sep_used) str++;
+
ret = CRYPT_ValueToRDN(dwCertEncodingType, &info,
keyOID, &token, dwStrType, ppszError);
}
diff -Nru wine1.7-1.7.22/dlls/crypt32/tests/cert.c wine1.7-1.7.24/dlls/crypt32/tests/cert.c
--- wine1.7-1.7.22/dlls/crypt32/tests/cert.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/tests/cert.c 2014-08-08 20:19:29.000000000 +0000
@@ -1564,8 +1564,12 @@
static void testGetIssuerCert(void)
{
BOOL ret;
- PCCERT_CONTEXT parent, child, cert1, cert2;
- DWORD flags = 0xffffffff;
+ PCCERT_CONTEXT parent, child, cert1, cert2, cert3;
+ DWORD flags = 0xffffffff, size;
+ CERT_NAME_BLOB certsubject;
+ BYTE *certencoded;
+ WCHAR rootW[] = {'R', 'O', 'O', 'T', '\0'},
+ certname[] = {'C', 'N', '=', 'd', 'u', 'm', 'm', 'y', ',', ' ', 'T', '=', 'T', 'e', 's', 't', '\0'};
HCERTSTORE store = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, 0,
CERT_STORE_CREATE_NEW_FLAG, NULL);
@@ -1640,6 +1644,7 @@
ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags);
ok(parent == NULL, "Expected no issuer\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
/* Adding an issuer allows one (and only one) issuer to be found */
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
chain10_1, sizeof(chain10_1), CERT_STORE_ADD_ALWAYS, &cert1);
@@ -1648,6 +1653,7 @@
ok(parent == cert1, "Expected cert1 to be the issuer\n");
parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags);
ok(parent == NULL, "Expected only one issuer\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
/* Adding a second issuer allows two issuers to be found - and the second
* issuer is found before the first, implying certs are added to the head
* of a list.
@@ -1661,6 +1667,7 @@
ok(parent == cert1, "Expected cert1 to be the second issuer\n");
parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags);
ok(parent == NULL, "Expected no more than two issuers\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
CertFreeCertificateContext(child);
CertFreeCertificateContext(cert1);
CertFreeCertificateContext(cert2);
@@ -1677,6 +1684,7 @@
ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
parent = CertGetIssuerCertificateFromStore(store, child, NULL, &flags);
ok(parent == NULL, "Expected no issuer\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
/* Adding an issuer allows one (and only one) issuer to be found */
ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING,
chain10_0, sizeof(chain10_0), CERT_STORE_ADD_ALWAYS, &cert1);
@@ -1685,6 +1693,7 @@
ok(parent == cert1, "Expected cert1 to be the issuer\n");
parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags);
ok(parent == NULL, "Expected only one issuer\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
/* Adding a second issuer allows two issuers to be found - and the second
* issuer is found before the first, implying certs are added to the head
* of a list.
@@ -1698,10 +1707,48 @@
ok(parent == cert1, "Expected cert1 to be the second issuer\n");
parent = CertGetIssuerCertificateFromStore(store, child, parent, &flags);
ok(parent == NULL, "Expected no more than two issuers\n");
+ ok(GetLastError() == CRYPT_E_NOT_FOUND, "Expected CRYPT_E_NOT_FOUND, got %08X\n", GetLastError());
+
+ /* Self-sign a certificate, add to the store and test getting the issuer */
+ size = 0;
+ ok(CertStrToNameW(X509_ASN_ENCODING, certname, CERT_X500_NAME_STR, NULL, NULL, &size, NULL),
+ "CertStrToName should have worked\n");
+ certencoded = HeapAlloc(GetProcessHeap(), 0, size);
+ ok(CertStrToNameW(X509_ASN_ENCODING, certname, CERT_X500_NAME_STR, NULL, certencoded, &size, NULL),
+ "CertStrToName should have worked\n");
+ certsubject.pbData = certencoded;
+ certsubject.cbData = size;
+ cert3 = CertCreateSelfSignCertificate(0, &certsubject, 0, NULL, NULL, NULL, NULL, NULL);
+ ok(cert3 != NULL, "CertCreateSelfSignCertificate should have worked\n");
+ ret = CertAddCertificateContextToStore(store, cert3, CERT_STORE_ADD_REPLACE_EXISTING, 0);
+ ok(ret, "CertAddEncodedCertificateToStore failed: %08x\n", GetLastError());
+ CertFreeCertificateContext(cert3);
+ cert3 = CertEnumCertificatesInStore(store, NULL);
+ ok(cert3 != NULL, "CertEnumCertificatesInStore should have worked\n");
+ SetLastError(0xdeadbeef);
+ flags = 0;
+ parent = CertGetIssuerCertificateFromStore(store, cert3, NULL, &flags);
+ ok(!parent, "Expected NULL\n");
+ ok(GetLastError() == CRYPT_E_SELF_SIGNED,
+ "Expected CRYPT_E_SELF_SIGNED, got %08X\n", GetLastError());
CertFreeCertificateContext(child);
CertFreeCertificateContext(cert1);
CertFreeCertificateContext(cert2);
CertCloseStore(store, 0);
+ HeapFree(GetProcessHeap(), 0, certencoded);
+
+ /* Test root storage self-signed certificate */
+ store = CertOpenStore(CERT_STORE_PROV_SYSTEM, 0, 0, CERT_SYSTEM_STORE_CURRENT_USER, rootW);
+ ok(store != NULL, "CertOpenStore failed: %08x\n", GetLastError());
+ flags = 0;
+ cert1 = CertEnumCertificatesInStore(store, NULL);
+ ok(cert1 != NULL, "CertEnumCertificatesInStore should have worked\n");
+ SetLastError(0xdeadbeef);
+ parent = CertGetIssuerCertificateFromStore(store, cert1, NULL, &flags);
+ ok(!parent, "Expected NULL\n");
+ ok(GetLastError() == CRYPT_E_SELF_SIGNED,
+ "Expected CRYPT_E_SELF_SIGNED, got %08X\n", GetLastError());
+ CertCloseStore(store, 0);
}
static void testCryptHashCert(void)
diff -Nru wine1.7-1.7.22/dlls/crypt32/tests/str.c wine1.7-1.7.24/dlls/crypt32/tests/str.c
--- wine1.7-1.7.22/dlls/crypt32/tests/str.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/crypt32/tests/str.c 2014-08-08 20:19:29.000000000 +0000
@@ -450,6 +450,15 @@
static BYTE encodedNewlineCN[] = {
0x30,0x11,0x31,0x0f,0x30,0x0d,0x06,0x03,0x55,0x04,0x03,0x1e,0x06,0x00,0x61,
0x00,0x0a,0x00,0x62 };
+static BYTE encodedDummyCN[] = {
+0x30,0x1F,0x31,0x0E,0x30,0x0C,0x06,0x03,0x55,0x04,0x03,0x13,0x05,0x64,0x75,
+0x6D,0x6D,0x79,0x31,0x0D,0x30,0x0B,0x06,0x03,0x55,0x04,0x0C,0x13,0x04,0x74,
+0x65,0x73,0x74 };
+static BYTE encodedFields[] = {
+0x30,0x2F,0x31,0x12,0x30,0x10,0x06,0x03,0x55,0x04,0x03,0x13,0x09,0x57,0x69,
+0x6E,0x65,0x20,0x54,0x65,0x73,0x74,0x31,0x0C,0x30,0x0A,0x06,0x03,0x55,0x04,
+0x0C,0x13,0x03,0x31,0x32,0x33,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,
+0x13,0x02,0x42,0x52 };
static void test_CertNameToStrA(void)
{
@@ -756,6 +765,8 @@
{ "CN=\">\"", sizeof(encodedGreaterThanCN), encodedGreaterThanCN },
{ "CN=\"#\"", sizeof(encodedHashCN), encodedHashCN },
{ "CN=\";\"", sizeof(encodedSemiCN), encodedSemiCN },
+ { "CN=dummy,T=test", sizeof(encodedDummyCN), encodedDummyCN },
+ { " CN = Wine Test,T = 123, C = BR", sizeof(encodedFields), encodedFields },
};
static void test_CertStrToNameA(void)
@@ -849,6 +860,10 @@
static const WCHAR simpleCN2_W[] = { 'C','N','=','"','1','"',0 };
static const WCHAR simpleCN3_W[] = { 'C','N',' ','=',' ','"','1','"',0 };
static const WCHAR japaneseCN_W[] = { 'C','N','=',0x226f,0x575b,0 };
+static const WCHAR dummyCN_W[] = { 'C','N','=','d','u','m','m','y',',','T','=','t','e','s','t',0 };
+static const WCHAR encodedFields_W[] = { ' ','C','N',' ','=',' ',' ',' ','W','i','n','e',' ','T',
+ 'e','s','t',',','T',' ','=',' ','1','2','3',',',' ','C',
+ ' ','=',' ','B','R',0 };
static const BYTE encodedJapaneseCN[] = { 0x30,0x0f,0x31,0x0d,0x30,0x0b,0x06,
0x03,0x55,0x04,0x03,0x1e,0x04,0x22,0x6f,0x57,0x5b };
@@ -867,6 +882,8 @@
{ greaterThanCN_W, sizeof(encodedGreaterThanCN), encodedGreaterThanCN },
{ hashCN_W, sizeof(encodedHashCN), encodedHashCN },
{ semiCN_W, sizeof(encodedSemiCN), encodedSemiCN },
+ { dummyCN_W, sizeof(encodedDummyCN), encodedDummyCN },
+ { encodedFields_W, sizeof(encodedFields), encodedFields },
};
static void test_CertStrToNameW(void)
@@ -922,7 +939,7 @@
size);
if (ret)
ok(!memcmp(buf, namesW[i].encoded, size),
- "Index %d: unexpected value\n", i);
+ "Index %d: unexpected value for string %s\n", i, wine_dbgstr_w(namesW[i].x500));
}
}
diff -Nru wine1.7-1.7.22/dlls/cryptnet/cryptnet_main.c wine1.7-1.7.24/dlls/cryptnet/cryptnet_main.c
--- wine1.7-1.7.22/dlls/cryptnet/cryptnet_main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/cryptnet/cryptnet_main.c 2014-08-08 20:19:29.000000000 +0000
@@ -1553,7 +1553,8 @@
endTime = timeout = 0;
if (!ret)
error = GetLastError();
- for (j = 0; !error && j < urlArray->cUrl; j++)
+ /* continue looping if one was offline; break if revoked or timed out */
+ for (j = 0; (!error || error == CRYPT_E_REVOCATION_OFFLINE) && j < urlArray->cUrl; j++)
{
PCCRL_CONTEXT crl;
diff -Nru wine1.7-1.7.22/dlls/d2d1/d2d1_private.h wine1.7-1.7.24/dlls/d2d1/d2d1_private.h
--- wine1.7-1.7.22/dlls/d2d1/d2d1_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/d2d1_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -28,6 +28,8 @@
{
ID2D1RenderTarget ID2D1RenderTarget_iface;
LONG refcount;
+
+ D2D1_MATRIX_3X2_F transform;
};
void d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2D1Factory *factory,
@@ -55,4 +57,13 @@
const D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES *gradient_brush_desc, const D2D1_BRUSH_PROPERTIES *brush_desc,
ID2D1GradientStopCollection *gradient) DECLSPEC_HIDDEN;
+struct d2d_stroke_style
+{
+ ID2D1StrokeStyle ID2D1StrokeStyle_iface;
+ LONG refcount;
+};
+
+void d2d_stroke_style_init(struct d2d_stroke_style *style, ID2D1Factory *factory,
+ const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count) DECLSPEC_HIDDEN;
+
#endif /* __WINE_D2D1_PRIVATE_H */
diff -Nru wine1.7-1.7.22/dlls/d2d1/d2d1.spec wine1.7-1.7.24/dlls/d2d1/d2d1.spec
--- wine1.7-1.7.22/dlls/d2d1/d2d1.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/d2d1.spec 2014-08-08 20:19:29.000000000 +0000
@@ -1,5 +1,5 @@
@ stdcall D2D1CreateFactory(long ptr ptr ptr)
-@ stub D2D1MakeRotateMatrix
+@ stdcall D2D1MakeRotateMatrix(float float float ptr)
@ stub D2D1MakeSkewMatrix
@ stub D2D1IsMatrixInvertible
@ stub D2D1InvertMatrix
diff -Nru wine1.7-1.7.22/dlls/d2d1/factory.c wine1.7-1.7.24/dlls/d2d1/factory.c
--- wine1.7-1.7.22/dlls/d2d1/factory.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/factory.c 2014-08-08 20:19:29.000000000 +0000
@@ -144,10 +144,20 @@
const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count,
ID2D1StrokeStyle **stroke_style)
{
- FIXME("iface %p, desc %p, dashes %p, dash_count %u, stroke_style %p stub!\n",
+ struct d2d_stroke_style *object;
+
+ TRACE("iface %p, desc %p, dashes %p, dash_count %u, stroke_style %p.\n",
iface, desc, dashes, dash_count, stroke_style);
- return E_NOTIMPL;
+ if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object))))
+ return E_OUTOFMEMORY;
+
+ d2d_stroke_style_init(object, iface, desc, dashes, dash_count);
+
+ TRACE("Created stroke style %p.\n", object);
+ *stroke_style = &object->ID2D1StrokeStyle_iface;
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_CreateDrawingStateBlock(ID2D1Factory *iface,
@@ -254,3 +264,22 @@
return hr;
}
+
+void WINAPI D2D1MakeRotateMatrix(float angle, D2D1_POINT_2F center, D2D1_MATRIX_3X2_F *matrix)
+{
+ float theta, sin_theta, cos_theta;
+
+ TRACE("angle %.8e, center {%.8e, %.8e}, matrix %p.\n", angle, center.x, center.y, matrix);
+
+ theta = angle * (M_PI / 180.0f);
+ sin_theta = sinf(theta);
+ cos_theta = cosf(theta);
+
+ /* translate(center) * rotate(theta) * translate(-center) */
+ matrix->_11 = cos_theta;
+ matrix->_12 = sin_theta;
+ matrix->_21 = -sin_theta;
+ matrix->_22 = cos_theta;
+ matrix->_31 = center.x - center.x * cos_theta + center.y * sin_theta;
+ matrix->_32 = center.y - center.x * sin_theta - center.y * cos_theta;
+}
diff -Nru wine1.7-1.7.22/dlls/d2d1/Makefile.in wine1.7-1.7.24/dlls/d2d1/Makefile.in
--- wine1.7-1.7.22/dlls/d2d1/Makefile.in 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/Makefile.in 2014-08-08 20:19:29.000000000 +0000
@@ -5,6 +5,7 @@
C_SRCS = \
brush.c \
factory.c \
- render_target.c
+ render_target.c \
+ stroke.c
RC_SRCS = version.rc
diff -Nru wine1.7-1.7.22/dlls/d2d1/render_target.c wine1.7-1.7.24/dlls/d2d1/render_target.c
--- wine1.7-1.7.22/dlls/d2d1/render_target.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/render_target.c 2014-08-08 20:19:29.000000000 +0000
@@ -316,13 +316,21 @@
static void STDMETHODCALLTYPE d2d_d3d_render_target_SetTransform(ID2D1RenderTarget *iface,
const D2D1_MATRIX_3X2_F *transform)
{
- FIXME("iface %p, transform %p stub!\n", iface, transform);
+ struct d2d_d3d_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
+
+ TRACE("iface %p, transform %p.\n", iface, transform);
+
+ render_target->transform = *transform;
}
static void STDMETHODCALLTYPE d2d_d3d_render_target_GetTransform(ID2D1RenderTarget *iface,
D2D1_MATRIX_3X2_F *transform)
{
- FIXME("iface %p, transform %p stub!\n", iface, transform);
+ struct d2d_d3d_render_target *render_target = impl_from_ID2D1RenderTarget(iface);
+
+ TRACE("iface %p, transform %p.\n", iface, transform);
+
+ *transform = render_target->transform;
}
static void STDMETHODCALLTYPE d2d_d3d_render_target_SetAntialiasMode(ID2D1RenderTarget *iface,
@@ -556,8 +564,17 @@
void d2d_d3d_render_target_init(struct d2d_d3d_render_target *render_target, ID2D1Factory *factory,
IDXGISurface *surface, const D2D1_RENDER_TARGET_PROPERTIES *desc)
{
+ static const D2D1_MATRIX_3X2_F identity =
+ {
+ 1.0f, 0.0f,
+ 0.0f, 1.0f,
+ 0.0f, 0.0f,
+ };
+
FIXME("Ignoring render target properties.\n");
render_target->ID2D1RenderTarget_iface.lpVtbl = &d2d_d3d_render_target_vtbl;
render_target->refcount = 1;
+
+ render_target->transform = identity;
}
diff -Nru wine1.7-1.7.22/dlls/d2d1/stroke.c wine1.7-1.7.24/dlls/d2d1/stroke.c
--- wine1.7-1.7.22/dlls/d2d1/stroke.c 1970-01-01 00:00:00.000000000 +0000
+++ wine1.7-1.7.24/dlls/d2d1/stroke.c 2014-08-08 20:19:29.000000000 +0000
@@ -0,0 +1,165 @@
+/*
+ * Copyright 2014 Henri Verbeet for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include "wine/port.h"
+
+#include "d2d1_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d2d);
+
+static inline struct d2d_stroke_style *impl_from_ID2D1StrokeStyle(ID2D1StrokeStyle *iface)
+{
+ return CONTAINING_RECORD(iface, struct d2d_stroke_style, ID2D1StrokeStyle_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE d2d_stroke_style_QueryInterface(ID2D1StrokeStyle *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_ID2D1StrokeStyle)
+ || IsEqualGUID(iid, &IID_ID2D1Resource)
+ || IsEqualGUID(iid, &IID_IUnknown))
+ {
+ ID2D1StrokeStyle_AddRef(iface);
+ *out = iface;
+ return S_OK;
+ }
+
+ WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE d2d_stroke_style_AddRef(ID2D1StrokeStyle *iface)
+{
+ struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle(iface);
+ ULONG refcount = InterlockedIncrement(&style->refcount);
+
+ TRACE("%p increasing refcount to %u.\n", iface, refcount);
+
+ return refcount;
+}
+
+static ULONG STDMETHODCALLTYPE d2d_stroke_style_Release(ID2D1StrokeStyle *iface)
+{
+ struct d2d_stroke_style *style = impl_from_ID2D1StrokeStyle(iface);
+ ULONG refcount = InterlockedDecrement(&style->refcount);
+
+ TRACE("%p decreasing refcount to %u.\n", iface, refcount);
+
+ if (!refcount)
+ HeapFree(GetProcessHeap(), 0, style);
+
+ return refcount;
+}
+
+static void STDMETHODCALLTYPE d2d_stroke_style_GetFactory(ID2D1StrokeStyle *iface, ID2D1Factory **factory)
+{
+ FIXME("iface %p, factory %p stub!\n", iface, factory);
+
+ *factory = NULL;
+}
+
+static D2D1_CAP_STYLE STDMETHODCALLTYPE d2d_stroke_style_GetStartCap(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return D2D1_CAP_STYLE_FLAT;
+}
+
+static D2D1_CAP_STYLE STDMETHODCALLTYPE d2d_stroke_style_GetEndCap(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return D2D1_CAP_STYLE_FLAT;
+}
+
+static D2D1_CAP_STYLE STDMETHODCALLTYPE d2d_stroke_style_GetDashCap(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return D2D1_CAP_STYLE_FLAT;
+}
+
+static float STDMETHODCALLTYPE d2d_stroke_style_GetMiterLimit(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return 0.0f;
+}
+
+static D2D1_LINE_JOIN STDMETHODCALLTYPE d2d_stroke_style_GetLineJoin(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return D2D1_LINE_JOIN_MITER;
+}
+
+static float STDMETHODCALLTYPE d2d_stroke_style_GetDashOffset(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return 0.0f;
+}
+
+static D2D1_DASH_STYLE STDMETHODCALLTYPE d2d_stroke_style_GetDashStyle(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return D2D1_DASH_STYLE_SOLID;
+}
+
+static UINT32 STDMETHODCALLTYPE d2d_stroke_style_GetDashesCount(ID2D1StrokeStyle *iface)
+{
+ FIXME("iface %p stub!\n", iface);
+
+ return 0;
+}
+
+static void STDMETHODCALLTYPE d2d_stroke_style_GetDashes(ID2D1StrokeStyle *iface, float *dashes, UINT32 count)
+{
+ FIXME("iface %p, dashes %p, count %u stub!\n", iface, dashes, count);
+}
+
+static const struct ID2D1StrokeStyleVtbl d2d_stroke_style_vtbl =
+{
+ d2d_stroke_style_QueryInterface,
+ d2d_stroke_style_AddRef,
+ d2d_stroke_style_Release,
+ d2d_stroke_style_GetFactory,
+ d2d_stroke_style_GetStartCap,
+ d2d_stroke_style_GetEndCap,
+ d2d_stroke_style_GetDashCap,
+ d2d_stroke_style_GetMiterLimit,
+ d2d_stroke_style_GetLineJoin,
+ d2d_stroke_style_GetDashOffset,
+ d2d_stroke_style_GetDashStyle,
+ d2d_stroke_style_GetDashesCount,
+ d2d_stroke_style_GetDashes,
+};
+
+void d2d_stroke_style_init(struct d2d_stroke_style *style, ID2D1Factory *factory,
+ const D2D1_STROKE_STYLE_PROPERTIES *desc, const float *dashes, UINT32 dash_count)
+{
+ FIXME("Ignoring stroke style properties.\n");
+
+ style->ID2D1StrokeStyle_iface.lpVtbl = &d2d_stroke_style_vtbl;
+ style->refcount = 1;
+}
diff -Nru wine1.7-1.7.22/dlls/d3d10core/d3d10core_private.h wine1.7-1.7.24/dlls/d3d10core/d3d10core_private.h
--- wine1.7-1.7.22/dlls/d3d10core/d3d10core_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d10core/d3d10core_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -60,6 +60,7 @@
DXGI_FORMAT dxgi_format_from_wined3dformat(enum wined3d_format_id format) DECLSPEC_HIDDEN;
enum wined3d_format_id wined3dformat_from_dxgi_format(DXGI_FORMAT format) DECLSPEC_HIDDEN;
DWORD wined3d_usage_from_d3d10core(UINT bind_flags, enum D3D10_USAGE usage) DECLSPEC_HIDDEN;
+struct wined3d_resource *wined3d_resource_from_resource(ID3D10Resource *resource) DECLSPEC_HIDDEN;
static inline void read_dword(const char **ptr, DWORD *d)
{
@@ -86,6 +87,7 @@
HRESULT d3d10_texture2d_init(struct d3d10_texture2d *texture, struct d3d10_device *device,
const D3D10_TEXTURE2D_DESC *desc) DECLSPEC_HIDDEN;
+struct d3d10_texture2d *unsafe_impl_from_ID3D10Texture2D(ID3D10Texture2D *iface) DECLSPEC_HIDDEN;
/* ID3D10Texture3D */
struct d3d10_texture3d
diff -Nru wine1.7-1.7.22/dlls/d3d10core/device.c wine1.7-1.7.24/dlls/d3d10core/device.c
--- wine1.7-1.7.22/dlls/d3d10core/device.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d10core/device.c 2014-08-08 20:19:29.000000000 +0000
@@ -514,7 +514,14 @@
static void STDMETHODCALLTYPE d3d10_device_CopyResource(ID3D10Device1 *iface,
ID3D10Resource *dst_resource, ID3D10Resource *src_resource)
{
- FIXME("iface %p, dst_resource %p, src_resource %p stub!\n", iface, dst_resource, src_resource);
+ struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
+ struct d3d10_device *device = impl_from_ID3D10Device(iface);
+
+ TRACE("iface %p, dst_resource %p, src_resource %p.\n", iface, dst_resource, src_resource);
+
+ wined3d_dst_resource = wined3d_resource_from_resource(dst_resource);
+ wined3d_src_resource = wined3d_resource_from_resource(src_resource);
+ wined3d_device_copy_resource(device->wined3d_device, wined3d_dst_resource, wined3d_src_resource);
}
static void STDMETHODCALLTYPE d3d10_device_UpdateSubresource(ID3D10Device1 *iface,
diff -Nru wine1.7-1.7.22/dlls/d3d10core/texture.c wine1.7-1.7.24/dlls/d3d10core/texture.c
--- wine1.7-1.7.22/dlls/d3d10core/texture.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d10core/texture.c 2014-08-08 20:19:29.000000000 +0000
@@ -236,6 +236,14 @@
d3d10_texture2d_GetDesc,
};
+struct d3d10_texture2d *unsafe_impl_from_ID3D10Texture2D(ID3D10Texture2D *iface)
+{
+ if (!iface)
+ return NULL;
+ assert(iface->lpVtbl == &d3d10_texture2d_vtbl);
+ return CONTAINING_RECORD(iface, struct d3d10_texture2d, ID3D10Texture2D_iface);
+}
+
static const struct wined3d_parent_ops d3d10_texture2d_wined3d_parent_ops =
{
d3d10_texture2d_wined3d_object_released,
@@ -253,6 +261,7 @@
if (desc->MipLevels == 1 && desc->ArraySize == 1)
{
+ DXGI_SURFACE_DESC surface_desc;
IWineDXGIDevice *wine_device;
if (FAILED(hr = ID3D10Device1_QueryInterface(&device->ID3D10Device1_iface, &IID_IWineDXGIDevice,
@@ -262,7 +271,12 @@
return E_FAIL;
}
- hr = IWineDXGIDevice_create_surface(wine_device, NULL, 0, NULL,
+ surface_desc.Width = desc->Width;
+ surface_desc.Height = desc->Height;
+ surface_desc.Format = desc->Format;
+ surface_desc.SampleDesc = desc->SampleDesc;
+
+ hr = IWineDXGIDevice_create_surface(wine_device, &surface_desc, 0, NULL,
(IUnknown *)&texture->ID3D10Texture2D_iface, (void **)&texture->dxgi_surface);
IWineDXGIDevice_Release(wine_device);
if (FAILED(hr))
diff -Nru wine1.7-1.7.22/dlls/d3d10core/utils.c wine1.7-1.7.24/dlls/d3d10core/utils.c
--- wine1.7-1.7.22/dlls/d3d10core/utils.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d10core/utils.c 2014-08-08 20:19:29.000000000 +0000
@@ -367,6 +367,28 @@
return wined3d_usage;
}
+struct wined3d_resource *wined3d_resource_from_resource(ID3D10Resource *resource)
+{
+ D3D10_RESOURCE_DIMENSION dimension;
+
+ ID3D10Resource_GetType(resource, &dimension);
+
+ switch (dimension)
+ {
+ case D3D10_RESOURCE_DIMENSION_BUFFER:
+ return wined3d_buffer_get_resource(unsafe_impl_from_ID3D10Buffer(
+ (ID3D10Buffer *)resource)->wined3d_buffer);
+
+ case D3D10_RESOURCE_DIMENSION_TEXTURE2D:
+ return wined3d_texture_get_resource(unsafe_impl_from_ID3D10Texture2D(
+ (ID3D10Texture2D *)resource)->wined3d_texture);
+
+ default:
+ FIXME("Unhandled resource dimension %#x.\n", dimension);
+ return NULL;
+ }
+}
+
void skip_dword_unknown(const char **ptr, unsigned int count)
{
unsigned int i;
diff -Nru wine1.7-1.7.22/dlls/d3d10core/view.c wine1.7-1.7.24/dlls/d3d10core/view.c
--- wine1.7-1.7.22/dlls/d3d10core/view.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d10core/view.c 2014-08-08 20:19:29.000000000 +0000
@@ -25,26 +25,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d10core);
-static struct wined3d_resource *wined3d_resource_from_resource(ID3D10Resource *resource)
-{
- D3D10_RESOURCE_DIMENSION dimension;
-
- ID3D10Resource_GetType(resource, &dimension);
-
- switch(dimension)
- {
- case D3D10_RESOURCE_DIMENSION_BUFFER:
- return wined3d_buffer_get_resource(((struct d3d10_buffer *)resource)->wined3d_buffer);
-
- case D3D10_RESOURCE_DIMENSION_TEXTURE2D:
- return wined3d_texture_get_resource(((struct d3d10_texture2d *)resource)->wined3d_texture);
-
- default:
- FIXME("Unhandled resource dimension %#x.\n", dimension);
- return NULL;
- }
-}
-
static HRESULT set_dsdesc_from_resource(D3D10_DEPTH_STENCIL_VIEW_DESC *desc, ID3D10Resource *resource)
{
D3D10_RESOURCE_DIMENSION dimension;
diff -Nru wine1.7-1.7.22/dlls/d3d8/buffer.c wine1.7-1.7.24/dlls/d3d8/buffer.c
--- wine1.7-1.7.22/dlls/d3d8/buffer.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d8/buffer.c 2014-08-08 20:19:29.000000000 +0000
@@ -131,12 +131,14 @@
static DWORD WINAPI d3d8_vertexbuffer_SetPriority(IDirect3DVertexBuffer8 *iface, DWORD priority)
{
struct d3d8_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer8(iface);
+ struct wined3d_resource *resource;
DWORD previous;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- previous = wined3d_buffer_set_priority(buffer->wined3d_buffer, priority);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ previous = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return previous;
@@ -145,12 +147,14 @@
static DWORD WINAPI d3d8_vertexbuffer_GetPriority(IDirect3DVertexBuffer8 *iface)
{
struct d3d8_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer8(iface);
+ const struct wined3d_resource *resource;
DWORD priority;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- priority = wined3d_buffer_get_priority(buffer->wined3d_buffer);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ priority = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return priority;
@@ -404,12 +408,14 @@
static DWORD WINAPI d3d8_indexbuffer_SetPriority(IDirect3DIndexBuffer8 *iface, DWORD priority)
{
struct d3d8_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer8(iface);
+ struct wined3d_resource *resource;
DWORD previous;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- previous = wined3d_buffer_set_priority(buffer->wined3d_buffer, priority);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ previous = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return previous;
@@ -418,12 +424,14 @@
static DWORD WINAPI d3d8_indexbuffer_GetPriority(IDirect3DIndexBuffer8 *iface)
{
struct d3d8_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer8(iface);
+ const struct wined3d_resource *resource;
DWORD priority;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- priority = wined3d_buffer_get_priority(buffer->wined3d_buffer);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ priority = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return priority;
diff -Nru wine1.7-1.7.22/dlls/d3d8/tests/device.c wine1.7-1.7.24/dlls/d3d8/tests/device.c
--- wine1.7-1.7.22/dlls/d3d8/tests/device.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d8/tests/device.c 2014-08-08 20:19:29.000000000 +0000
@@ -1919,17 +1919,18 @@
HWND window;
HRESULT hr;
- struct nvertex
+ static const struct
{
- float x, y, z;
- float nx, ny, nz;
+ struct vec3 position;
+ struct vec3 normal;
DWORD diffuse;
- } quad[] =
+ }
+ quad[] =
{
- { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
+ {{0.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
};
window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
diff -Nru wine1.7-1.7.22/dlls/d3d8/tests/visual.c wine1.7-1.7.24/dlls/d3d8/tests/visual.c
--- wine1.7-1.7.22/dlls/d3d8/tests/visual.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d8/tests/visual.c 2014-08-08 20:19:29.000000000 +0000
@@ -133,25 +133,6 @@
return NULL;
}
-struct vertex
-{
- float x, y, z;
- DWORD diffuse;
-};
-
-struct tvertex
-{
- float x, y, z, w;
- DWORD diffuse;
-};
-
-struct nvertex
-{
- float x, y, z;
- float nx, ny, nz;
- DWORD diffuse;
-};
-
static void test_sanity(void)
{
IDirect3DDevice8 *device;
@@ -205,33 +186,44 @@
HWND window;
HRESULT hr;
- static const struct vertex unlitquad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0xffff0000},
- {-1.0f, 0.0f, 0.1f, 0xffff0000},
- { 0.0f, 0.0f, 0.1f, 0xffff0000},
- { 0.0f, -1.0f, 0.1f, 0xffff0000},
- };
- static const struct vertex litquad[] =
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ unlitquad[] =
{
- {-1.0f, 0.0f, 0.1f, 0xff00ff00},
- {-1.0f, 1.0f, 0.1f, 0xff00ff00},
- { 0.0f, 1.0f, 0.1f, 0xff00ff00},
- { 0.0f, 0.0f, 0.1f, 0xff00ff00},
- };
- static const struct nvertex unlitnquad[] =
+ {{-1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{-1.0f, 0.0f, 0.1f}, 0xffff0000},
+ {{ 0.0f, 0.0f, 0.1f}, 0xffff0000},
+ {{ 0.0f, -1.0f, 0.1f}, 0xffff0000},
+ },
+ litquad[] =
{
- { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
+ {{-1.0f, 0.0f, 0.1f}, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 0.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 0.0f, 0.0f, 0.1f}, 0xff00ff00},
};
- static const struct nvertex litnquad[] =
+ static const struct
+ {
+ struct vec3 position;
+ struct vec3 normal;
+ DWORD diffuse;
+ }
+ unlitnquad[] =
+ {
+ {{0.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ },
+ litnquad[] =
{
- { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{0.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{1.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
};
static const WORD Indices[] = {0, 1, 2, 2, 3, 0};
static const D3DMATRIX mat =
@@ -754,12 +746,17 @@
0x00000001, 0x800f0000, 0x90e40000, /* mov r0, v0 */
0x0000ffff
};
- static struct vertex quad[] =
+ static struct
{
- {-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},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ 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},
};
static const DWORD decl[] =
{
@@ -980,10 +977,10 @@
for(j = 0; j < 11; ++j)
{
/* Don't use the whole zrange to prevent rounding errors */
- quad[0].z = 0.001f + j / 10.02f;
- quad[1].z = 0.001f + j / 10.02f;
- quad[2].z = 0.001f + j / 10.02f;
- quad[3].z = 0.001f + j / 10.02f;
+ quad[0].position.z = 0.001f + j / 10.02f;
+ quad[1].position.z = 0.001f + j / 10.02f;
+ quad[2].position.z = 0.001f + j / 10.02f;
+ quad[3].position.z = 0.001f + j / 10.02f;
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff00ff, 1.0f, 0);
ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr);
@@ -1580,33 +1577,43 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, 0.0f, 1.1f, 0xffff0000},
- {-1.0f, 1.0f, 1.1f, 0xffff0000},
- { 1.0f, 0.0f, -1.1f, 0xffff0000},
- { 1.0f, 1.0f, -1.1f, 0xffff0000},
- };
- static const struct vertex quad2[] =
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
{
- {-1.0f, 0.0f, 1.1f, 0xff0000ff},
- {-1.0f, 1.0f, 1.1f, 0xff0000ff},
- { 1.0f, 0.0f, -1.1f, 0xff0000ff},
- { 1.0f, 1.0f, -1.1f, 0xff0000ff},
- };
- static const struct tvertex quad3[] =
+ {{-1.0f, 0.0f, 1.1f}, 0xffff0000},
+ {{-1.0f, 1.0f, 1.1f}, 0xffff0000},
+ {{ 1.0f, 0.0f, -1.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, -1.1f}, 0xffff0000},
+ },
+ quad2[] =
{
- {640.0f, 240.0f, -1.1f, 1.0f, 0xffffff00},
- {640.0f, 480.0f, -1.1f, 1.0f, 0xffffff00},
- { 0.0f, 240.0f, 1.1f, 1.0f, 0xffffff00},
- { 0.0f, 480.0f, 1.1f, 1.0f, 0xffffff00},
+ {{-1.0f, 0.0f, 1.1f}, 0xff0000ff},
+ {{-1.0f, 1.0f, 1.1f}, 0xff0000ff},
+ {{ 1.0f, 0.0f, -1.1f}, 0xff0000ff},
+ {{ 1.0f, 1.0f, -1.1f}, 0xff0000ff},
};
- static const struct tvertex quad4[] =
+ static const struct
+ {
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad3[] =
{
- {640.0f, 240.0f, -1.1f, 1.0f, 0xff00ff00},
- {640.0f, 480.0f, -1.1f, 1.0f, 0xff00ff00},
- { 0.0f, 240.0f, 1.1f, 1.0f, 0xff00ff00},
- { 0.0f, 480.0f, 1.1f, 1.0f, 0xff00ff00},
+ {{640.0f, 240.0f, -1.1f, 1.0f}, 0xffffff00},
+ {{640.0f, 480.0f, -1.1f, 1.0f}, 0xffffff00},
+ {{ 0.0f, 240.0f, 1.1f, 1.0f}, 0xffffff00},
+ {{ 0.0f, 480.0f, 1.1f, 1.0f}, 0xffffff00},
+ },
+ quad4[] =
+ {
+ {{640.0f, 240.0f, -1.1f, 1.0f}, 0xff00ff00},
+ {{640.0f, 480.0f, -1.1f, 1.0f}, 0xff00ff00},
+ {{ 0.0f, 240.0f, 1.1f, 1.0f}, 0xff00ff00},
+ {{ 0.0f, 480.0f, 1.1f, 1.0f}, 0xff00ff00},
};
static const DWORD shader_code[] =
{
@@ -2108,19 +2115,24 @@
HWND window;
HRESULT hr;
- static const struct vertex quad1[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x4000ff00},
- {-1.0f, 0.0f, 0.1f, 0x4000ff00},
- { 1.0f, -1.0f, 0.1f, 0x4000ff00},
- { 1.0f, 0.0f, 0.1f, 0x4000ff00},
- };
- static const struct vertex quad2[] =
- {
- {-1.0f, 0.0f, 0.1f, 0xc00000ff},
- {-1.0f, 1.0f, 0.1f, 0xc00000ff},
- { 1.0f, 0.0f, 0.1f, 0xc00000ff},
- { 1.0f, 1.0f, 0.1f, 0xc00000ff},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x4000ff00},
+ {{-1.0f, 0.0f, 0.1f}, 0x4000ff00},
+ {{ 1.0f, -1.0f, 0.1f}, 0x4000ff00},
+ {{ 1.0f, 0.0f, 0.1f}, 0x4000ff00},
+ },
+ quad2[] =
+ {
+ {{-1.0f, 0.0f, 0.1f}, 0xc00000ff},
+ {{-1.0f, 1.0f, 0.1f}, 0xc00000ff},
+ {{ 1.0f, 0.0f, 0.1f}, 0xc00000ff},
+ {{ 1.0f, 1.0f, 0.1f}, 0xc00000ff},
};
static const float composite_quad[][5] =
{
@@ -2639,47 +2651,57 @@
HWND window;
HRESULT hr;
- static const struct tvertex quad1[] =
+ static const struct
{
- { 0.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f},
- {640.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f},
- { 0.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f},
- {640.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f},
- };
- static const struct tvertex quad2[] =
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad1[] =
{
- { 0.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814},
- {640.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814},
- { 0.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814},
- {640.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814},
- };
- static const struct tvertex quad3[] =
+ {{ 0.0f, 0.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{640.0f, 0.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{ 0.0f, 480.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{640.0f, 480.0f, 5.0f, 1.0f}, 0xff002b7f},
+ },
+ quad2[] =
{
- {112.0f, 108.0f, 5.0f, 1.0f, 0xffffffff},
- {208.0f, 108.0f, 5.0f, 1.0f, 0xffffffff},
- {112.0f, 204.0f, 5.0f, 1.0f, 0xffffffff},
- {208.0f, 204.0f, 5.0f, 1.0f, 0xffffffff},
- };
- static const struct tvertex quad4[] =
+ {{ 0.0f, 300.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 300.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{ 0.0f, 360.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 360.0f, 10.0f, 1.0f}, 0xfff9e814},
+ },
+ quad3[] =
{
- { 42.0f, 41.0f, 10.0f, 1.0f, 0xffffffff},
- {112.0f, 41.0f, 10.0f, 1.0f, 0xffffffff},
- { 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
- {112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
- };
- static const struct vertex quad5[] =
+ {{112.0f, 108.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{208.0f, 108.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 204.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{208.0f, 204.0f, 5.0f, 1.0f}, 0xffffffff},
+ },
+ quad4[] =
{
- { -0.5f, 0.5f, 10.0f, 0xff14f914},
- { 0.5f, 0.5f, 10.0f, 0xff14f914},
- { -0.5f, -0.5f, 10.0f, 0xff14f914},
- { 0.5f, -0.5f, 10.0f, 0xff14f914},
+ {{ 42.0f, 41.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 41.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{ 42.0f, 108.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 108.0f, 10.0f, 1.0f}, 0xffffffff},
};
- static const struct vertex quad6[] =
+ static const struct
{
- { -1.0f, 0.5f, 10.0f, 0xfff91414},
- { 1.0f, 0.5f, 10.0f, 0xfff91414},
- { -1.0f, 0.25f, 10.0f, 0xfff91414},
- { 1.0f, 0.25f, 10.0f, 0xfff91414},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad5[] =
+ {
+ {{-0.5f, 0.5f, 10.0f}, 0xff14f914},
+ {{ 0.5f, 0.5f, 10.0f}, 0xff14f914},
+ {{-0.5f, -0.5f, 10.0f}, 0xff14f914},
+ {{ 0.5f, -0.5f, 10.0f}, 0xff14f914},
+ },
+ quad6[] =
+ {
+ {{-1.0f, 0.5f, 10.0f}, 0xfff91414},
+ {{ 1.0f, 0.5f, 10.0f}, 0xfff91414},
+ {{-1.0f, 0.25f, 10.0f}, 0xfff91414},
+ {{ 1.0f, 0.25f, 10.0f}, 0xfff91414},
};
window = CreateWindowA("static", "d3d8_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -2803,26 +2825,31 @@
HWND window;
HRESULT hr;
- static const struct vertex quad1[] =
+ static const struct
{
- { -1.0, 1.0, 0.33f, 0xff00ff00},
- { 1.0, 1.0, 0.33f, 0xff00ff00},
- { -1.0, -1.0, 0.33f, 0xff00ff00},
- { 1.0, -1.0, 0.33f, 0xff00ff00},
- };
- static const struct vertex quad2[] =
- {
- { -1.0, 1.0, 0.50f, 0xffff00ff},
- { 1.0, 1.0, 0.50f, 0xffff00ff},
- { -1.0, -1.0, 0.50f, 0xffff00ff},
- { 1.0, -1.0, 0.50f, 0xffff00ff},
- };
- static const struct vertex quad3[] =
- {
- { -1.0, 1.0, 0.66f, 0xffff0000},
- { 1.0, 1.0, 0.66f, 0xffff0000},
- { -1.0, -1.0, 0.66f, 0xffff0000},
- { 1.0, -1.0, 0.66f, 0xffff0000},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, 1.0f, 0.33f}, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.33f}, 0xff00ff00},
+ {{-1.0f, -1.0f, 0.33f}, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.33f}, 0xff00ff00},
+ },
+ quad2[] =
+ {
+ {{-1.0f, 1.0f, 0.50f}, 0xffff00ff},
+ {{ 1.0f, 1.0f, 0.50f}, 0xffff00ff},
+ {{-1.0f, -1.0f, 0.50f}, 0xffff00ff},
+ {{ 1.0f, -1.0f, 0.50f}, 0xffff00ff},
+ },
+ quad3[] =
+ {
+ {{-1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{-1.0f, -1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, -1.0f, 0.66f}, 0xffff0000},
};
static const DWORD expected_colors[4][4] =
{
@@ -2959,12 +2986,17 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
{
- { -1.0, 1.0, 0.66f, 0xffff0000},
- { 1.0, 1.0, 0.66f, 0xffff0000},
- { -1.0, -1.0, 0.66f, 0xffff0000},
- { 1.0, -1.0, 0.66f, 0xffff0000},
+ {{-1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{-1.0f, -1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, -1.0f, 0.66f}, 0xffff0000},
};
window = CreateWindowA("static", "d3d8_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
diff -Nru wine1.7-1.7.22/dlls/d3d8/texture.c wine1.7-1.7.24/dlls/d3d8/texture.c
--- wine1.7-1.7.22/dlls/d3d8/texture.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d8/texture.c 2014-08-08 20:19:29.000000000 +0000
@@ -140,12 +140,14 @@
static DWORD WINAPI d3d8_texture_2d_SetPriority(IDirect3DTexture8 *iface, DWORD priority)
{
struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -154,12 +156,14 @@
static DWORD WINAPI d3d8_texture_2d_GetPriority(IDirect3DTexture8 *iface)
{
struct d3d8_texture *texture = impl_from_IDirect3DTexture8(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
@@ -486,12 +490,14 @@
static DWORD WINAPI d3d8_texture_cube_SetPriority(IDirect3DCubeTexture8 *iface, DWORD priority)
{
struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -500,12 +506,14 @@
static DWORD WINAPI d3d8_texture_cube_GetPriority(IDirect3DCubeTexture8 *iface)
{
struct d3d8_texture *texture = impl_from_IDirect3DCubeTexture8(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
@@ -853,12 +861,14 @@
static DWORD WINAPI d3d8_texture_3d_SetPriority(IDirect3DVolumeTexture8 *iface, DWORD priority)
{
struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -867,12 +877,14 @@
static DWORD WINAPI d3d8_texture_3d_GetPriority(IDirect3DVolumeTexture8 *iface)
{
struct d3d8_texture *texture = impl_from_IDirect3DVolumeTexture8(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
diff -Nru wine1.7-1.7.22/dlls/d3d9/buffer.c wine1.7-1.7.24/dlls/d3d9/buffer.c
--- wine1.7-1.7.22/dlls/d3d9/buffer.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d9/buffer.c 2014-08-08 20:19:29.000000000 +0000
@@ -132,12 +132,14 @@
static DWORD WINAPI d3d9_vertexbuffer_SetPriority(IDirect3DVertexBuffer9 *iface, DWORD priority)
{
struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface);
+ struct wined3d_resource *resource;
DWORD previous;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- previous = wined3d_buffer_set_priority(buffer->wined3d_buffer, priority);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ previous = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return previous;
@@ -146,12 +148,14 @@
static DWORD WINAPI d3d9_vertexbuffer_GetPriority(IDirect3DVertexBuffer9 *iface)
{
struct d3d9_vertexbuffer *buffer = impl_from_IDirect3DVertexBuffer9(iface);
+ const struct wined3d_resource *resource;
DWORD priority;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- priority = wined3d_buffer_get_priority(buffer->wined3d_buffer);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ priority = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return priority;
@@ -404,12 +408,14 @@
static DWORD WINAPI d3d9_indexbuffer_SetPriority(IDirect3DIndexBuffer9 *iface, DWORD priority)
{
struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface);
+ struct wined3d_resource *resource;
DWORD previous;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- previous = wined3d_buffer_set_priority(buffer->wined3d_buffer, priority);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ previous = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return previous;
@@ -418,12 +424,14 @@
static DWORD WINAPI d3d9_indexbuffer_GetPriority(IDirect3DIndexBuffer9 *iface)
{
struct d3d9_indexbuffer *buffer = impl_from_IDirect3DIndexBuffer9(iface);
+ const struct wined3d_resource *resource;
DWORD priority;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- priority = wined3d_buffer_get_priority(buffer->wined3d_buffer);
+ resource = wined3d_buffer_get_resource(buffer->wined3d_buffer);
+ priority = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return priority;
diff -Nru wine1.7-1.7.22/dlls/d3d9/tests/visual.c wine1.7-1.7.24/dlls/d3d9/tests/visual.c
--- wine1.7-1.7.22/dlls/d3d9/tests/visual.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d9/tests/visual.c 2014-08-08 20:19:29.000000000 +0000
@@ -209,25 +209,6 @@
}
}
-struct vertex
-{
- float x, y, z;
- DWORD diffuse;
-};
-
-struct tvertex
-{
- float x, y, z, rhw;
- DWORD diffuse;
-};
-
-struct nvertex
-{
- float x, y, z;
- float nx, ny, nz;
- DWORD diffuse;
-};
-
static void test_sanity(void)
{
IDirect3DDevice9 *device;
@@ -289,40 +270,51 @@
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f,
}}};
- static const struct vertex unlitquad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0xffff0000},
- {-1.0f, 0.0f, 0.1f, 0xffff0000},
- { 0.0f, 0.0f, 0.1f, 0xffff0000},
- { 0.0f, -1.0f, 0.1f, 0xffff0000},
- };
- static const struct vertex litquad[] =
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ unlitquad[] =
{
- {-1.0f, 0.0f, 0.1f, 0xff00ff00},
- {-1.0f, 1.0f, 0.1f, 0xff00ff00},
- { 0.0f, 1.0f, 0.1f, 0xff00ff00},
- { 0.0f, 0.0f, 0.1f, 0xff00ff00},
- };
- static const struct vertex lighting_test[] =
+ {{-1.0f, -1.0f, 0.1f}, 0xffff0000},
+ {{-1.0f, 0.0f, 0.1f}, 0xffff0000},
+ {{ 0.0f, 0.0f, 0.1f}, 0xffff0000},
+ {{ 0.0f, -1.0f, 0.1f}, 0xffff0000},
+ },
+ litquad[] =
{
- {-1.0f, -1.0f, 0.1f, 0x8000ff00},
- { 1.0f, -1.0f, 0.1f, 0x80000000},
- {-1.0f, 1.0f, 0.1f, 0x8000ff00},
- { 1.0f, 1.0f, 0.1f, 0x80000000},
- };
- static const struct nvertex unlitnquad[] =
+ {{-1.0f, 0.0f, 0.1f}, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 0.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 0.0f, 0.0f, 0.1f}, 0xff00ff00},
+ },
+ lighting_test[] =
{
- { 0.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
- { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xff0000ff},
+ {{-1.0f, -1.0f, 0.1f}, 0x8000ff00},
+ {{ 1.0f, -1.0f, 0.1f}, 0x80000000},
+ {{-1.0f, 1.0f, 0.1f}, 0x8000ff00},
+ {{ 1.0f, 1.0f, 0.1f}, 0x80000000},
};
- static const struct nvertex litnquad[] =
+ static const struct
+ {
+ struct vec3 position;
+ struct vec3 normal;
+ DWORD diffuse;
+ }
+ unlitnquad[] =
+ {
+ {{0.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ {{1.0f, -1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xff0000ff},
+ },
+ litnquad[] =
{
- { 0.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 0.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
- { 1.0f, 0.0f, 0.1f, 1.0f, 1.0f, 1.0f, 0xffffff00},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{0.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{1.0f, 1.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 1.0f, 1.0f}, 0xffffff00},
};
static const WORD Indices[] = {0, 1, 2, 2, 3, 0};
@@ -1059,27 +1051,32 @@
{640.0f, 480.0f, 1.0f, 1.0f, 0xffffff00, 0xff000000},
{320.0f, 480.0f, 1.0f, 1.0f, 0xffffff00, 0xff000000},
};
- static const struct vertex rev_fog_quads[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ rev_fog_quads[] =
{
- {-1.0f, -1.0f, 0.1f, 0x000000ff},
- {-1.0f, 0.0f, 0.1f, 0x000000ff},
- { 0.0f, 0.0f, 0.1f, 0x000000ff},
- { 0.0f, -1.0f, 0.1f, 0x000000ff},
-
- { 0.0f, -1.0f, 0.9f, 0x000000ff},
- { 0.0f, 0.0f, 0.9f, 0x000000ff},
- { 1.0f, 0.0f, 0.9f, 0x000000ff},
- { 1.0f, -1.0f, 0.9f, 0x000000ff},
-
- { 0.0f, 0.0f, 0.4f, 0x000000ff},
- { 0.0f, 1.0f, 0.4f, 0x000000ff},
- { 1.0f, 1.0f, 0.4f, 0x000000ff},
- { 1.0f, 0.0f, 0.4f, 0x000000ff},
-
- {-1.0f, 0.0f, 0.7f, 0x000000ff},
- {-1.0f, 1.0f, 0.7f, 0x000000ff},
- { 0.0f, 1.0f, 0.7f, 0x000000ff},
- { 0.0f, 0.0f, 0.7f, 0x000000ff},
+ {{-1.0f, -1.0f, 0.1f}, 0x000000ff},
+ {{-1.0f, 0.0f, 0.1f}, 0x000000ff},
+ {{ 0.0f, 0.0f, 0.1f}, 0x000000ff},
+ {{ 0.0f, -1.0f, 0.1f}, 0x000000ff},
+
+ {{ 0.0f, -1.0f, 0.9f}, 0x000000ff},
+ {{ 0.0f, 0.0f, 0.9f}, 0x000000ff},
+ {{ 1.0f, 0.0f, 0.9f}, 0x000000ff},
+ {{ 1.0f, -1.0f, 0.9f}, 0x000000ff},
+
+ {{ 0.0f, 0.0f, 0.4f}, 0x000000ff},
+ {{ 0.0f, 1.0f, 0.4f}, 0x000000ff},
+ {{ 1.0f, 1.0f, 0.4f}, 0x000000ff},
+ {{ 1.0f, 0.0f, 0.4f}, 0x000000ff},
+
+ {{-1.0f, 0.0f, 0.7f}, 0x000000ff},
+ {{-1.0f, 1.0f, 0.7f}, 0x000000ff},
+ {{ 0.0f, 1.0f, 0.7f}, 0x000000ff},
+ {{ 0.0f, 0.0f, 0.7f}, 0x000000ff},
};
static const D3DMATRIX ident_mat =
{{{
@@ -1903,12 +1900,17 @@
0x02000001, 0x800f0800, 0x90e40000, /* mov oC0, v0 */
0x0000ffff
};
- static struct vertex quad[] =
+ struct
{
- {-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 },
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ 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},
};
static const D3DVERTEXELEMENT9 decl_elements[] =
{
@@ -2190,10 +2192,10 @@
for(j=0; j < 11; j++)
{
/* Don't use the whole zrange to prevent rounding errors */
- quad[0].z = 0.001f + (float)j / 10.02f;
- quad[1].z = 0.001f + (float)j / 10.02f;
- quad[2].z = 0.001f + (float)j / 10.02f;
- quad[3].z = 0.001f + (float)j / 10.02f;
+ quad[0].position.z = 0.001f + (float)j / 10.02f;
+ quad[1].position.z = 0.001f + (float)j / 10.02f;
+ quad[2].position.z = 0.001f + (float)j / 10.02f;
+ quad[3].position.z = 0.001f + (float)j / 10.02f;
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffff00ff, 1.0f, 0);
ok(hr == D3D_OK, "IDirect3DDevice9_Clear failed (%08x)\n", hr);
@@ -2622,33 +2624,43 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, 0.0f, 1.1f, 0xffff0000},
- {-1.0f, 1.0f, 1.1f, 0xffff0000},
- { 1.0f, 0.0f, -1.1f, 0xffff0000},
- { 1.0f, 1.0f, -1.1f, 0xffff0000},
- };
- static const struct vertex quad2[] =
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
{
- {-1.0f, 0.0f, 1.1f, 0xff0000ff},
- {-1.0f, 1.0f, 1.1f, 0xff0000ff},
- { 1.0f, 0.0f, -1.1f, 0xff0000ff},
- { 1.0f, 1.0f, -1.1f, 0xff0000ff},
- };
- static const struct tvertex quad3[] =
+ {{-1.0f, 0.0f, 1.1f}, 0xffff0000},
+ {{-1.0f, 1.0f, 1.1f}, 0xffff0000},
+ {{ 1.0f, 0.0f, -1.1f}, 0xffff0000},
+ {{ 1.0f, 1.0f, -1.1f}, 0xffff0000},
+ },
+ quad2[] =
{
- {640.0f, 240.0f, -1.1f, 1.0f, 0xffffff00},
- {640.0f, 480.0f, -1.1f, 1.0f, 0xffffff00},
- { 0.0f, 240.0f, 1.1f, 1.0f, 0xffffff00},
- { 0.0f, 480.0f, 1.1f, 1.0f, 0xffffff00},
+ {{-1.0f, 0.0f, 1.1f}, 0xff0000ff},
+ {{-1.0f, 1.0f, 1.1f}, 0xff0000ff},
+ {{ 1.0f, 0.0f, -1.1f}, 0xff0000ff},
+ {{ 1.0f, 1.0f, -1.1f}, 0xff0000ff},
};
- static const struct tvertex quad4[] =
+ static const struct
+ {
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad3[] =
+ {
+ {{640.0f, 240.0f, -1.1f, 1.0f}, 0xffffff00},
+ {{640.0f, 480.0f, -1.1f, 1.0f}, 0xffffff00},
+ {{ 0.0f, 240.0f, 1.1f, 1.0f}, 0xffffff00},
+ {{ 0.0f, 480.0f, 1.1f, 1.0f}, 0xffffff00},
+ },
+ quad4[] =
{
- {640.0f, 240.0f, -1.1f, 1.0f, 0xff00ff00},
- {640.0f, 480.0f, -1.1f, 1.0f, 0xff00ff00},
- { 0.0f, 240.0f, 1.1f, 1.0f, 0xff00ff00},
- { 0.0f, 480.0f, 1.1f, 1.0f, 0xff00ff00},
+ {{640.0f, 240.0f, -1.1f, 1.0f}, 0xff00ff00},
+ {{640.0f, 480.0f, -1.1f, 1.0f}, 0xff00ff00},
+ {{ 0.0f, 240.0f, 1.1f, 1.0f}, 0xff00ff00},
+ {{ 0.0f, 480.0f, 1.1f, 1.0f}, 0xff00ff00},
};
static const DWORD shader_code[] =
{
@@ -3635,15 +3647,20 @@
LONG ref;
static const short indices[] = {3, 4, 5};
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0xffff0000},
- {-1.0f, 1.0f, 0.1f, 0xffff0000},
- { 1.0f, 1.0f, 0.1f, 0xffff0000},
-
- {-1.0f, -1.0f, 0.1f, 0xff00ff00},
- {-1.0f, 1.0f, 0.1f, 0xff00ff00},
- { 1.0f, 1.0f, 0.1f, 0xff00ff00},
+ 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},
+
+ {{-1.0f, -1.0f, 0.1f}, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.1f}, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.1f}, 0xff00ff00},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -7143,26 +7160,31 @@
1.0f, -1.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
1.0f, 0.0f, 0.1f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f,
};
- static const struct vertex quad1_color[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1_color[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x00ff8040},
+ {{-1.0f, 0.0f, 0.1f}, 0x00ff8040},
+ {{ 0.0f, -1.0f, 0.1f}, 0x00ff8040},
+ {{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
+ },
+ quad2_color[] =
{
- {-1.0f, -1.0f, 0.1f, 0x00ff8040},
- {-1.0f, 0.0f, 0.1f, 0x00ff8040},
- { 0.0f, -1.0f, 0.1f, 0x00ff8040},
- { 0.0f, 0.0f, 0.1f, 0x00ff8040},
- };
- static const struct vertex quad2_color[] =
- {
- { 0.0f, -1.0f, 0.1f, 0x00ff8040},
- { 0.0f, 0.0f, 0.1f, 0x00ff8040},
- { 1.0f, -1.0f, 0.1f, 0x00ff8040},
- { 1.0f, 0.0f, 0.1f, 0x00ff8040},
- };
- static const struct vertex 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},
+ {{ 0.0f, -1.0f, 0.1f}, 0x00ff8040},
+ {{ 0.0f, 0.0f, 0.1f}, 0x00ff8040},
+ {{ 1.0f, -1.0f, 0.1f}, 0x00ff8040},
+ {{ 1.0f, 0.0f, 0.1f}, 0x00ff8040},
+ },
+ 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},
};
static const float quad4_color[] =
{
@@ -7612,22 +7634,27 @@
HRESULT hr;
UINT i, j;
- static const struct vertex quad_strip[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad_strip[] =
{
- {-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 const struct vertex quad_list[] =
- {
- {-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, 0xff0000ff},
- {-1.0f, 1.0f, 0.0f, 0xff00ff00},
- { 1.0f, 1.0f, 0.0f, 0xffffffff},
+ {{-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},
+ },
+ quad_list[] =
+ {
+ {{-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}, 0xff0000ff},
+ {{-1.0f, 1.0f, 0.0f}, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.0f}, 0xffffffff},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -7760,19 +7787,24 @@
HWND window;
HRESULT hr;
- static const struct vertex quad1[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x4000ff00},
+ {{-1.0f, 0.0f, 0.1f}, 0x4000ff00},
+ {{ 1.0f, -1.0f, 0.1f}, 0x4000ff00},
+ {{ 1.0f, 0.0f, 0.1f}, 0x4000ff00},
+ },
+ quad2[] =
{
- {-1.0f, -1.0f, 0.1f, 0x4000ff00},
- {-1.0f, 0.0f, 0.1f, 0x4000ff00},
- { 1.0f, -1.0f, 0.1f, 0x4000ff00},
- { 1.0f, 0.0f, 0.1f, 0x4000ff00},
- };
- static const struct vertex quad2[] =
- {
- {-1.0f, 0.0f, 0.1f, 0xc00000ff},
- {-1.0f, 1.0f, 0.1f, 0xc00000ff},
- { 1.0f, 0.0f, 0.1f, 0xc00000ff},
- { 1.0f, 1.0f, 0.1f, 0xc00000ff},
+ {{-1.0f, 0.0f, 0.1f}, 0xc00000ff},
+ {{-1.0f, 1.0f, 0.1f}, 0xc00000ff},
+ {{ 1.0f, 0.0f, 0.1f}, 0xc00000ff},
+ {{ 1.0f, 1.0f, 0.1f}, 0xc00000ff},
};
static const float composite_quad[][5] =
{
@@ -7911,15 +7943,6 @@
DestroyWindow(window);
}
-struct vertex_shortcolor {
- float x, y, z;
- unsigned short r, g, b, a;
-};
-struct vertex_floatcolor {
- float x, y, z;
- float r, g, b, a;
-};
-
static void fixed_function_decl_test(void)
{
IDirect3DVertexDeclaration9 *dcl_float = NULL, *dcl_short = NULL, *dcl_ubyte = NULL, *dcl_color = NULL;
@@ -7970,33 +7993,48 @@
{0, 16, D3DDECLTYPE_D3DCOLOR, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_COLOR, 0},
D3DDECL_END()
};
- static const struct vertex quad1[] = /* D3DCOLOR */
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x00ffff00},
- {-1.0f, 0.0f, 0.1f, 0x00ffff00},
- { 0.0f, -1.0f, 0.1f, 0x00ffff00},
- { 0.0f, 0.0f, 0.1f, 0x00ffff00},
- };
- static const struct vertex quad2[] = /* UBYTE4N */
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] = /* D3DCOLOR */
{
- {-1.0f, 0.0f, 0.1f, 0x00ffff00},
- {-1.0f, 1.0f, 0.1f, 0x00ffff00},
- { 0.0f, 0.0f, 0.1f, 0x00ffff00},
- { 0.0f, 1.0f, 0.1f, 0x00ffff00},
+ {{-1.0f, -1.0f, 0.1f}, 0x00ffff00},
+ {{-1.0f, 0.0f, 0.1f}, 0x00ffff00},
+ {{ 0.0f, -1.0f, 0.1f}, 0x00ffff00},
+ {{ 0.0f, 0.0f, 0.1f}, 0x00ffff00},
+ },
+ quad2[] = /* UBYTE4N */
+ {
+ {{-1.0f, 0.0f, 0.1f}, 0x00ffff00},
+ {{-1.0f, 1.0f, 0.1f}, 0x00ffff00},
+ {{ 0.0f, 0.0f, 0.1f}, 0x00ffff00},
+ {{ 0.0f, 1.0f, 0.1f}, 0x00ffff00},
};
- static const struct vertex_shortcolor quad3[] = /* short */
+ static const struct
+ {
+ struct vec3 position;
+ struct { unsigned short x, y, z, w; } color;
+ }
+ quad3[] = /* USHORT4N */
{
- { 0.0f, -1.0f, 0.1f, 0x0000, 0x0000, 0xffff, 0xffff},
- { 0.0f, 0.0f, 0.1f, 0x0000, 0x0000, 0xffff, 0xffff},
- { 1.0f, -1.0f, 0.1f, 0x0000, 0x0000, 0xffff, 0xffff},
- { 1.0f, 0.0f, 0.1f, 0x0000, 0x0000, 0xffff, 0xffff},
+ {{0.0f, -1.0f, 0.1f}, {0x0000, 0x0000, 0xffff, 0xffff}},
+ {{0.0f, 0.0f, 0.1f}, {0x0000, 0x0000, 0xffff, 0xffff}},
+ {{1.0f, -1.0f, 0.1f}, {0x0000, 0x0000, 0xffff, 0xffff}},
+ {{1.0f, 0.0f, 0.1f}, {0x0000, 0x0000, 0xffff, 0xffff}},
};
- static const struct vertex_floatcolor quad4[] =
+ static const struct
+ {
+ struct vec3 position;
+ struct vec4 color;
+ }
+ quad4[] =
{
- { 0.0f, 0.0f, 0.1f, 1.0, 0.0, 0.0, 0.0},
- { 0.0f, 1.0f, 0.1f, 1.0, 0.0, 0.0, 0.0},
- { 1.0f, 0.0f, 0.1f, 1.0, 0.0, 0.0, 0.0},
- { 1.0f, 1.0f, 0.1f, 1.0, 0.0, 0.0, 0.0},
+ {{0.0f, 0.0f, 0.1f}, {1.0f, 0.0f, 0.0f, 0.0f}},
+ {{0.0f, 1.0f, 0.1f}, {1.0f, 0.0f, 0.0f, 0.0f}},
+ {{1.0f, 0.0f, 0.1f}, {1.0f, 0.0f, 0.0f, 0.0f}},
+ {{1.0f, 1.0f, 0.1f}, {1.0f, 0.0f, 0.0f, 0.0f}},
};
static const DWORD colors[] =
{
@@ -8039,12 +8077,17 @@
0.0f, 0.0f, 0.1f,
0.0f, 1.0f, 0.1f,
};
- static const struct tvertex quad_transformed[] =
+ static const struct
{
- { 90, 110, 0.1, 2.0, 0x00ffff00},
- { 570, 110, 0.1, 2.0, 0x00ffff00},
- { 90, 300, 0.1, 2.0, 0x00ffff00},
- { 570, 300, 0.1, 2.0, 0x00ffff00}
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad_transformed[] =
+ {
+ {{ 90.0f, 110.0f, 0.1f, 2.0f}, 0x00ffff00},
+ {{570.0f, 110.0f, 0.1f, 2.0f}, 0x00ffff00},
+ {{ 90.0f, 300.0f, 0.1f, 2.0f}, 0x00ffff00},
+ {{570.0f, 300.0f, 0.1f, 2.0f}, 0x00ffff00},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -9200,12 +9243,17 @@
-1.0, 1.0, 0.1,
0.0, 1.0, 0.1,
};
- struct vertex painter[] =
+ struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ painter[] =
{
- {-1.0, -1.0, 0.0, 0x00000000},
- { 1.0, -1.0, 0.0, 0x00000000},
- {-1.0, 1.0, 0.0, 0x00000000},
- { 1.0, 1.0, 0.0, 0x00000000},
+ {{-1.0f, -1.0f, 0.0f}, 0x00000000},
+ {{ 1.0f, -1.0f, 0.0f}, 0x00000000},
+ {{-1.0f, 1.0f, 0.0f}, 0x00000000},
+ {{ 1.0f, 1.0f, 0.0f}, 0x00000000},
};
static const WORD indices_cw[] = {0, 1, 3};
static const WORD indices_ccw[] = {0, 2, 3};
@@ -10126,21 +10174,26 @@
{ 0.5f, -0.5f, 0.1f, 1.0f, 0.0f},
{ 0.5f, 0.5f, 0.1f, 1.0f, 1.0f},
};
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
/* Quad with R=0x10, G=0x20 */
- static const struct vertex quad1[] =
+ quad1[] =
{
- {-1.0f, -1.0f, 0.1f, 0x80102000},
- {-1.0f, 1.0f, 0.1f, 0x80102000},
- { 1.0f, -1.0f, 0.1f, 0x80102000},
- { 1.0f, 1.0f, 0.1f, 0x80102000},
- };
+ {{-1.0f, -1.0f, 0.1f}, 0x80102000},
+ {{-1.0f, 1.0f, 0.1f}, 0x80102000},
+ {{ 1.0f, -1.0f, 0.1f}, 0x80102000},
+ {{ 1.0f, 1.0f, 0.1f}, 0x80102000},
+ },
/* Quad with R=0x20, G=0x10 */
- static const struct vertex quad2[] =
+ quad2[] =
{
- {-1.0f, -1.0f, 0.1f, 0x80201000},
- {-1.0f, 1.0f, 0.1f, 0x80201000},
- { 1.0f, -1.0f, 0.1f, 0x80201000},
- { 1.0f, 1.0f, 0.1f, 0x80201000},
+ {{-1.0f, -1.0f, 0.1f}, 0x80201000},
+ {{-1.0f, 1.0f, 0.1f}, 0x80201000},
+ {{ 1.0f, -1.0f, 0.1f}, 0x80201000},
+ {{ 1.0f, 1.0f, 0.1f}, 0x80201000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -10296,12 +10349,17 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x00ff0000},
- {-1.0f, 1.0f, 0.1f, 0x00ff0000},
- { 1.0f, -1.0f, 0.1f, 0x00ff0000},
- { 1.0f, 1.0f, 0.1f, 0x00ff0000},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x00ff0000},
+ {{-1.0f, 1.0f, 0.1f}, 0x00ff0000},
+ {{ 1.0f, -1.0f, 0.1f}, 0x00ff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0x00ff0000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -11430,12 +11488,17 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x80ff00ff},
- {-1.0f, 1.0f, 0.1f, 0x80ff00ff},
- { 1.0f, -1.0f, 0.1f, 0x80ff00ff},
- { 1.0f, 1.0f, 0.1f, 0x80ff00ff},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x80ff00ff},
+ {{-1.0f, 1.0f, 0.1f}, 0x80ff00ff},
+ {{ 1.0f, -1.0f, 0.1f}, 0x80ff00ff},
+ {{ 1.0f, 1.0f, 0.1f}, 0x80ff00ff},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -11489,12 +11552,17 @@
HWND window;
HRESULT hr;
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x408080c0},
- {-1.0f, 1.0f, 0.1f, 0x408080c0},
- { 1.0f, -1.0f, 0.1f, 0x408080c0},
- { 1.0f, 1.0f, 0.1f, 0x408080c0},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x408080c0},
+ {{-1.0f, 1.0f, 0.1f}, 0x408080c0},
+ {{ 1.0f, -1.0f, 0.1f}, 0x408080c0},
+ {{ 1.0f, 1.0f, 0.1f}, 0x408080c0},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -11581,19 +11649,24 @@
HWND window;
HRESULT hr;
- static const struct vertex quad1[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, 0x00ff0000},
- {-1.0f, 1.0f, 0.1f, 0x00ff0000},
- { 1.0f, -1.0f, 0.1f, 0x00ff0000},
- { 1.0f, 1.0f, 0.1f, 0x00ff0000},
- };
- static const struct vertex quad2[] =
- {
- {-1.0f, -1.0f, 0.9f, 0x0000ff00},
- {-1.0f, 1.0f, 0.9f, 0x0000ff00},
- { 1.0f, -1.0f, 0.9f, 0x0000ff00},
- { 1.0f, 1.0f, 0.9f, 0x0000ff00},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0x00ff0000},
+ {{-1.0f, 1.0f, 0.1f}, 0x00ff0000},
+ {{ 1.0f, -1.0f, 0.1f}, 0x00ff0000},
+ {{ 1.0f, 1.0f, 0.1f}, 0x00ff0000},
+ },
+ quad2[] =
+ {
+ {{-1.0f, -1.0f, 0.9f}, 0x0000ff00},
+ {{-1.0f, 1.0f, 0.9f}, 0x0000ff00},
+ {{ 1.0f, -1.0f, 0.9f}, 0x0000ff00},
+ {{ 1.0f, 1.0f, 0.9f}, 0x0000ff00},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -11685,12 +11758,17 @@
{D3DCMP_GREATEREQUAL, ALPHATEST_FAILED, ALPHATEST_PASSED, ALPHATEST_PASSED},
{D3DCMP_ALWAYS, ALPHATEST_PASSED, ALPHATEST_PASSED, ALPHATEST_PASSED},
};
- static const struct vertex quad[] =
+ static const struct
{
- {-1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
- {-1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
- { 1.0f, -1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
- { 1.0f, 1.0f, 0.1f, ALPHATEST_PASSED | 0x80000000},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
+ {{-1.0f, 1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
+ {{ 1.0f, -1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
+ {{ 1.0f, 1.0f, 0.1f}, ALPHATEST_PASSED | 0x80000000},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -12238,47 +12316,57 @@
HWND window;
HRESULT hr;
- static const struct tvertex quad1[] =
+ static const struct
{
- { 0.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f},
- {640.0f, 0.0f, 5.0f, 1.0f, 0xff002b7f},
- { 0.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f},
- {640.0f, 480.0f, 5.0f, 1.0f, 0xff002b7f},
- };
- static const struct tvertex quad2[] =
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad1[] =
{
- { 0.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814},
- {640.0f, 300.0f, 10.0f, 1.0f, 0xfff9e814},
- { 0.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814},
- {640.0f, 360.0f, 10.0f, 1.0f, 0xfff9e814},
- };
- static const struct tvertex quad3[] =
+ {{ 0.0f, 0.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{640.0f, 0.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{ 0.0f, 480.0f, 5.0f, 1.0f}, 0xff002b7f},
+ {{640.0f, 480.0f, 5.0f, 1.0f}, 0xff002b7f},
+ },
+ quad2[] =
{
- {112.0f, 108.0f, 5.0f, 1.0f, 0xffffffff},
- {208.0f, 108.0f, 5.0f, 1.0f, 0xffffffff},
- {112.0f, 204.0f, 5.0f, 1.0f, 0xffffffff},
- {208.0f, 204.0f, 5.0f, 1.0f, 0xffffffff},
- };
- static const struct tvertex quad4[] =
+ {{ 0.0f, 300.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 300.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{ 0.0f, 360.0f, 10.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 360.0f, 10.0f, 1.0f}, 0xfff9e814},
+ },
+ quad3[] =
{
- { 42.0f, 41.0f, 10.0f, 1.0f, 0xffffffff},
- {112.0f, 41.0f, 10.0f, 1.0f, 0xffffffff},
- { 42.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
- {112.0f, 108.0f, 10.0f, 1.0f, 0xffffffff},
- };
- static const struct vertex quad5[] =
+ {{112.0f, 108.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{208.0f, 108.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 204.0f, 5.0f, 1.0f}, 0xffffffff},
+ {{208.0f, 204.0f, 5.0f, 1.0f}, 0xffffffff},
+ },
+ quad4[] =
{
- { -0.5f, 0.5f, 10.0f, 0xff14f914},
- { 0.5f, 0.5f, 10.0f, 0xff14f914},
- { -0.5f, -0.5f, 10.0f, 0xff14f914},
- { 0.5f, -0.5f, 10.0f, 0xff14f914},
+ {{ 42.0f, 41.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 41.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{ 42.0f, 108.0f, 10.0f, 1.0f}, 0xffffffff},
+ {{112.0f, 108.0f, 10.0f, 1.0f}, 0xffffffff},
};
- static const struct vertex quad6[] =
+ static const struct
{
- { -1.0f, 0.5f, 10.0f, 0xfff91414},
- { 1.0f, 0.5f, 10.0f, 0xfff91414},
- { -1.0f, 0.25f, 10.0f, 0xfff91414},
- { 1.0f, 0.25f, 10.0f, 0xfff91414},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad5[] =
+ {
+ {{-0.5f, 0.5f, 10.0f}, 0xff14f914},
+ {{ 0.5f, 0.5f, 10.0f}, 0xff14f914},
+ {{-0.5f, -0.5f, 10.0f}, 0xff14f914},
+ {{ 0.5f, -0.5f, 10.0f}, 0xff14f914},
+ },
+ quad6[] =
+ {
+ {{-1.0f, 0.5f, 10.0f}, 0xfff91414},
+ {{ 1.0f, 0.5f, 10.0f}, 0xfff91414},
+ {{-1.0f, 0.25f, 10.0f}, 0xfff91414},
+ {{ 1.0f, 0.25f, 10.0f}, 0xfff91414},
};
window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE,
@@ -12403,26 +12491,31 @@
static void depth_bounds_test(void)
{
- const struct tvertex quad1[] =
+ static const struct
{
- { 0, 0, 0.0f, 1, 0xfff9e814},
- { 640, 0, 0.0f, 1, 0xfff9e814},
- { 0, 480, 1.0f, 1, 0xfff9e814},
- { 640, 480, 1.0f, 1, 0xfff9e814},
- };
- const struct tvertex quad2[] =
- {
- { 0, 0, 0.6f, 1, 0xff002b7f},
- { 640, 0, 0.6f, 1, 0xff002b7f},
- { 0, 480, 0.6f, 1, 0xff002b7f},
- { 640, 480, 0.6f, 1, 0xff002b7f},
- };
- const struct tvertex quad3[] =
- {
- { 0, 100, 0.6f, 1, 0xfff91414},
- { 640, 100, 0.6f, 1, 0xfff91414},
- { 0, 160, 0.6f, 1, 0xfff91414},
- { 640, 160, 0.6f, 1, 0xfff91414},
+ struct vec4 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{ 0.0f, 0.0f, 0.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 0.0f, 0.0f, 1.0f}, 0xfff9e814},
+ {{ 0.0f, 480.0f, 1.0f, 1.0f}, 0xfff9e814},
+ {{640.0f, 480.0f, 1.0f, 1.0f}, 0xfff9e814},
+ },
+ quad2[] =
+ {
+ {{ 0.0f, 0.0f, 0.6f, 1.0f}, 0xff002b7f},
+ {{640.0f, 0.0f, 0.6f, 1.0f}, 0xff002b7f},
+ {{ 0.0f, 480.0f, 0.6f, 1.0f}, 0xff002b7f},
+ {{640.0f, 480.0f, 0.6f, 1.0f}, 0xff002b7f},
+ },
+ quad3[] =
+ {
+ {{ 0.0f, 100.0f, 0.6f, 1.0f}, 0xfff91414},
+ {{640.0f, 100.0f, 0.6f, 1.0f}, 0xfff91414},
+ {{ 0.0f, 160.0f, 0.6f, 1.0f}, 0xfff91414},
+ {{640.0f, 160.0f, 0.6f, 1.0f}, 0xfff91414},
};
union {
@@ -12534,26 +12627,31 @@
static void depth_buffer_test(void)
{
- static const struct vertex quad1[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
{
- { -1.0, 1.0, 0.33f, 0xff00ff00},
- { 1.0, 1.0, 0.33f, 0xff00ff00},
- { -1.0, -1.0, 0.33f, 0xff00ff00},
- { 1.0, -1.0, 0.33f, 0xff00ff00},
- };
- static const struct vertex quad2[] =
- {
- { -1.0, 1.0, 0.50f, 0xffff00ff},
- { 1.0, 1.0, 0.50f, 0xffff00ff},
- { -1.0, -1.0, 0.50f, 0xffff00ff},
- { 1.0, -1.0, 0.50f, 0xffff00ff},
- };
- static const struct vertex quad3[] =
- {
- { -1.0, 1.0, 0.66f, 0xffff0000},
- { 1.0, 1.0, 0.66f, 0xffff0000},
- { -1.0, -1.0, 0.66f, 0xffff0000},
- { 1.0, -1.0, 0.66f, 0xffff0000},
+ {{-1.0, 1.0, 0.33f}, 0xff00ff00},
+ {{ 1.0, 1.0, 0.33f}, 0xff00ff00},
+ {{-1.0, -1.0, 0.33f}, 0xff00ff00},
+ {{ 1.0, -1.0, 0.33f}, 0xff00ff00},
+ },
+ quad2[] =
+ {
+ {{-1.0, 1.0, 0.50f}, 0xffff00ff},
+ {{ 1.0, 1.0, 0.50f}, 0xffff00ff},
+ {{-1.0, -1.0, 0.50f}, 0xffff00ff},
+ {{ 1.0, -1.0, 0.50f}, 0xffff00ff},
+ },
+ quad3[] =
+ {
+ {{-1.0, 1.0, 0.66f}, 0xffff0000},
+ {{ 1.0, 1.0, 0.66f}, 0xffff0000},
+ {{-1.0, -1.0, 0.66f}, 0xffff0000},
+ {{ 1.0, -1.0, 0.66f}, 0xffff0000},
};
static const DWORD expected_colors[4][4] =
{
@@ -12686,12 +12784,17 @@
* the following draw should only copy back the part that was modified. */
static void depth_buffer2_test(void)
{
- static const struct vertex quad[] =
+ static const struct
{
- { -1.0, 1.0, 0.66f, 0xffff0000},
- { 1.0, 1.0, 0.66f, 0xffff0000},
- { -1.0, -1.0, 0.66f, 0xffff0000},
- { 1.0, -1.0, 0.66f, 0xffff0000},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad[] =
+ {
+ {{-1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.66f}, 0xffff0000},
+ {{-1.0f, -1.0f, 0.66f}, 0xffff0000},
+ {{ 1.0f, -1.0f, 0.66f}, 0xffff0000},
};
IDirect3DSurface9 *backbuffer, *rt1, *rt2;
@@ -12799,19 +12902,24 @@
static void depth_blit_test(void)
{
- static const struct vertex quad1[] =
+ static const struct
{
- { -1.0, 1.0, 0.33f, 0xff00ff00},
- { 1.0, 1.0, 0.33f, 0xff00ff00},
- { -1.0, -1.0, 0.33f, 0xff00ff00},
- { 1.0, -1.0, 0.33f, 0xff00ff00},
- };
- static const struct vertex quad2[] =
- {
- { -1.0, 1.0, 0.66f, 0xff0000ff},
- { 1.0, 1.0, 0.66f, 0xff0000ff},
- { -1.0, -1.0, 0.66f, 0xff0000ff},
- { 1.0, -1.0, 0.66f, 0xff0000ff},
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, 1.0f, 0.33f}, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.33f}, 0xff00ff00},
+ {{-1.0f, -1.0f, 0.33f}, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.33f}, 0xff00ff00},
+ },
+ quad2[] =
+ {
+ {{-1.0f, 1.0f, 0.66f}, 0xff0000ff},
+ {{ 1.0f, 1.0f, 0.66f}, 0xff0000ff},
+ {{-1.0f, -1.0f, 0.66f}, 0xff0000ff},
+ {{ 1.0f, -1.0f, 0.66f}, 0xff0000ff},
};
static const DWORD expected_colors[4][4] =
{
@@ -13479,19 +13587,24 @@
static void clip_planes(IDirect3DDevice9 *device, const char *test_name)
{
- static const struct vertex quad1[] =
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ }
+ quad1[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}, 0xfff9e814},
+ {{-1.0f, 1.0f, 0.0f}, 0xfff9e814},
+ {{ 1.0f, -1.0f, 0.0f}, 0xfff9e814},
+ {{ 1.0f, 1.0f, 0.0f}, 0xfff9e814},
+ },
+ quad2[] =
{
- {-1.0f, -1.0f, 0.0f, 0xfff9e814},
- {-1.0f, 1.0f, 0.0f, 0xfff9e814},
- { 1.0f, -1.0f, 0.0f, 0xfff9e814},
- { 1.0f, 1.0f, 0.0f, 0xfff9e814},
- };
- static const struct vertex quad2[] =
- {
- {-1.0f, -1.0f, 0.0f, 0xff002b7f},
- {-1.0f, 1.0f, 0.0f, 0xff002b7f},
- { 1.0f, -1.0f, 0.0f, 0xff002b7f},
- { 1.0f, 1.0f, 0.0f, 0xff002b7f},
+ {{-1.0f, -1.0f, 0.0f}, 0xff002b7f},
+ {{-1.0f, 1.0f, 0.0f}, 0xff002b7f},
+ {{ 1.0f, -1.0f, 0.0f}, 0xff002b7f},
+ {{ 1.0f, 1.0f, 0.0f}, 0xff002b7f},
};
D3DCOLOR color;
HRESULT hr;
diff -Nru wine1.7-1.7.22/dlls/d3d9/texture.c wine1.7-1.7.24/dlls/d3d9/texture.c
--- wine1.7-1.7.22/dlls/d3d9/texture.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3d9/texture.c 2014-08-08 20:19:29.000000000 +0000
@@ -142,12 +142,14 @@
static DWORD WINAPI d3d9_texture_2d_SetPriority(IDirect3DTexture9 *iface, DWORD priority)
{
struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -156,12 +158,14 @@
static DWORD WINAPI d3d9_texture_2d_GetPriority(IDirect3DTexture9 *iface)
{
struct d3d9_texture *texture = impl_from_IDirect3DTexture9(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
@@ -531,12 +535,14 @@
static DWORD WINAPI d3d9_texture_cube_SetPriority(IDirect3DCubeTexture9 *iface, DWORD priority)
{
struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -545,12 +551,14 @@
static DWORD WINAPI d3d9_texture_cube_GetPriority(IDirect3DCubeTexture9 *iface)
{
struct d3d9_texture *texture = impl_from_IDirect3DCubeTexture9(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
@@ -944,12 +952,14 @@
static DWORD WINAPI d3d9_texture_3d_SetPriority(IDirect3DVolumeTexture9 *iface, DWORD priority)
{
struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);
+ struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- ret = wined3d_texture_set_priority(texture->wined3d_texture, priority);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_set_priority(resource, priority);
wined3d_mutex_unlock();
return ret;
@@ -958,12 +968,14 @@
static DWORD WINAPI d3d9_texture_3d_GetPriority(IDirect3DVolumeTexture9 *iface)
{
struct d3d9_texture *texture = impl_from_IDirect3DVolumeTexture9(iface);
+ const struct wined3d_resource *resource;
DWORD ret;
TRACE("iface %p.\n", iface);
wined3d_mutex_lock();
- ret = wined3d_texture_get_priority(texture->wined3d_texture);
+ resource = wined3d_texture_get_resource(texture->wined3d_texture);
+ ret = wined3d_resource_get_priority(resource);
wined3d_mutex_unlock();
return ret;
diff -Nru wine1.7-1.7.22/dlls/d3dx9_36/tests/mesh.c wine1.7-1.7.24/dlls/d3dx9_36/tests/mesh.c
--- wine1.7-1.7.22/dlls/d3dx9_36/tests/mesh.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3dx9_36/tests/mesh.c 2014-08-08 20:19:29.000000000 +0000
@@ -3687,7 +3687,7 @@
}
HeapFree(GetProcessHeap(), 0, raw_outline);
raw_outline = HeapAlloc(GetProcessHeap(), 0, datasize);
- if (!glyphs) {
+ if (!raw_outline) {
hr = E_OUTOFMEMORY;
goto error;
}
diff -Nru wine1.7-1.7.22/dlls/d3dx9_36/util.c wine1.7-1.7.24/dlls/d3dx9_36/util.c
--- wine1.7-1.7.22/dlls/d3dx9_36/util.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3dx9_36/util.c 2014-08-08 20:19:29.000000000 +0000
@@ -181,6 +181,7 @@
HRESULT hr = S_OK;
void *buffer_pointer;
DWORD buffer_size;
+ DWORD bytes_written;
HANDLE file = CreateFileW(dst_filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if (file == INVALID_HANDLE_VALUE)
return HRESULT_FROM_WIN32(GetLastError());
@@ -188,7 +189,7 @@
buffer_pointer = ID3DXBuffer_GetBufferPointer(buffer);
buffer_size = ID3DXBuffer_GetBufferSize(buffer);
- if (!WriteFile(file, buffer_pointer, buffer_size, NULL, NULL))
+ if (!WriteFile(file, buffer_pointer, buffer_size, &bytes_written, NULL))
hr = HRESULT_FROM_WIN32(GetLastError());
CloseHandle(file);
diff -Nru wine1.7-1.7.22/dlls/d3dxof/d3dxof.c wine1.7-1.7.24/dlls/d3dxof/d3dxof.c
--- wine1.7-1.7.22/dlls/d3dxof/d3dxof.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/d3dxof/d3dxof.c 2014-08-08 20:19:29.000000000 +0000
@@ -136,6 +136,7 @@
HRESULT hr;
LPBYTE file_buffer;
DWORD file_size;
+ DWORD bytes_written;
TRACE("(%p/%p)->(%p,%x,%p)\n", This, iface, pvSource, dwLoadOptions, ppEnumObj);
@@ -240,7 +241,7 @@
file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
if (file != INVALID_HANDLE_VALUE)
{
- WriteFile(file, file_buffer, file_size, NULL, NULL);
+ WriteFile(file, file_buffer, file_size, &bytes_written, NULL);
CloseHandle(file);
}
}
@@ -304,6 +305,7 @@
parse_buffer buf;
HRESULT hr;
LPBYTE decomp_buffer = NULL;
+ DWORD bytes_written;
ZeroMemory(&buf, sizeof(buf));
buf.buffer = pvData;
@@ -325,7 +327,7 @@
file = CreateFileA(tmp, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL);
if (file != INVALID_HANDLE_VALUE)
{
- WriteFile(file, pvData, cbSize, NULL, NULL);
+ WriteFile(file, pvData, cbSize, &bytes_written, NULL);
CloseHandle(file);
}
}
diff -Nru wine1.7-1.7.22/dlls/dbghelp/msc.c wine1.7-1.7.24/dlls/dbghelp/msc.c
--- wine1.7-1.7.22/dlls/dbghelp/msc.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dbghelp/msc.c 2014-08-08 20:19:29.000000000 +0000
@@ -1988,7 +1988,12 @@
case S_SECTINFO_V3:
case S_SUBSECTINFO_V3:
case S_ENTRYPOINT_V3:
+ case 0x113e:
case 0x1139:
+ case 0x1141:
+ case 0x1142:
+ case 0x1143:
+ case 0x1144:
TRACE("Unsupported symbol id %x\n", sym->generic.id);
break;
@@ -2919,8 +2924,8 @@
struct hash_table_elt elt;
};
-#define PEV_ERROR(pev, msg) snprintf((pev)->error, sizeof((pev)->error), "%s", (msg)),FALSE
-#define PEV_ERROR1(pev, msg, pmt) snprintf((pev)->error, sizeof((pev)->error), (msg), (pmt)),FALSE
+#define PEV_ERROR(pev, msg) snprintf((pev)->error, sizeof((pev)->error), "%s", (msg))
+#define PEV_ERROR1(pev, msg, pmt) snprintf((pev)->error, sizeof((pev)->error), (msg), (pmt))
#if 0
static void pev_dump_stack(struct pevaluator* pev)
diff -Nru wine1.7-1.7.22/dlls/ddraw/surface.c wine1.7-1.7.24/dlls/ddraw/surface.c
--- wine1.7-1.7.22/dlls/ddraw/surface.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/ddraw/surface.c 2014-08-08 20:19:29.000000000 +0000
@@ -2229,63 +2229,63 @@
return hr;
}
-/*****************************************************************************
- * IDirectDrawSurface7::SetPriority
- *
- * Sets a texture priority for managed textures.
- *
- * Params:
- * Priority: The new priority
- *
- * Returns:
- * DD_OK on success
- * For more details, see IWineD3DSurface::SetPriority
- *
- *****************************************************************************/
-static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWORD Priority)
+static HRESULT WINAPI ddraw_surface7_SetPriority(IDirectDrawSurface7 *iface, DWORD priority)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
+ DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE;
HRESULT hr;
+ struct wined3d_resource *resource;
- TRACE("iface %p, priority %u.\n", iface, Priority);
+ TRACE("iface %p, priority %u.\n", iface, priority);
wined3d_mutex_lock();
- hr = wined3d_surface_set_priority(surface->wined3d_surface, Priority);
+ /* No need to check for offscreen plain surfaces or mipmap sublevels. SetPriority
+ * calls on such surfaces segfault on Windows. */
+ if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed))
+ {
+ WARN("Called on non-managed texture returning DDERR_INVALIDPARAMS.\n");
+ hr = DDERR_INVALIDPARAMS;
+ }
+ else
+ {
+ resource = wined3d_texture_get_resource(surface->wined3d_texture);
+ wined3d_resource_set_priority(resource, priority);
+ hr = DD_OK;
+ }
wined3d_mutex_unlock();
return hr;
}
-/*****************************************************************************
- * IDirectDrawSurface7::GetPriority
- *
- * Returns the surface's priority
- *
- * Params:
- * Priority: Address of a variable to write the priority to
- *
- * Returns:
- * D3D_OK on success
- * DDERR_INVALIDPARAMS if Priority == NULL
- * For more details, see IWineD3DSurface::GetPriority
- *
- *****************************************************************************/
-static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWORD *Priority)
+static HRESULT WINAPI ddraw_surface7_GetPriority(IDirectDrawSurface7 *iface, DWORD *priority)
{
struct ddraw_surface *surface = impl_from_IDirectDrawSurface7(iface);
+ const struct wined3d_resource *resource;
+ DWORD managed = DDSCAPS2_TEXTUREMANAGE | DDSCAPS2_D3DTEXTUREMANAGE;
+ HRESULT hr;
- TRACE("iface %p, priority %p.\n", iface, Priority);
+ TRACE("iface %p, priority %p.\n", iface, priority);
- if(!Priority)
+ wined3d_mutex_lock();
+ if (surface->surface_desc.ddsCaps.dwCaps & DDSCAPS_OFFSCREENPLAIN)
{
- return DDERR_INVALIDPARAMS;
+ WARN("Called on offscreenplain surface, returning DDERR_INVALIDOBJECT.\n");
+ hr = DDERR_INVALIDOBJECT;
+ }
+ else if (!(surface->surface_desc.ddsCaps.dwCaps2 & managed) || !surface->wined3d_texture)
+ {
+ WARN("Called on non-managed texture or mipmap sublevel, returning DDERR_INVALIDPARAMS.\n");
+ hr = DDERR_INVALIDPARAMS;
+ }
+ else
+ {
+ resource = wined3d_texture_get_resource(surface->wined3d_texture);
+ *priority = wined3d_resource_get_priority(resource);
+ hr = DD_OK;
}
-
- wined3d_mutex_lock();
- *Priority = wined3d_surface_get_priority(surface->wined3d_surface);
wined3d_mutex_unlock();
- return DD_OK;
+ return hr;
}
/*****************************************************************************
diff -Nru wine1.7-1.7.22/dlls/ddraw/tests/ddraw7.c wine1.7-1.7.24/dlls/ddraw/tests/ddraw7.c
--- wine1.7-1.7.22/dlls/ddraw/tests/ddraw7.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/ddraw/tests/ddraw7.c 2014-08-08 20:19:29.000000000 +0000
@@ -7448,6 +7448,127 @@
DestroyWindow(window);
}
+static void test_resource_priority(void)
+{
+ IDirectDrawSurface7 *surface, *mipmap;
+ DDSURFACEDESC2 surface_desc;
+ IDirectDraw7 *ddraw;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+ DDSCAPS2 caps = {DDSCAPS_COMPLEX, 0, 0, 0};
+ DDCAPS hal_caps;
+ DWORD needed_caps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_MIPMAP;
+ unsigned int i;
+ DWORD priority;
+ static const struct
+ {
+ DWORD caps, caps2;
+ const char *name;
+ HRESULT hr;
+ /* SetPriority on offscreenplain surfaces crashes on AMD GPUs on Win7. */
+ BOOL crash;
+ }
+ test_data[] =
+ {
+ {DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY, 0, "vidmem texture", DDERR_INVALIDPARAMS, FALSE},
+ {DDSCAPS_TEXTURE | DDSCAPS_SYSTEMMEMORY, 0, "sysmem texture", DDERR_INVALIDPARAMS, FALSE},
+ {DDSCAPS_TEXTURE, DDSCAPS2_TEXTUREMANAGE, "managed texture", DD_OK, FALSE},
+ {DDSCAPS_TEXTURE, DDSCAPS2_D3DTEXTUREMANAGE, "managed texture", DD_OK, FALSE},
+ {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_VIDEOMEMORY, 0, "vidmem offscreenplain", DDERR_INVALIDOBJECT, TRUE},
+ {DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY, 0, "sysmem offscreenplain", DDERR_INVALIDOBJECT, TRUE},
+ };
+
+ window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
+ 0, 0, 640, 480, 0, 0, 0, 0);
+ ddraw = create_ddraw();
+ ok(!!ddraw, "Failed to create a ddraw object.\n");
+ hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
+ ok(SUCCEEDED(hr), "Failed to set cooperative level, hr %#x.\n", hr);
+
+ memset(&hal_caps, 0, sizeof(hal_caps));
+ hal_caps.dwSize = sizeof(hal_caps);
+ hr = IDirectDraw7_GetCaps(ddraw, &hal_caps, NULL);
+ ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr);
+ if ((hal_caps.ddsCaps.dwCaps & needed_caps) != needed_caps
+ || !(hal_caps.ddsCaps.dwCaps & DDSCAPS2_TEXTUREMANAGE))
+ {
+ skip("Required surface types not supported, skipping test.\n");
+ goto done;
+ }
+
+ for (i = 0; i < sizeof(test_data) / sizeof(*test_data); i++)
+ {
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
+ surface_desc.dwWidth = 32;
+ surface_desc.dwHeight = 32;
+ surface_desc.ddsCaps.dwCaps = test_data[i].caps;
+ surface_desc.ddsCaps.dwCaps2 = test_data[i].caps2;
+ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
+ ok(SUCCEEDED(hr), "Failed to create surface, hr %#x, type %s.\n", hr, test_data[i].name);
+
+ /* Priority == NULL segfaults. */
+ priority = 0xdeadbeef;
+ hr = IDirectDrawSurface7_GetPriority(surface, &priority);
+ ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name);
+ if (SUCCEEDED(test_data[i].hr))
+ ok(priority == 0, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name);
+ else
+ ok(priority == 0xdeadbeef, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name);
+
+ if (!test_data[i].crash)
+ {
+ hr = IDirectDrawSurface7_SetPriority(surface, 1);
+ ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name);
+ hr = IDirectDrawSurface7_GetPriority(surface, &priority);
+ ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name);
+ if (SUCCEEDED(test_data[i].hr))
+ {
+ ok(priority == 1, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name);
+ hr = IDirectDrawSurface7_SetPriority(surface, 2);
+ ok(hr == test_data[i].hr, "Got unexpected hr %#x, type %s.\n", hr, test_data[i].name);
+ }
+ else
+ ok(priority == 0xdeadbeef, "Got unexpected priority %u, type %s.\n", priority, test_data[i].name);
+ }
+
+ IDirectDrawSurface7_Release(surface);
+ }
+
+ memset(&surface_desc, 0, sizeof(surface_desc));
+ surface_desc.dwSize = sizeof(surface_desc);
+ surface_desc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS | DDSD_MIPMAPCOUNT;
+ surface_desc.dwWidth = 32;
+ surface_desc.dwHeight = 32;
+ surface_desc.ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_COMPLEX | DDSCAPS_MIPMAP;
+ surface_desc.ddsCaps.dwCaps2 = DDSCAPS2_TEXTUREMANAGE;
+ U2(surface_desc).dwMipMapCount = 2;
+ hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
+ ok(SUCCEEDED(hr), "Failed to create surface, hr %#x.\n", hr);
+ hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps, &mipmap);
+ ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr);
+
+ priority = 0xdeadbeef;
+ hr = IDirectDrawSurface7_GetPriority(mipmap, &priority);
+ ok(hr == DDERR_INVALIDPARAMS, "Got unexpected hr %#x, type managed mipmap.\n", hr);
+ ok(priority == 0xdeadbeef, "Got unexpected priority %u, type managed mipmap.\n", priority);
+ /* SetPriority on the mipmap surface crashes. */
+ hr = IDirectDrawSurface7_GetPriority(surface, &priority);
+ ok(SUCCEEDED(hr), "Failed to get priority, hr %#x.\n", hr);
+ ok(priority == 0, "Got unexpected priority %u, type managed mipmap.\n", priority);
+
+ IDirectDrawSurface7_Release(mipmap);
+ refcount = IDirectDrawSurface7_Release(surface);
+ ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+
+done:
+ refcount = IDirectDraw7_Release(ddraw);
+ ok(!refcount, "Got unexpected refcount %u.\n", refcount);
+ DestroyWindow(window);
+}
+
START_TEST(ddraw7)
{
HMODULE module = GetModuleHandleA("ddraw.dll");
@@ -7519,4 +7640,5 @@
test_palette_alpha();
test_vb_writeonly();
test_lost_device();
+ test_resource_priority();
}
diff -Nru wine1.7-1.7.22/dlls/ddraw/tests/visual.c wine1.7-1.7.24/dlls/ddraw/tests/visual.c
--- wine1.7-1.7.22/dlls/ddraw/tests/visual.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/ddraw/tests/visual.c 2014-08-08 20:19:29.000000000 +0000
@@ -446,18 +446,6 @@
ok(color == 0x00ffffff, "Clear rectangle 4(neg, neg) has color %08x\n", color);
}
-struct sVertex {
- float x, y, z;
- DWORD diffuse;
- DWORD specular;
-};
-
-struct sVertexT {
- float x, y, z, rhw;
- DWORD diffuse;
- DWORD specular;
-};
-
static void fog_test(IDirect3DDevice7 *device)
{
HRESULT hr;
@@ -465,34 +453,64 @@
float start = 0.0, end = 1.0;
D3DDEVICEDESC7 caps;
+ struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ DWORD specular;
+ }
/* Gets full z based fog with linear fog, no fog with specular color */
- struct sVertex untransformed_1[] = {
- {-1, -1, 0.1f, 0xFFFF0000, 0xFF000000 },
- {-1, 0, 0.1f, 0xFFFF0000, 0xFF000000 },
- { 0, 0, 0.1f, 0xFFFF0000, 0xFF000000 },
- { 0, -1, 0.1f, 0xFFFF0000, 0xFF000000 },
- };
+ untransformed_1[] =
+ {
+ {{-1.0f, -1.0f, 0.1f}, 0xffff0000, 0xff000000},
+ {{-1.0f, 0.0f, 0.1f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 0.0f, 0.1f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, -1.0f, 0.1f}, 0xffff0000, 0xff000000},
+ },
/* Ok, I am too lazy to deal with transform matrices */
- struct sVertex untransformed_2[] = {
- {-1, 0, 1.0f, 0xFFFF0000, 0xFF000000 },
- {-1, 1, 1.0f, 0xFFFF0000, 0xFF000000 },
- { 0, 1, 1.0f, 0xFFFF0000, 0xFF000000 },
- { 0, 0, 1.0f, 0xFFFF0000, 0xFF000000 },
- };
- /* Untransformed ones. Give them a different diffuse color to make the test look
- * nicer. It also makes making sure that they are drawn correctly easier.
- */
- struct sVertexT transformed_1[] = {
- {320, 0, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {640, 0, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {640, 240, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {320, 240, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- };
- struct sVertexT transformed_2[] = {
- {320, 240, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {640, 240, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {640, 480, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
- {320, 480, 1.0f, 1.0f, 0xFFFFFF00, 0xFF000000 },
+ untransformed_2[] =
+ {
+ {{-1.0f, 0.0f, 1.0f}, 0xffff0000, 0xff000000},
+ {{-1.0f, 1.0f, 1.0f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 1.0f, 1.0f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 0.0f, 1.0f}, 0xffff0000, 0xff000000},
+ },
+ far_quad1[] =
+ {
+ {{-1.0f, -1.0f, 0.5f}, 0xffff0000, 0xff000000},
+ {{-1.0f, 0.0f, 0.5f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 0.0f, 0.5f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, -1.0f, 0.5f}, 0xffff0000, 0xff000000},
+ },
+ far_quad2[] =
+ {
+ {{-1.0f, 0.0f, 1.5f}, 0xffff0000, 0xff000000},
+ {{-1.0f, 1.0f, 1.5f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 1.0f, 1.5f}, 0xffff0000, 0xff000000},
+ {{ 0.0f, 0.0f, 1.5f}, 0xffff0000, 0xff000000},
+ };
+ /* Untransformed ones. Give them a different diffuse color to make the
+ * test look nicer. It also makes making sure that they are drawn
+ * correctly easier. */
+ struct
+ {
+ struct vec4 position;
+ DWORD diffuse;
+ DWORD specular;
+ }
+ transformed_1[] =
+ {
+ {{320.0f, 0.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{640.0f, 0.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{640.0f, 240.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{320.0f, 240.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ },
+ transformed_2[] =
+ {
+ {{320.0f, 240.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{640.0f, 240.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{640.0f, 480.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
+ {{320.0f, 480.0f, 1.0f, 1.0f}, 0xffffff00, 0xff000000},
};
WORD Indices[] = {0, 1, 2, 2, 3, 0};
D3DMATRIX ident_mat =
@@ -523,20 +541,6 @@
0.0f, 0.0f, 1.0f, 0.0f,
0.0f, 0.0f, -1.0f, 1.0f,
};
- struct sVertex far_quad1[] =
- {
- {-1.0f, -1.0f, 0.5f, 0xffff0000, 0xff000000},
- {-1.0f, 0.0f, 0.5f, 0xffff0000, 0xff000000},
- { 0.0f, 0.0f, 0.5f, 0xffff0000, 0xff000000},
- { 0.0f, -1.0f, 0.5f, 0xffff0000, 0xff000000},
- };
- struct sVertex far_quad2[] =
- {
- {-1.0f, 0.0f, 1.5f, 0xffff0000, 0xff000000},
- {-1.0f, 1.0f, 1.5f, 0xffff0000, 0xff000000},
- { 0.0f, 1.0f, 1.5f, 0xffff0000, 0xff000000},
- { 0.0f, 0.0f, 1.5f, 0xffff0000, 0xff000000},
- };
memset(&caps, 0, sizeof(caps));
hr = IDirect3DDevice7_GetCaps(device, &caps);
diff -Nru wine1.7-1.7.22/dlls/dinput/tests/dinput.c wine1.7-1.7.24/dlls/dinput/tests/dinput.c
--- wine1.7-1.7.22/dlls/dinput/tests/dinput.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dinput/tests/dinput.c 2014-08-08 20:19:29.000000000 +0000
@@ -603,6 +603,7 @@
"IDirectInput_CreateDevice failed with guid from GetConfig hr = 0x%08x\n", hr);
}
+ IDirectInput_Release(pDI);
}
START_TEST(dinput)
diff -Nru wine1.7-1.7.22/dlls/dmime/performance.c wine1.7-1.7.24/dlls/dmime/performance.c
--- wine1.7-1.7.22/dlls/dmime/performance.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dmime/performance.c 2014-08-08 20:19:29.000000000 +0000
@@ -388,9 +388,6 @@
return E_POINTER;
}
pItem = DMUS_PMSGToItem(pPMSG);
- if (NULL == pItem) {
- return E_POINTER;
- }
if (pItem->bInUse) {
return DMUS_E_ALREADY_SENT;
}
@@ -512,9 +509,6 @@
return E_POINTER;
}
pItem = DMUS_PMSGToItem(pPMSG);
- if (NULL == pItem) {
- return E_POINTER;
- }
if (pItem->bInUse) {
/** prevent for freeing PMsg in queue (ie to be processed) */
return DMUS_E_CANNOT_FREE;
diff -Nru wine1.7-1.7.22/dlls/dmime/tests/dmime.c wine1.7-1.7.24/dlls/dmime/tests/dmime.c
--- wine1.7-1.7.22/dlls/dmime/tests/dmime.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dmime/tests/dmime.c 2014-08-08 20:19:29.000000000 +0000
@@ -380,6 +380,10 @@
hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER,
&IID_IDirectMusicObject, (void**)&dmo);
+ if (hr == REGDB_E_CLASSNOTREG) {
+ win_skip("DirectMusicAudioPathConfig not registered\n");
+ return;
+ }
ok(hr == S_OK, "DirectMusicAudioPathConfig create failed: %08x, expected S_OK\n", hr);
/* IPersistStream */
diff -Nru wine1.7-1.7.22/dlls/dsound/dsound_main.c wine1.7-1.7.24/dlls/dsound/dsound_main.c
--- wine1.7-1.7.22/dlls/dsound/dsound_main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dsound/dsound_main.c 2014-08-08 20:19:29.000000000 +0000
@@ -178,7 +178,8 @@
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL,
CLSCTX_INPROC_SERVER, &IID_IMMDeviceEnumerator, (void**)devenum);
if(FAILED(hr)){
- CoUninitialize();
+ if(SUCCEEDED(init_hr))
+ CoUninitialize();
*devenum = NULL;
ERR("CoCreateInstance failed: %08x\n", hr);
return hr;
diff -Nru wine1.7-1.7.22/dlls/dwrite/analyzer.c wine1.7-1.7.24/dlls/dwrite/analyzer.c
--- wine1.7-1.7.22/dlls/dwrite/analyzer.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/analyzer.c 2014-08-08 20:19:29.000000000 +0000
@@ -23,8 +23,6 @@
#include "dwrite.h"
#include "dwrite_private.h"
-#include "wine/debug.h"
-
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
enum scriptcode {
diff -Nru wine1.7-1.7.22/dlls/dwrite/dwrite_private.h wine1.7-1.7.24/dlls/dwrite/dwrite_private.h
--- wine1.7-1.7.22/dlls/dwrite/dwrite_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/dwrite_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -16,6 +16,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "wine/debug.h"
#include "wine/unicode.h"
static inline void *heap_alloc(size_t len)
@@ -71,11 +72,16 @@
return ret;
}
+static inline const char *debugstr_range(const DWRITE_TEXT_RANGE *range)
+{
+ return wine_dbg_sprintf("%u:%u", range->startPosition, range->length);
+}
+
extern HRESULT create_font_from_logfont(const LOGFONTW*, IDWriteFont**) DECLSPEC_HIDDEN;
extern HRESULT convert_fontface_to_logfont(IDWriteFontFace*, LOGFONTW*) DECLSPEC_HIDDEN;
extern HRESULT create_textformat(const WCHAR*,IDWriteFontCollection*,DWRITE_FONT_WEIGHT,DWRITE_FONT_STYLE,DWRITE_FONT_STRETCH,
FLOAT,const WCHAR*,IDWriteTextFormat**) DECLSPEC_HIDDEN;
-extern HRESULT create_textlayout(const WCHAR*,UINT32,IDWriteTextFormat*,IDWriteTextLayout**) DECLSPEC_HIDDEN;
+extern HRESULT create_textlayout(const WCHAR*,UINT32,IDWriteTextFormat*,FLOAT,FLOAT,IDWriteTextLayout**) DECLSPEC_HIDDEN;
extern HRESULT create_trimmingsign(IDWriteInlineObject**) DECLSPEC_HIDDEN;
extern HRESULT get_gdiinterop(IDWriteGdiInterop**) DECLSPEC_HIDDEN;
extern HRESULT create_localizedstrings(IDWriteLocalizedStrings**) DECLSPEC_HIDDEN;
diff -Nru wine1.7-1.7.22/dlls/dwrite/font.c wine1.7-1.7.24/dlls/dwrite/font.c
--- wine1.7-1.7.22/dlls/dwrite/font.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/font.c 2014-08-08 20:19:29.000000000 +0000
@@ -23,8 +23,6 @@
#include "dwrite.h"
#include "dwrite_private.h"
-#include "wine/debug.h"
-
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
/* PANOSE is 10 bytes in size, need to pack the structure properly */
diff -Nru wine1.7-1.7.22/dlls/dwrite/gdiinterop.c wine1.7-1.7.24/dlls/dwrite/gdiinterop.c
--- wine1.7-1.7.22/dlls/dwrite/gdiinterop.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/gdiinterop.c 2014-08-08 20:19:29.000000000 +0000
@@ -36,10 +36,33 @@
IDWriteBitmapRenderTarget IDWriteBitmapRenderTarget_iface;
LONG ref;
+ DWRITE_MATRIX m;
SIZE size;
HDC hdc;
};
+static HRESULT create_target_dibsection(HDC hdc, UINT32 width, UINT32 height)
+{
+ char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
+ BITMAPINFO *bmi = (BITMAPINFO*)bmibuf;
+ HBITMAP hbm;
+
+ memset(bmi, 0, sizeof(bmibuf));
+ bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
+ bmi->bmiHeader.biHeight = height;
+ bmi->bmiHeader.biWidth = width;
+ bmi->bmiHeader.biBitCount = 32;
+ bmi->bmiHeader.biPlanes = 1;
+ bmi->bmiHeader.biCompression = BI_RGB;
+
+ hbm = CreateDIBSection(hdc, bmi, DIB_RGB_COLORS, NULL, NULL, 0);
+ if (!hbm)
+ hbm = CreateBitmap(1, 1, 1, 1, NULL);
+
+ DeleteObject(SelectObject(hdc, hbm));
+ return S_OK;
+}
+
static inline struct rendertarget *impl_from_IDWriteBitmapRenderTarget(IDWriteBitmapRenderTarget *iface)
{
return CONTAINING_RECORD(iface, struct rendertarget, IDWriteBitmapRenderTarget_iface);
@@ -122,8 +145,11 @@
static HRESULT WINAPI rendertarget_GetCurrentTransform(IDWriteBitmapRenderTarget *iface, DWRITE_MATRIX *transform)
{
struct rendertarget *This = impl_from_IDWriteBitmapRenderTarget(iface);
- FIXME("(%p)->(%p): stub\n", This, transform);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, transform);
+
+ *transform = This->m;
+ return S_OK;
}
static HRESULT WINAPI rendertarget_SetCurrentTransform(IDWriteBitmapRenderTarget *iface, DWRITE_MATRIX const *transform)
@@ -145,8 +171,13 @@
static HRESULT WINAPI rendertarget_Resize(IDWriteBitmapRenderTarget *iface, UINT32 width, UINT32 height)
{
struct rendertarget *This = impl_from_IDWriteBitmapRenderTarget(iface);
- FIXME("(%p)->(%u %u): stub\n", This, width, height);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%u %u)\n", This, width, height);
+
+ if (This->size.cx == width && This->size.cy == height)
+ return S_OK;
+
+ return create_target_dibsection(This->hdc, width, height);
}
static const IDWriteBitmapRenderTargetVtbl rendertargetvtbl = {
@@ -163,38 +194,34 @@
rendertarget_Resize
};
-static HRESULT create_rendertarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **target)
+static HRESULT create_rendertarget(HDC hdc, UINT32 width, UINT32 height, IDWriteBitmapRenderTarget **ret)
{
- char bmibuf[FIELD_OFFSET(BITMAPINFO, bmiColors[256])];
- BITMAPINFO *bmi = (BITMAPINFO*)bmibuf;
- struct rendertarget *This;
- HBITMAP dib;
+ struct rendertarget *target;
+ HRESULT hr;
- *target = NULL;
+ *ret = NULL;
- This = heap_alloc(sizeof(struct rendertarget));
- if (!This) return E_OUTOFMEMORY;
+ target = heap_alloc(sizeof(struct rendertarget));
+ if (!target) return E_OUTOFMEMORY;
- This->IDWriteBitmapRenderTarget_iface.lpVtbl = &rendertargetvtbl;
- This->ref = 1;
+ target->IDWriteBitmapRenderTarget_iface.lpVtbl = &rendertargetvtbl;
+ target->ref = 1;
- This->size.cx = width;
- This->size.cy = height;
+ target->size.cx = width;
+ target->size.cy = height;
- This->hdc = CreateCompatibleDC(hdc);
-
- memset(bmi, 0, sizeof(bmibuf));
- bmi->bmiHeader.biSize = sizeof(bmi->bmiHeader);
- bmi->bmiHeader.biHeight = height;
- bmi->bmiHeader.biWidth = width;
- bmi->bmiHeader.biBitCount = 32;
- bmi->bmiHeader.biPlanes = 1;
- bmi->bmiHeader.biCompression = BI_RGB;
+ target->hdc = CreateCompatibleDC(hdc);
+ hr = create_target_dibsection(target->hdc, width, height);
+ if (FAILED(hr)) {
+ IDWriteBitmapRenderTarget_Release(&target->IDWriteBitmapRenderTarget_iface);
+ return hr;
+ }
- dib = CreateDIBSection(This->hdc, bmi, DIB_RGB_COLORS, NULL, NULL, 0);
- SelectObject(This->hdc, dib);
+ target->m.m11 = target->m.m22 = 1.0;
+ target->m.m12 = target->m.m21 = 0.0;
+ target->m.dx = target->m.dy = 0.0;
- *target = &This->IDWriteBitmapRenderTarget_iface;
+ *ret = &target->IDWriteBitmapRenderTarget_iface;
return S_OK;
}
diff -Nru wine1.7-1.7.22/dlls/dwrite/layout.c wine1.7-1.7.24/dlls/dwrite/layout.c
--- wine1.7-1.7.22/dlls/dwrite/layout.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/layout.c 2014-08-08 20:19:29.000000000 +0000
@@ -28,8 +28,6 @@
#include "dwrite.h"
#include "dwrite_private.h"
-#include "wine/debug.h"
-
WINE_DEFAULT_DEBUG_CHANNEL(dwrite);
struct dwrite_textformat_data {
@@ -66,6 +64,8 @@
WCHAR *str;
UINT32 len;
struct dwrite_textformat_data format;
+ FLOAT maxwidth;
+ FLOAT maxheight;
};
struct dwrite_textformat {
@@ -340,113 +340,115 @@
static HRESULT WINAPI dwritetextlayout_SetMaxWidth(IDWriteTextLayout *iface, FLOAT maxWidth)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%f): stub\n", This, maxWidth);
- return E_NOTIMPL;
+ TRACE("(%p)->(%.1f)\n", This, maxWidth);
+ This->maxwidth = maxWidth;
+ return S_OK;
}
static HRESULT WINAPI dwritetextlayout_SetMaxHeight(IDWriteTextLayout *iface, FLOAT maxHeight)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%f): stub\n", This, maxHeight);
- return E_NOTIMPL;
+ TRACE("(%p)->(%.1f)\n", This, maxHeight);
+ This->maxheight = maxHeight;
+ return S_OK;
}
static HRESULT WINAPI dwritetextlayout_SetFontCollection(IDWriteTextLayout *iface, IDWriteFontCollection* collection, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%p %u:%u): stub\n", This, collection, range.startPosition, range.length);
+ FIXME("(%p)->(%p %s): stub\n", This, collection, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetFontFamilyName(IDWriteTextLayout *iface, WCHAR const *name, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%s %u:%u): stub\n", This, debugstr_w(name), range.startPosition, range.length);
+ FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(name), debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetFontWeight(IDWriteTextLayout *iface, DWRITE_FONT_WEIGHT weight, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%d %u:%u): stub\n", This, weight, range.startPosition, range.length);
+ FIXME("(%p)->(%d %s): stub\n", This, weight, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetFontStyle(IDWriteTextLayout *iface, DWRITE_FONT_STYLE style, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%d %u:%u): stub\n", This, style, range.startPosition, range.length);
+ FIXME("(%p)->(%d %s): stub\n", This, style, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetFontStretch(IDWriteTextLayout *iface, DWRITE_FONT_STRETCH stretch, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%d %u:%u): stub\n", This, stretch, range.startPosition, range.length);
+ FIXME("(%p)->(%d %s): stub\n", This, stretch, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetFontSize(IDWriteTextLayout *iface, FLOAT size, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%f %u:%u): stub\n", This, size, range.startPosition, range.length);
+ FIXME("(%p)->(%f %s): stub\n", This, size, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetUnderline(IDWriteTextLayout *iface, BOOL underline, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%d %u:%u): stub\n", This, underline, range.startPosition, range.length);
+ FIXME("(%p)->(%d %s): stub\n", This, underline, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetStrikethrough(IDWriteTextLayout *iface, BOOL strikethrough, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%d %u:%u): stub\n", This, strikethrough, range.startPosition, range.length);
+ FIXME("(%p)->(%d %s): stub\n", This, strikethrough, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetDrawingEffect(IDWriteTextLayout *iface, IUnknown* effect, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%p %u:%u): stub\n", This, effect, range.startPosition, range.length);
+ FIXME("(%p)->(%p %s): stub\n", This, effect, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetInlineObject(IDWriteTextLayout *iface, IDWriteInlineObject *object, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%p %u:%u): stub\n", This, object, range.startPosition, range.length);
+ FIXME("(%p)->(%p %s): stub\n", This, object, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetTypography(IDWriteTextLayout *iface, IDWriteTypography* typography, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%p %u:%u): stub\n", This, typography, range.startPosition, range.length);
+ FIXME("(%p)->(%p %s): stub\n", This, typography, debugstr_range(&range));
return E_NOTIMPL;
}
static HRESULT WINAPI dwritetextlayout_SetLocaleName(IDWriteTextLayout *iface, WCHAR const* locale, DWRITE_TEXT_RANGE range)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p)->(%s %u:%u): stub\n", This, debugstr_w(locale), range.startPosition, range.length);
+ FIXME("(%p)->(%s %s): stub\n", This, debugstr_w(locale), debugstr_range(&range));
return E_NOTIMPL;
}
static FLOAT WINAPI dwritetextlayout_GetMaxWidth(IDWriteTextLayout *iface)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p): stub\n", This);
- return 0.0;
+ TRACE("(%p)\n", This);
+ return This->maxwidth;
}
static FLOAT WINAPI dwritetextlayout_GetMaxHeight(IDWriteTextLayout *iface)
{
struct dwrite_textlayout *This = impl_from_IDWriteTextLayout(iface);
- FIXME("(%p): stub\n", This);
- return 0.0;
+ TRACE("(%p)\n", This);
+ return This->maxheight;
}
static HRESULT WINAPI dwritetextlayout_layout_GetFontCollection(IDWriteTextLayout *iface, UINT32 pos,
@@ -752,7 +754,7 @@
IDWriteTextFormat_GetFontCollection(format, &layout->format.collection);
}
-HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *format, IDWriteTextLayout **layout)
+HRESULT create_textlayout(const WCHAR *str, UINT32 len, IDWriteTextFormat *format, FLOAT maxwidth, FLOAT maxheight, IDWriteTextLayout **layout)
{
struct dwrite_textlayout *This;
@@ -765,6 +767,8 @@
This->ref = 1;
This->str = heap_strdupnW(str, len);
This->len = len;
+ This->maxwidth = maxwidth;
+ This->maxheight = maxheight;
layout_format_from_textformat(This, format);
*layout = &This->IDWriteTextLayout_iface;
diff -Nru wine1.7-1.7.22/dlls/dwrite/main.c wine1.7-1.7.24/dlls/dwrite/main.c
--- wine1.7-1.7.22/dlls/dwrite/main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/main.c 2014-08-08 20:19:29.000000000 +0000
@@ -359,14 +359,30 @@
return S_OK;
}
+struct dwritefactory{
+ IDWriteFactory IDWriteFactory_iface;
+ LONG ref;
+
+ IDWriteFontCollectionLoader **loaders;
+ LONG loader_count;
+};
+
+static inline struct dwritefactory *impl_from_IDWriteFactory(IDWriteFactory *iface)
+{
+ return CONTAINING_RECORD(iface, struct dwritefactory, IDWriteFactory_iface);
+}
+
static HRESULT WINAPI dwritefactory_QueryInterface(IDWriteFactory *iface, REFIID riid, void **obj)
{
- TRACE("(%s %p)\n", debugstr_guid(riid), obj);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+
+ TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj);
if (IsEqualIID(riid, &IID_IUnknown) ||
IsEqualIID(riid, &IID_IDWriteFactory))
{
*obj = iface;
+ IDWriteFactory_AddRef(iface);
return S_OK;
}
@@ -377,18 +393,36 @@
static ULONG WINAPI dwritefactory_AddRef(IDWriteFactory *iface)
{
- return 2;
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ ULONG ref = InterlockedIncrement(&This->ref);
+ TRACE("(%p)->(%d)\n", This, ref);
+ return ref;
}
static ULONG WINAPI dwritefactory_Release(IDWriteFactory *iface)
{
- return 1;
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ ULONG ref = InterlockedDecrement(&This->ref);
+
+ TRACE("(%p)->(%d)\n", This, ref);
+
+ if (!ref) {
+ int i;
+ for (i = 0; i < This->loader_count; i++)
+ if (This->loaders[i])
+ IDWriteFontCollectionLoader_Release(This->loaders[i]);
+ heap_free(This->loaders);
+ heap_free(This);
+ }
+
+ return ref;
}
static HRESULT WINAPI dwritefactory_GetSystemFontCollection(IDWriteFactory *iface,
IDWriteFontCollection **collection, BOOL check_for_updates)
{
- TRACE("(%p %d)\n", collection, check_for_updates);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%p %d)\n", This, collection, check_for_updates);
if (check_for_updates)
FIXME("checking for system font updates not implemented\n");
@@ -399,35 +433,78 @@
static HRESULT WINAPI dwritefactory_CreateCustomFontCollection(IDWriteFactory *iface,
IDWriteFontCollectionLoader *loader, void const *key, UINT32 key_size, IDWriteFontCollection **collection)
{
- FIXME("(%p %p %u %p): stub\n", loader, key, key_size, collection);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p %p %u %p): stub\n", This, loader, key, key_size, collection);
return E_NOTIMPL;
}
static HRESULT WINAPI dwritefactory_RegisterFontCollectionLoader(IDWriteFactory *iface,
IDWriteFontCollectionLoader *loader)
{
- FIXME("(%p): stub\n", loader);
- return E_NOTIMPL;
+ int i;
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+
+ TRACE("(%p)->(%p)\n", This, loader);
+
+ for (i = 0; i < This->loader_count; i++)
+ if (This->loaders[i] == loader)
+ return DWRITE_E_ALREADYREGISTERED;
+ else if (This->loaders[i] == NULL)
+ break;
+
+ if (i == This->loader_count)
+ {
+ IDWriteFontCollectionLoader **new_list = NULL;
+ int new_count = 0;
+
+ new_count = This->loader_count * 2;
+ new_list = heap_realloc(This->loaders, new_count * sizeof(*This->loaders));
+
+ if (!new_list)
+ return E_OUTOFMEMORY;
+ else
+ {
+ This->loader_count = new_count;
+ This->loaders = new_list;
+ }
+ }
+ IDWriteFontCollectionLoader_AddRef(loader);
+ This->loaders[i] = loader;
+
+ return S_OK;
}
static HRESULT WINAPI dwritefactory_UnregisterFontCollectionLoader(IDWriteFactory *iface,
IDWriteFontCollectionLoader *loader)
{
- FIXME("(%p): stub\n", loader);
- return E_NOTIMPL;
+ int i;
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+
+ TRACE("(%p)->(%p)\n", This, loader);
+
+ for (i = 0; i < This->loader_count; i++)
+ if (This->loaders[i] == loader) break;
+ if (i == This->loader_count)
+ return E_INVALIDARG;
+ IDWriteFontCollectionLoader_Release(This->loaders[i]);
+ This->loaders[i] = NULL;
+
+ return S_OK;
}
static HRESULT WINAPI dwritefactory_CreateFontFileReference(IDWriteFactory *iface,
WCHAR const *path, FILETIME const *writetime, IDWriteFontFile **font_file)
{
- FIXME("(%s %p %p): stub\n", debugstr_w(path), writetime, font_file);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_w(path), writetime, font_file);
return E_NOTIMPL;
}
static HRESULT WINAPI dwritefactory_CreateCustomFontFileReference(IDWriteFactory *iface,
void const *reference_key, UINT32 key_size, IDWriteFontFileLoader *loader, IDWriteFontFile **font_file)
{
- FIXME("(%p %u %p %p): stub\n", reference_key, key_size, loader, font_file);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p %u %p %p): stub\n", This, reference_key, key_size, loader, font_file);
return E_NOTIMPL;
}
@@ -435,16 +512,18 @@
DWRITE_FONT_FACE_TYPE facetype, UINT32 files_number, IDWriteFontFile* const* font_files,
UINT32 index, DWRITE_FONT_SIMULATIONS sim_flags, IDWriteFontFace **font_face)
{
- FIXME("(%d %u %p %u 0x%x %p): stub\n", facetype, files_number, font_files, index, sim_flags, font_face);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%d %u %p %u 0x%x %p): stub\n", This, facetype, files_number, font_files, index, sim_flags, font_face);
return E_NOTIMPL;
}
static HRESULT WINAPI dwritefactory_CreateRenderingParams(IDWriteFactory *iface, IDWriteRenderingParams **params)
{
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
HMONITOR monitor;
POINT pt;
- TRACE("(%p)\n", params);
+ TRACE("(%p)->(%p)\n", This, params);
pt.x = pt.y = 0;
monitor = MonitorFromPoint(pt, MONITOR_DEFAULTTOPRIMARY);
@@ -454,9 +533,10 @@
static HRESULT WINAPI dwritefactory_CreateMonitorRenderingParams(IDWriteFactory *iface, HMONITOR monitor,
IDWriteRenderingParams **params)
{
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
static int fixme_once = 0;
- TRACE("(%p %p)\n", monitor, params);
+ TRACE("(%p)->(%p %p)\n", This, monitor, params);
if (!fixme_once++)
FIXME("(%p): monitor setting ignored\n", monitor);
@@ -467,19 +547,22 @@
static HRESULT WINAPI dwritefactory_CreateCustomRenderingParams(IDWriteFactory *iface, FLOAT gamma, FLOAT enhancedContrast,
FLOAT cleartype_level, DWRITE_PIXEL_GEOMETRY geometry, DWRITE_RENDERING_MODE mode, IDWriteRenderingParams **params)
{
- TRACE("(%f %f %f %d %d %p)\n", gamma, enhancedContrast, cleartype_level, geometry, mode, params);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%f %f %f %d %d %p)\n", This, gamma, enhancedContrast, cleartype_level, geometry, mode, params);
return create_renderingparams(gamma, enhancedContrast, cleartype_level, geometry, mode, params);
}
static HRESULT WINAPI dwritefactory_RegisterFontFileLoader(IDWriteFactory *iface, IDWriteFontFileLoader *loader)
{
- FIXME("(%p): stub\n", loader);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p): stub\n", This, loader);
return E_NOTIMPL;
}
static HRESULT WINAPI dwritefactory_UnregisterFontFileLoader(IDWriteFactory *iface, IDWriteFontFileLoader *loader)
{
- FIXME("(%p): stub\n", loader);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p): stub\n", This, loader);
return E_NOTIMPL;
}
@@ -487,60 +570,68 @@
IDWriteFontCollection *collection, DWRITE_FONT_WEIGHT weight, DWRITE_FONT_STYLE style,
DWRITE_FONT_STRETCH stretch, FLOAT size, WCHAR const *locale, IDWriteTextFormat **format)
{
- TRACE("(%s %p %d %d %d %f %s %p)\n", debugstr_w(family_name), collection, weight, style, stretch,
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%s %p %d %d %d %f %s %p)\n", This, debugstr_w(family_name), collection, weight, style, stretch,
size, debugstr_w(locale), format);
return create_textformat(family_name, collection, weight, style, stretch, size, locale, format);
}
static HRESULT WINAPI dwritefactory_CreateTypography(IDWriteFactory *iface, IDWriteTypography **typography)
{
- FIXME("(%p): stub\n", typography);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p): stub\n", This, typography);
return E_NOTIMPL;
}
static HRESULT WINAPI dwritefactory_GetGdiInterop(IDWriteFactory *iface, IDWriteGdiInterop **gdi_interop)
{
- TRACE("(%p)\n", gdi_interop);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%p)\n", This, gdi_interop);
return get_gdiinterop(gdi_interop);
}
static HRESULT WINAPI dwritefactory_CreateTextLayout(IDWriteFactory *iface, WCHAR const* string,
UINT32 len, IDWriteTextFormat *format, FLOAT max_width, FLOAT max_height, IDWriteTextLayout **layout)
{
- TRACE("(%s %u %p %f %f %p)\n", debugstr_w(string), len, format, max_width, max_height, layout);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%s %u %p %f %f %p)\n", This, debugstr_w(string), len, format, max_width, max_height, layout);
if (!format) return E_INVALIDARG;
- return create_textlayout(string, len, format, layout);
+ return create_textlayout(string, len, format, max_width, max_height, layout);
}
static HRESULT WINAPI dwritefactory_CreateGdiCompatibleTextLayout(IDWriteFactory *iface, WCHAR const* string,
UINT32 len, IDWriteTextFormat *format, FLOAT layout_width, FLOAT layout_height, FLOAT pixels_per_dip,
DWRITE_MATRIX const* transform, BOOL use_gdi_natural, IDWriteTextLayout **layout)
{
- FIXME("(%s:%u %p %f %f %f %p %d %p): semi-stub\n", debugstr_wn(string, len), len, format, layout_width, layout_height,
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%s:%u %p %f %f %f %p %d %p): semi-stub\n", This, debugstr_wn(string, len), len, format, layout_width, layout_height,
pixels_per_dip, transform, use_gdi_natural, layout);
if (!format) return E_INVALIDARG;
- return create_textlayout(string, len, format, layout);
+ return create_textlayout(string, len, format, layout_width, layout_height, layout);
}
static HRESULT WINAPI dwritefactory_CreateEllipsisTrimmingSign(IDWriteFactory *iface, IDWriteTextFormat *format,
IDWriteInlineObject **trimming_sign)
{
- FIXME("(%p %p): semi-stub\n", format, trimming_sign);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p %p): semi-stub\n", This, format, trimming_sign);
return create_trimmingsign(trimming_sign);
}
static HRESULT WINAPI dwritefactory_CreateTextAnalyzer(IDWriteFactory *iface, IDWriteTextAnalyzer **analyzer)
{
- TRACE("(%p)\n", analyzer);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ TRACE("(%p)->(%p)\n", This, analyzer);
return get_textanalyzer(analyzer);
}
static HRESULT WINAPI dwritefactory_CreateNumberSubstitution(IDWriteFactory *iface, DWRITE_NUMBER_SUBSTITUTION_METHOD method,
WCHAR const* locale, BOOL ignore_user_override, IDWriteNumberSubstitution **substitution)
{
- FIXME("(%d %s %d %p): stub\n", method, debugstr_w(locale), ignore_user_override, substitution);
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%d %s %d %p): stub\n", This, method, debugstr_w(locale), ignore_user_override, substitution);
return E_NOTIMPL;
}
@@ -548,7 +639,8 @@
FLOAT pixels_per_dip, DWRITE_MATRIX const* transform, DWRITE_RENDERING_MODE rendering_mode,
DWRITE_MEASURING_MODE measuring_mode, FLOAT baseline_x, FLOAT baseline_y, IDWriteGlyphRunAnalysis **analysis)
{
- FIXME("(%p %f %p %d %d %f %f %p): stub\n", glyph_run, pixels_per_dip, transform, rendering_mode,
+ struct dwritefactory *This = impl_from_IDWriteFactory(iface);
+ FIXME("(%p)->(%p %f %p %d %d %f %f %p): stub\n", This, glyph_run, pixels_per_dip, transform, rendering_mode,
measuring_mode, baseline_x, baseline_y, analysis);
return E_NOTIMPL;
}
@@ -580,15 +672,23 @@
dwritefactory_CreateGlyphRunAnalysis
};
-static IDWriteFactory dwritefactory = { &dwritefactoryvtbl };
-
HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE type, REFIID riid, IUnknown **factory)
{
+ struct dwritefactory *This;
+
TRACE("(%d, %s, %p)\n", type, debugstr_guid(riid), factory);
if (!IsEqualIID(riid, &IID_IDWriteFactory)) return E_FAIL;
- *factory = (IUnknown*)&dwritefactory;
+ This = heap_alloc(sizeof(struct dwritefactory));
+ if (!This) return E_OUTOFMEMORY;
+
+ This->IDWriteFactory_iface.lpVtbl = &dwritefactoryvtbl;
+ This->ref = 1;
+ This->loader_count = 2;
+ This->loaders = heap_alloc_zero(sizeof(*This->loaders) * 2);
+
+ *factory = (IUnknown*)&This->IDWriteFactory_iface;
return S_OK;
}
diff -Nru wine1.7-1.7.22/dlls/dwrite/tests/analyzer.c wine1.7-1.7.24/dlls/dwrite/tests/analyzer.c
--- wine1.7-1.7.22/dlls/dwrite/tests/analyzer.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/tests/analyzer.c 2014-08-08 20:19:29.000000000 +0000
@@ -25,6 +25,7 @@
#include "initguid.h"
#include "windows.h"
#include "dwrite.h"
+#include "dwrite_2.h"
#include "wine/test.h"
diff -Nru wine1.7-1.7.22/dlls/dwrite/tests/font.c wine1.7-1.7.24/dlls/dwrite/tests/font.c
--- wine1.7-1.7.22/dlls/dwrite/tests/font.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/tests/font.c 2014-08-08 20:19:29.000000000 +0000
@@ -198,8 +198,9 @@
{
IDWriteBitmapRenderTarget *target, *target2;
IDWriteGdiInterop *interop;
+ HBITMAP hbm, hbm2;
+ DWRITE_MATRIX m;
DIBSECTION ds;
- HBITMAP hbm;
HRESULT hr;
SIZE size;
HDC hdc;
@@ -272,8 +273,66 @@
ok(size.cx == 10, "got %d\n", size.cx);
ok(size.cy == 5, "got %d\n", size.cy);
- IDWriteBitmapRenderTarget_Release(target);
+ /* resize to same size */
+ hr = IDWriteBitmapRenderTarget_Resize(target, 10, 5);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hbm2 = GetCurrentObject(hdc, OBJ_BITMAP);
+ ok(hbm2 == hbm, "got %p, %p\n", hbm2, hbm);
+
+ /* shrink */
+ hr = IDWriteBitmapRenderTarget_Resize(target, 5, 5);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hbm2 = GetCurrentObject(hdc, OBJ_BITMAP);
+ ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
+
+ hr = IDWriteBitmapRenderTarget_Resize(target, 20, 5);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hbm2 = GetCurrentObject(hdc, OBJ_BITMAP);
+ ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
+
+ hr = IDWriteBitmapRenderTarget_Resize(target, 1, 5);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hbm2 = GetCurrentObject(hdc, OBJ_BITMAP);
+ ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
+
+ ret = GetObjectW(hbm2, sizeof(ds), &ds);
+ ok(ret == sizeof(ds), "got %d\n", ret);
+ ok(ds.dsBm.bmWidth == 1, "got %d\n", ds.dsBm.bmWidth);
+ ok(ds.dsBm.bmHeight == 5, "got %d\n", ds.dsBm.bmHeight);
+ ok(ds.dsBm.bmPlanes == 1, "got %d\n", ds.dsBm.bmPlanes);
+ ok(ds.dsBm.bmBitsPixel == 32, "got %d\n", ds.dsBm.bmBitsPixel);
+ ok(ds.dsBm.bmBits != NULL, "got %p\n", ds.dsBm.bmBits);
+
+ /* empty rectangle */
+ hr = IDWriteBitmapRenderTarget_Resize(target, 0, 5);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hbm2 = GetCurrentObject(hdc, OBJ_BITMAP);
+ ok(hbm2 != hbm, "got %p, %p\n", hbm2, hbm);
+
+ ret = GetObjectW(hbm2, sizeof(ds), &ds);
+ ok(ret == sizeof(BITMAP), "got %d\n", ret);
+ ok(ds.dsBm.bmWidth == 1, "got %d\n", ds.dsBm.bmWidth);
+ ok(ds.dsBm.bmHeight == 1, "got %d\n", ds.dsBm.bmHeight);
+ ok(ds.dsBm.bmPlanes == 1, "got %d\n", ds.dsBm.bmPlanes);
+ ok(ds.dsBm.bmBitsPixel == 1, "got %d\n", ds.dsBm.bmBitsPixel);
+ ok(!ds.dsBm.bmBits, "got %p\n", ds.dsBm.bmBits);
+ /* transform tests */
+if (0) /* crashes on native */
+ hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, NULL);
+
+ memset(&m, 0xcc, sizeof(m));
+ hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, &m);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(m.m11 == 1.0 && m.m22 == 1.0 && m.m12 == 0.0 && m.m21 == 0.0, "got %.1f,%.1f,%.1f,%.1f\n", m.m11, m.m22, m.m12, m.m21);
+ ok(m.dx == 0.0 && m.dy == 0.0, "got %.1f,%.1f\n", m.dx, m.dy);
+
+ IDWriteBitmapRenderTarget_Release(target);
IDWriteGdiInterop_Release(interop);
}
@@ -614,6 +673,55 @@
IDWriteFontFace_Release(fontface);
}
+static HRESULT WINAPI fontcollectionloader_QueryInterface(IDWriteFontCollectionLoader *iface, REFIID riid, void **obj)
+{
+ *obj = iface;
+ return S_OK;
+}
+
+static ULONG WINAPI fontcollectionloader_AddRef(IDWriteFontCollectionLoader *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI fontcollectionloader_Release(IDWriteFontCollectionLoader *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI fontcollectionloader_CreateEnumeratorFromKey(IDWriteFontCollectionLoader *iface, IDWriteFactory * factory, const void * collectionKey, UINT32 collectionKeySize, IDWriteFontFileEnumerator ** fontFileEnumerator)
+{
+ return S_OK;
+}
+
+static const struct IDWriteFontCollectionLoaderVtbl dwritefontcollectionloadervtbl = {
+ fontcollectionloader_QueryInterface,
+ fontcollectionloader_AddRef,
+ fontcollectionloader_Release,
+ fontcollectionloader_CreateEnumeratorFromKey
+};
+
+static void test_CustomFontCollection(void)
+{
+ IDWriteFontCollectionLoader collection = { &dwritefontcollectionloadervtbl };
+ IDWriteFontCollectionLoader collection2 = { &dwritefontcollectionloadervtbl };
+ HRESULT hr;
+
+ hr = IDWriteFactory_RegisterFontCollectionLoader(factory, &collection);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ hr = IDWriteFactory_RegisterFontCollectionLoader(factory, &collection2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ hr = IDWriteFactory_RegisterFontCollectionLoader(factory, &collection);
+ ok(hr == DWRITE_E_ALREADYREGISTERED, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, &collection);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, &collection);
+ ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
+ hr = IDWriteFactory_UnregisterFontCollectionLoader(factory, &collection2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+}
+
START_TEST(font)
{
HRESULT hr;
@@ -634,6 +742,7 @@
test_GetMetrics();
test_system_fontcollection();
test_ConvertFontFaceToLOGFONT();
+ test_CustomFontCollection();
IDWriteFactory_Release(factory);
}
diff -Nru wine1.7-1.7.22/dlls/dwrite/tests/layout.c wine1.7-1.7.24/dlls/dwrite/tests/layout.c
--- wine1.7-1.7.22/dlls/dwrite/tests/layout.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dwrite/tests/layout.c 2014-08-08 20:19:29.000000000 +0000
@@ -20,8 +20,11 @@
#define COBJMACROS
+#include
+
#include "windows.h"
#include "dwrite.h"
+#include "dwrite_2.h"
#include "wine/test.h"
@@ -38,6 +41,271 @@
ok_(__FILE__,line)(rc-1 == ref, "expected refcount %d, got %d\n", ref, rc-1);
}
+enum drawcall_kind {
+ DRAW_GLYPHRUN = 0,
+ DRAW_UNDERLINE,
+ DRAW_STRIKETHROUGH,
+ DRAW_INLINE,
+ DRAW_LAST_KIND
+};
+
+static const char *get_draw_kind_name(enum drawcall_kind kind)
+{
+ static const char *kind_names[] = { "GLYPH_RUN", "UNDERLINE", "STRIKETHROUGH", "INLINE", "END_OF_SEQ" };
+ return kind > DRAW_LAST_KIND ? "unknown" : kind_names[kind];
+}
+
+struct drawcall_entry {
+ enum drawcall_kind kind;
+};
+
+struct drawcall_sequence
+{
+ int count;
+ int size;
+ struct drawcall_entry *sequence;
+};
+
+struct drawtestcontext {
+ enum drawcall_kind kind;
+ BOOL todo;
+ int *failcount;
+ const char *file;
+ int line;
+};
+
+#define NUM_CALL_SEQUENCES 1
+#define RENDERER_ID 0
+static struct drawcall_sequence *sequences[NUM_CALL_SEQUENCES];
+static struct drawcall_sequence *expected_seq[1];
+
+static void add_call(struct drawcall_sequence **seq, int sequence_index, const struct drawcall_entry *call)
+{
+ struct drawcall_sequence *call_seq = seq[sequence_index];
+
+ if (!call_seq->sequence) {
+ call_seq->size = 10;
+ call_seq->sequence = HeapAlloc(GetProcessHeap(), 0, call_seq->size * sizeof (struct drawcall_entry));
+ }
+
+ if (call_seq->count == call_seq->size) {
+ call_seq->size *= 2;
+ call_seq->sequence = HeapReAlloc(GetProcessHeap(), 0,
+ call_seq->sequence,
+ call_seq->size * sizeof (struct drawcall_entry));
+ }
+
+ assert(call_seq->sequence);
+ call_seq->sequence[call_seq->count++] = *call;
+}
+
+static inline void flush_sequence(struct drawcall_sequence **seg, int sequence_index)
+{
+ struct drawcall_sequence *call_seq = seg[sequence_index];
+
+ HeapFree(GetProcessHeap(), 0, call_seq->sequence);
+ call_seq->sequence = NULL;
+ call_seq->count = call_seq->size = 0;
+}
+
+static inline void flush_sequences(struct drawcall_sequence **seq, int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ flush_sequence(seq, i);
+}
+
+static void init_call_sequences(struct drawcall_sequence **seq, int n)
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ seq[i] = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(struct drawcall_sequence));
+}
+
+static void ok_sequence_(struct drawcall_sequence **seq, int sequence_index,
+ const struct drawcall_entry *expected, const char *context, BOOL todo,
+ const char *file, int line)
+{
+ static const struct drawcall_entry end_of_sequence = { DRAW_LAST_KIND };
+ struct drawcall_sequence *call_seq = seq[sequence_index];
+ const struct drawcall_entry *actual, *sequence;
+ int failcount = 0;
+
+ add_call(seq, sequence_index, &end_of_sequence);
+
+ sequence = call_seq->sequence;
+ actual = sequence;
+
+ while (expected->kind != DRAW_LAST_KIND && actual->kind != DRAW_LAST_KIND) {
+ if (expected->kind != actual->kind) {
+ if (todo) {
+ failcount++;
+ todo_wine
+ ok_(file, line) (0, "%s: call %s was expected, but got call %s instead\n",
+ context, get_draw_kind_name(expected->kind), get_draw_kind_name(actual->kind));
+
+ flush_sequence(seq, sequence_index);
+ return;
+ }
+ else
+ ok_(file, line) (0, "%s: call %s was expected, but got call %s instead\n",
+ context, get_draw_kind_name(expected->kind), get_draw_kind_name(actual->kind));
+ }
+ expected++;
+ actual++;
+ }
+
+ if (todo) {
+ todo_wine {
+ if (expected->kind != DRAW_LAST_KIND || actual->kind != DRAW_LAST_KIND) {
+ failcount++;
+ ok_(file, line) (0, "%s: the call sequence is not complete: expected %s - actual %s\n",
+ context, get_draw_kind_name(expected->kind), get_draw_kind_name(actual->kind));
+ }
+ }
+ }
+ else if (expected->kind != DRAW_LAST_KIND || actual->kind != DRAW_LAST_KIND)
+ ok_(file, line) (0, "%s: the call sequence is not complete: expected %s - actual %s\n",
+ context, get_draw_kind_name(expected->kind), get_draw_kind_name(actual->kind));
+
+ if (todo && !failcount) /* succeeded yet marked todo */
+ todo_wine
+ ok_(file, line)(1, "%s: marked \"todo_wine\" but succeeds\n", context);
+
+ flush_sequence(seq, sequence_index);
+}
+
+#define ok_sequence(seq, index, exp, contx, todo) \
+ ok_sequence_(seq, index, (exp), (contx), (todo), __FILE__, __LINE__)
+
+static HRESULT WINAPI testrenderer_QI(IDWriteTextRenderer *iface, REFIID riid, void **obj)
+{
+ if (IsEqualIID(riid, &IID_IDWriteTextRenderer) ||
+ IsEqualIID(riid, &IID_IDWritePixelSnapping) ||
+ IsEqualIID(riid, &IID_IUnknown)
+ ) {
+ *obj = iface;
+ return S_OK;
+ }
+
+ *obj = NULL;
+
+ /* IDWriteTextRenderer1 overrides drawing calls, ignore for now */
+ if (IsEqualIID(riid, &IID_IDWriteTextRenderer1))
+ return E_NOINTERFACE;
+
+ ok(0, "unexpected QI %s\n", wine_dbgstr_guid(riid));
+ return E_NOINTERFACE;
+}
+
+static ULONG WINAPI testrenderer_AddRef(IDWriteTextRenderer *iface)
+{
+ return 2;
+}
+
+static ULONG WINAPI testrenderer_Release(IDWriteTextRenderer *iface)
+{
+ return 1;
+}
+
+static HRESULT WINAPI testrenderer_IsPixelSnappingDisabled(IDWriteTextRenderer *iface,
+ void *client_drawingcontext, BOOL *disabled)
+{
+ *disabled = TRUE;
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_GetCurrentTransform(IDWriteTextRenderer *iface,
+ void *client_drawingcontext, DWRITE_MATRIX *transform)
+{
+ transform->m11 = 1.0;
+ transform->m12 = 0.0;
+ transform->m21 = 0.0;
+ transform->m22 = 1.0;
+ transform->dx = 0.0;
+ transform->dy = 0.0;
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_GetPixelsPerDip(IDWriteTextRenderer *iface,
+ void *client_drawingcontext, FLOAT *pixels_per_dip)
+{
+ *pixels_per_dip = 1.0;
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_DrawGlyphRun(IDWriteTextRenderer *iface,
+ void* client_drawingcontext,
+ FLOAT baselineOriginX,
+ FLOAT baselineOriginY,
+ DWRITE_MEASURING_MODE mode,
+ DWRITE_GLYPH_RUN const *glyph_run,
+ DWRITE_GLYPH_RUN_DESCRIPTION const *run_descr,
+ IUnknown *drawing_effect)
+{
+ struct drawcall_entry entry;
+ entry.kind = DRAW_GLYPHRUN;
+ add_call(sequences, RENDERER_ID, &entry);
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_DrawUnderline(IDWriteTextRenderer *iface,
+ void *client_drawingcontext,
+ FLOAT baselineOriginX,
+ FLOAT baselineOriginY,
+ DWRITE_UNDERLINE const* underline,
+ IUnknown *drawing_effect)
+{
+ struct drawcall_entry entry;
+ entry.kind = DRAW_UNDERLINE;
+ add_call(sequences, RENDERER_ID, &entry);
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_DrawStrikethrough(IDWriteTextRenderer *iface,
+ void *client_drawingcontext,
+ FLOAT baselineOriginX,
+ FLOAT baselineOriginY,
+ DWRITE_STRIKETHROUGH const* strikethrough,
+ IUnknown *drawing_effect)
+{
+ struct drawcall_entry entry;
+ entry.kind = DRAW_STRIKETHROUGH;
+ add_call(sequences, RENDERER_ID, &entry);
+ return S_OK;
+}
+
+static HRESULT WINAPI testrenderer_DrawInlineObject(IDWriteTextRenderer *iface,
+ void *client_drawingcontext,
+ FLOAT originX,
+ FLOAT originY,
+ IDWriteInlineObject *object,
+ BOOL is_sideways,
+ BOOL is_rtl,
+ IUnknown *drawing_effect)
+{
+ struct drawcall_entry entry;
+ entry.kind = DRAW_INLINE;
+ add_call(sequences, RENDERER_ID, &entry);
+ return S_OK;
+}
+
+static const IDWriteTextRendererVtbl testrenderervtbl = {
+ testrenderer_QI,
+ testrenderer_AddRef,
+ testrenderer_Release,
+ testrenderer_IsPixelSnappingDisabled,
+ testrenderer_GetCurrentTransform,
+ testrenderer_GetPixelsPerDip,
+ testrenderer_DrawGlyphRun,
+ testrenderer_DrawUnderline,
+ testrenderer_DrawStrikethrough,
+ testrenderer_DrawInlineObject
+};
+
+static IDWriteTextRenderer testrenderer = { &testrenderervtbl };
+
static void test_CreateTextLayout(void)
{
static const WCHAR strW[] = {'s','t','r','i','n','g',0};
@@ -65,6 +333,7 @@
static const WCHAR strW[] = {'s','t','r','i','n','g',0};
IDWriteTextLayout *layout;
IDWriteTextFormat *format;
+ FLOAT dimension;
HRESULT hr;
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, NULL, 0, NULL, 0.0, 0.0, 0.0, NULL, FALSE, &layout);
@@ -102,8 +371,14 @@
/* zero length string is okay */
hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, strW, 0, format, 100.0, 100.0, 1.0, NULL, FALSE, &layout);
ok(hr == S_OK, "got 0x%08x\n", hr);
- IDWriteTextLayout_Release(layout);
+ dimension = IDWriteTextLayout_GetMaxWidth(layout);
+ ok(dimension == 100.0, "got %f\n", dimension);
+
+ dimension = IDWriteTextLayout_GetMaxHeight(layout);
+ ok(dimension == 100.0, "got %f\n", dimension);
+
+ IDWriteTextLayout_Release(layout);
IDWriteTextFormat_Release(format);
}
@@ -262,6 +537,210 @@
IDWriteTextFormat_Release(format);
}
+static void test_fontweight(void)
+{
+ static const WCHAR strW[] = {'s','t','r','i','n','g',0};
+ static const WCHAR ruW[] = {'r','u',0};
+ IDWriteTextFormat *format, *fmt2;
+ IDWriteTextLayout *layout;
+ DWRITE_FONT_WEIGHT weight;
+ DWRITE_TEXT_RANGE range;
+ HRESULT hr;
+
+ hr = IDWriteFactory_CreateTextFormat(factory, tahomaW, NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL,
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, ruW, &format);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, strW, 0, format, 100.0, 100.0, 1.0, NULL, FALSE, &layout);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteTextLayout_QueryInterface(layout, &IID_IDWriteTextFormat, (void**)&fmt2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ weight = IDWriteTextFormat_GetFontWeight(fmt2);
+todo_wine
+ ok(weight == DWRITE_FONT_WEIGHT_BOLD, "got %u\n", weight);
+
+ range.startPosition = 0;
+ range.length = 6;
+ hr = IDWriteTextLayout_SetFontWeight(layout, DWRITE_FONT_WEIGHT_NORMAL, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ /* IDWriteTextFormat methods output doesn't reflect layout changes */
+ weight = IDWriteTextFormat_GetFontWeight(fmt2);
+todo_wine
+ ok(weight == DWRITE_FONT_WEIGHT_BOLD, "got %u\n", weight);
+
+ range.length = 0;
+ weight = DWRITE_FONT_WEIGHT_BOLD;
+ hr = layout->lpVtbl->IDWriteTextLayout_GetFontWeight(layout, 0, &weight, &range);
+todo_wine {
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(weight == DWRITE_FONT_WEIGHT_NORMAL, "got %d\n", weight);
+ ok(range.length == 6, "got %d\n", range.length);
+}
+ IDWriteTextLayout_Release(layout);
+ IDWriteTextFormat_Release(fmt2);
+ IDWriteTextFormat_Release(format);
+}
+
+static void test_SetInlineObject(void)
+{
+ static const WCHAR strW[] = {'s','t','r','i','n','g',0};
+ static const WCHAR ruW[] = {'r','u',0};
+
+ IDWriteInlineObject *inlineobj, *inlineobj2, *inlinetest;
+ IDWriteTextFormat *format;
+ IDWriteTextLayout *layout;
+ DWRITE_TEXT_RANGE range;
+ HRESULT hr;
+
+ hr = IDWriteFactory_CreateTextFormat(factory, tahomaW, NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL,
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, ruW, &format);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, strW, 0, format, 100.0, 100.0, 1.0, NULL, FALSE, &layout);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj2);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ inlinetest = (void*)0x1;
+ hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, NULL);
+todo_wine {
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(inlinetest == NULL, "got %p\n", inlineobj);
+}
+ range.startPosition = 0;
+ range.length = 2;
+ hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ inlinetest = (void*)0x1;
+ hr = IDWriteTextLayout_GetInlineObject(layout, 2, &inlinetest, NULL);
+todo_wine {
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok(inlinetest == NULL, "got %p\n", inlinetest);
+}
+ inlinetest = NULL;
+ hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, NULL);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+if (hr == S_OK) {
+ ok(inlinetest == inlineobj, "got %p\n", inlinetest);
+ IDWriteInlineObject_Release(inlinetest);
+}
+ range.startPosition = 1;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj2, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ inlinetest = NULL;
+ hr = IDWriteTextLayout_GetInlineObject(layout, 1, &inlinetest, NULL);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+if (hr == S_OK) {
+ ok(inlinetest == inlineobj2, "got %p\n", inlinetest);
+ IDWriteInlineObject_Release(inlinetest);
+}
+ inlinetest = NULL;
+ hr = IDWriteTextLayout_GetInlineObject(layout, 0, &inlinetest, NULL);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+if (hr == S_OK) {
+ ok(inlinetest == inlineobj, "got %p\n", inlinetest);
+ IDWriteInlineObject_Release(inlinetest);
+}
+ range.startPosition = 1;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ range.startPosition = 1;
+ range.length = 2;
+ hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ IDWriteTextLayout_Release(layout);
+ IDWriteTextFormat_Release(format);
+}
+
+/* drawing calls sequence doesn't depend on run order, instead all runs are
+ drawn first, inline objects next and then underline/strikes */
+static const struct drawcall_entry draw_seq[] = {
+ { DRAW_GLYPHRUN },
+ { DRAW_GLYPHRUN },
+ { DRAW_GLYPHRUN },
+ { DRAW_GLYPHRUN },
+ { DRAW_INLINE },
+ { DRAW_UNDERLINE },
+ { DRAW_STRIKETHROUGH },
+ { DRAW_LAST_KIND }
+};
+
+static void test_draw_sequence(void)
+{
+ static const WCHAR strW[] = {'s','t','r','i','n','g',0};
+ static const WCHAR ruW[] = {'r','u',0};
+
+ IDWriteInlineObject *inlineobj;
+ IDWriteTextFormat *format;
+ IDWriteTextLayout *layout;
+ DWRITE_TEXT_RANGE range;
+ HRESULT hr;
+
+ hr = IDWriteFactory_CreateTextFormat(factory, tahomaW, NULL, DWRITE_FONT_WEIGHT_BOLD, DWRITE_FONT_STYLE_NORMAL,
+ DWRITE_FONT_STRETCH_NORMAL, 10.0, ruW, &format);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateGdiCompatibleTextLayout(factory, strW, 6, format, 100.0, 100.0, 1.0, NULL, FALSE, &layout);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ hr = IDWriteFactory_CreateEllipsisTrimmingSign(factory, format, &inlineobj);
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ range.startPosition = 5;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetStrikethrough(layout, TRUE, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ range.startPosition = 1;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetInlineObject(layout, inlineobj, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ range.startPosition = 4;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetDrawingEffect(layout, (IUnknown*)inlineobj, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ range.startPosition = 0;
+ range.length = 1;
+ hr = IDWriteTextLayout_SetUnderline(layout, TRUE, range);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+
+ flush_sequence(sequences, RENDERER_ID);
+ hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0, 0.0);
+todo_wine
+ ok(hr == S_OK, "got 0x%08x\n", hr);
+ ok_sequence(sequences, RENDERER_ID, draw_seq, "draw test", TRUE);
+
+ IDWriteTextFormat_Release(format);
+ IDWriteTextLayout_Release(layout);
+}
+
START_TEST(layout)
{
HRESULT hr;
@@ -274,11 +753,17 @@
return;
}
+ init_call_sequences(sequences, NUM_CALL_SEQUENCES);
+ init_call_sequences(expected_seq, 1);
+
test_CreateTextLayout();
test_CreateGdiCompatibleTextLayout();
test_CreateTextFormat();
test_GetLocaleName();
test_CreateEllipsisTrimmingSign();
+ test_fontweight();
+ test_SetInlineObject();
+ test_draw_sequence();
IDWriteFactory_Release(factory);
}
diff -Nru wine1.7-1.7.22/dlls/dxgi/device.c wine1.7-1.7.24/dlls/dxgi/device.c
--- wine1.7-1.7.22/dlls/dxgi/device.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dxgi/device.c 2014-08-08 20:19:29.000000000 +0000
@@ -276,8 +276,7 @@
return E_OUTOFMEMORY;
}
- hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer);
- if (FAILED(hr))
+ if (FAILED(hr = dxgi_surface_init(object, (IDXGIDevice *)iface, outer, desc)))
{
WARN("Failed to initialize surface, hr %#x.\n", hr);
HeapFree(GetProcessHeap(), 0, object);
diff -Nru wine1.7-1.7.22/dlls/dxgi/dxgi_private.h wine1.7-1.7.24/dlls/dxgi/dxgi_private.h
--- wine1.7-1.7.22/dlls/dxgi/dxgi_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dxgi/dxgi_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -142,8 +142,11 @@
IUnknown *outer_unknown;
LONG refcount;
IDXGIDevice *device;
+
+ DXGI_SURFACE_DESC desc;
};
-HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device, IUnknown *outer) DECLSPEC_HIDDEN;
+HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device,
+ IUnknown *outer, const DXGI_SURFACE_DESC *desc) DECLSPEC_HIDDEN;
#endif /* __WINE_DXGI_PRIVATE_H */
diff -Nru wine1.7-1.7.22/dlls/dxgi/factory.c wine1.7-1.7.24/dlls/dxgi/factory.c
--- wine1.7-1.7.22/dlls/dxgi/factory.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dxgi/factory.c 2014-08-08 20:19:29.000000000 +0000
@@ -161,7 +161,7 @@
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IWineDXGIFactory *iface, HWND window, UINT flags)
{
- FIXME("iface %p, window %p, flags %#x stub!\n\n", iface, window, flags);
+ FIXME("iface %p, window %p, flags %#x stub!\n", iface, window, flags);
return E_NOTIMPL;
}
diff -Nru wine1.7-1.7.22/dlls/dxgi/surface.c wine1.7-1.7.24/dlls/dxgi/surface.c
--- wine1.7-1.7.22/dlls/dxgi/surface.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/dxgi/surface.c 2014-08-08 20:19:29.000000000 +0000
@@ -154,9 +154,13 @@
/* IDXGISurface methods */
static HRESULT STDMETHODCALLTYPE dxgi_surface_GetDesc(IDXGISurface *iface, DXGI_SURFACE_DESC *desc)
{
- FIXME("iface %p, desc %p stub!\n", iface, desc);
+ struct dxgi_surface *surface = impl_from_IDXGISurface(iface);
- return E_NOTIMPL;
+ TRACE("iface %p, desc %p.\n", iface, desc);
+
+ *desc = surface->desc;
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_surface_Map(IDXGISurface *iface, DXGI_MAPPED_RECT *mapped_rect, UINT flags)
@@ -200,13 +204,15 @@
dxgi_surface_inner_Release,
};
-HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device, IUnknown *outer)
+HRESULT dxgi_surface_init(struct dxgi_surface *surface, IDXGIDevice *device,
+ IUnknown *outer, const DXGI_SURFACE_DESC *desc)
{
surface->IDXGISurface_iface.lpVtbl = &dxgi_surface_vtbl;
surface->IUnknown_iface.lpVtbl = &dxgi_surface_inner_unknown_vtbl;
surface->refcount = 1;
surface->outer_unknown = outer ? outer : &surface->IUnknown_iface;
surface->device = device;
+ surface->desc = *desc;
return S_OK;
}
diff -Nru wine1.7-1.7.22/dlls/gdi32/enhmfdrv/init.c wine1.7-1.7.24/dlls/gdi32/enhmfdrv/init.c
--- wine1.7-1.7.22/dlls/gdi32/enhmfdrv/init.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/gdi32/enhmfdrv/init.c 2014-08-08 20:19:29.000000000 +0000
@@ -193,6 +193,7 @@
BOOL EMFDRV_WriteRecord( PHYSDEV dev, EMR *emr )
{
DWORD len;
+ DWORD bytes_written;
ENHMETAHEADER *emh;
EMFDRV_PDEVICE *physDev = (EMFDRV_PDEVICE *)dev;
@@ -205,7 +206,7 @@
physDev->emh->nRecords++;
if(physDev->hFile) {
- if (!WriteFile(physDev->hFile, emr, emr->nSize, NULL, NULL))
+ if (!WriteFile(physDev->hFile, emr, emr->nSize, &bytes_written, NULL))
return FALSE;
} else {
DWORD nEmfSize = HeapSize(GetProcessHeap(), 0, physDev->emh);
@@ -316,6 +317,7 @@
EMFDRV_PDEVICE *physDev;
HANDLE hFile;
DWORD size = 0, length = 0;
+ DWORD bytes_written;
TRACE("%s\n", debugstr_w(filename) );
@@ -407,7 +409,7 @@
free_dc_ptr( dc );
return 0;
}
- if (!WriteFile( hFile, physDev->emh, size, NULL, NULL )) {
+ if (!WriteFile( hFile, physDev->emh, size, &bytes_written, NULL )) {
free_dc_ptr( dc );
CloseHandle( hFile );
return 0;
diff -Nru wine1.7-1.7.22/dlls/gdi32/mfdrv/init.c wine1.7-1.7.24/dlls/gdi32/mfdrv/init.c
--- wine1.7-1.7.22/dlls/gdi32/mfdrv/init.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/gdi32/mfdrv/init.c 2014-08-08 20:19:29.000000000 +0000
@@ -321,6 +321,7 @@
DC *dc;
METAFILEDRV_PDEVICE *physDev;
HANDLE hFile;
+ DWORD bytes_written;
TRACE("%s\n", debugstr_w(filename) );
@@ -335,8 +336,8 @@
free_dc_ptr( dc );
return 0;
}
- if (!WriteFile( hFile, physDev->mh, sizeof(*physDev->mh), NULL,
- NULL )) {
+ if (!WriteFile( hFile, physDev->mh, sizeof(*physDev->mh),
+ &bytes_written, NULL )) {
free_dc_ptr( dc );
CloseHandle (hFile );
return 0;
@@ -387,6 +388,7 @@
{
DC *dc;
METAFILEDRV_PDEVICE *physDev;
+ DWORD bytes_written;
TRACE("(%p)\n", hdc );
@@ -423,7 +425,7 @@
physDev->mh->mtType = METAFILE_MEMORY; /* This is what windows does */
if (!WriteFile(physDev->hFile, physDev->mh, sizeof(*physDev->mh),
- NULL, NULL)) {
+ &bytes_written, NULL)) {
free_dc_ptr( dc );
return 0;
}
diff -Nru wine1.7-1.7.22/dlls/hid/hid.spec wine1.7-1.7.24/dlls/hid/hid.spec
--- wine1.7-1.7.22/dlls/hid/hid.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/hid/hid.spec 2014-08-08 20:19:29.000000000 +0000
@@ -11,7 +11,7 @@
@ stub HidD_GetNumInputBuffers
@ stub HidD_GetPhysicalDescriptor
@ stub HidD_GetPreparsedData
-@ stub HidD_GetProductString
+@ stdcall HidD_GetProductString(long ptr long)
@ stub HidD_GetSerialNumberString
@ stub HidD_Hello
@ stub HidD_SetConfiguration
diff -Nru wine1.7-1.7.22/dlls/hid/main.c wine1.7-1.7.24/dlls/hid/main.c
--- wine1.7-1.7.22/dlls/hid/main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/hid/main.c 2014-08-08 20:19:29.000000000 +0000
@@ -73,3 +73,9 @@
FIXME("(%p %p %u) stub\n", HidDeviceObject, ReportBuffer, ReportBufferLength);
return FALSE;
}
+
+BOOLEAN WINAPI HidD_GetProductString(HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength)
+{
+ FIXME("(%p %p %u) stub\n", HidDeviceObject, Buffer, BufferLength);
+ return FALSE;
+}
diff -Nru wine1.7-1.7.22/dlls/ieframe/ieframe.h wine1.7-1.7.24/dlls/ieframe/ieframe.h
--- wine1.7-1.7.22/dlls/ieframe/ieframe.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/ieframe/ieframe.h 2014-08-08 20:19:29.000000000 +0000
@@ -310,8 +310,6 @@
HRESULT WINAPI WebBrowser_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
HRESULT WINAPI WebBrowserV1_Create(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
-const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
-
extern LONG module_ref DECLSPEC_HIDDEN;
extern HINSTANCE ieframe_instance DECLSPEC_HIDDEN;
diff -Nru wine1.7-1.7.22/dlls/ieframe/ieframe_main.c wine1.7-1.7.24/dlls/ieframe/ieframe_main.c
--- wine1.7-1.7.22/dlls/ieframe/ieframe_main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/ieframe/ieframe_main.c 2014-08-08 20:19:29.000000000 +0000
@@ -29,33 +29,6 @@
LONG module_ref = 0;
HINSTANCE ieframe_instance;
-const char *debugstr_variant(const VARIANT *v)
-{
- if(!v)
- return "(null)";
-
- switch(V_VT(v)) {
- case VT_EMPTY:
- return "{VT_EMPTY}";
- case VT_NULL:
- return "{VT_NULL}";
- case VT_I4:
- return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
- case VT_R8:
- return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
- case VT_BSTR:
- return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
- case VT_DISPATCH:
- return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
- case VT_BOOL:
- return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
- case VT_ERROR:
- return wine_dbg_sprintf("{VT_ERROR: %08x}", V_ERROR(v));
- default:
- return wine_dbg_sprintf("{vt %d}", V_VT(v));
- }
-}
-
static ITypeLib *typelib;
static ITypeInfo *typeinfos[LAST_tid];
diff -Nru wine1.7-1.7.22/dlls/imagehlp/tests/image.c wine1.7-1.7.24/dlls/imagehlp/tests/image.c
--- wine1.7-1.7.22/dlls/imagehlp/tests/image.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/imagehlp/tests/image.c 2014-08-08 20:19:29.000000000 +0000
@@ -31,6 +31,8 @@
static HMODULE hImageHlp;
static BOOL (WINAPI *pImageGetDigestStream)(HANDLE, DWORD, DIGEST_FUNCTION, DIGEST_HANDLE);
+static BOOL (WINAPI *pBindImageEx)(DWORD Flags, const char *ImageName, const char *DllPath,
+ const char *SymbolPath, PIMAGEHLP_STATUS_ROUTINE StatusRoutine);
/* minimal PE file image */
#define VA_START 0x400000
@@ -149,6 +151,9 @@
BOOL todo;
};
+static int status_routine_called[BindSymbolsNotUpdated+1];
+
+
static BOOL WINAPI accumulating_stream_output(DIGEST_HANDLE handle, BYTE *pb,
DWORD cb)
{
@@ -273,6 +278,40 @@
bin.nt_headers.OptionalHeader.CheckSum = sum;
}
+static BOOL CALLBACK testing_status_routine(IMAGEHLP_STATUS_REASON reason, const char *ImageName,
+ const char *DllName, ULONG_PTR Va, ULONG_PTR Parameter)
+{
+ char kernel32_path[MAX_PATH];
+
+ if (0 <= (int)reason && reason <= BindSymbolsNotUpdated)
+ status_routine_called[reason]++;
+ else
+ ok(0, "expected reason between 0 and %d, got %d\n", BindSymbolsNotUpdated+1, reason);
+
+ switch(reason)
+ {
+ case BindImportModule:
+ ok(!strcmp(DllName, "KERNEL32.DLL"), "expected DllName to be KERNEL32.DLL, got %s\n",
+ DllName);
+ break;
+
+ case BindImportProcedure:
+ case BindForwarderNOT:
+ GetSystemDirectoryA(kernel32_path, MAX_PATH);
+ strcat(kernel32_path, "\\KERNEL32.DLL");
+ ok(!lstrcmpiA(DllName, kernel32_path), "expected DllName to be %s, got %s\n",
+ kernel32_path, DllName);
+ ok(!strcmp((char *)Parameter, "ExitProcess"),
+ "expected Parameter to be ExitProcess, got %s\n", (char *)Parameter);
+ break;
+
+ default:
+ ok(0, "got unexpected reason %d\n", reason);
+ break;
+ }
+ return TRUE;
+}
+
static void test_get_digest_stream(void)
{
BOOL ret;
@@ -281,6 +320,11 @@
DWORD count;
struct update_accum accum = { 0, NULL };
+ if (!pImageGetDigestStream)
+ {
+ win_skip("ImageGetDigestStream function is not available\n");
+ return;
+ }
SetLastError(0xdeadbeef);
ret = pImageGetDigestStream(NULL, 0, NULL, NULL);
ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER,
@@ -329,6 +373,55 @@
DeleteFileA(temp_file);
}
+static void test_bind_image_ex(void)
+{
+ BOOL ret;
+ HANDLE file;
+ char temp_file[MAX_PATH];
+ DWORD count;
+
+ if (!pBindImageEx)
+ {
+ win_skip("BindImageEx function is not available\n");
+ return;
+ }
+
+ /* call with a non-existent file */
+ SetLastError(0xdeadbeef);
+ ret = pBindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, "nonexistent.dll", 0, 0,
+ testing_status_routine);
+ todo_wine ok(!ret && ((GetLastError() == ERROR_FILE_NOT_FOUND) ||
+ (GetLastError() == ERROR_INVALID_PARAMETER)),
+ "expected ERROR_FILE_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d\n",
+ GetLastError());
+
+ file = create_temp_file(temp_file);
+ if (file == INVALID_HANDLE_VALUE)
+ {
+ skip("couldn't create temp file\n");
+ return;
+ }
+
+ WriteFile(file, &bin, sizeof(bin), &count, NULL);
+ CloseHandle(file);
+
+ /* call with a proper PE file */
+ ret = pBindImageEx(BIND_NO_BOUND_IMPORTS | BIND_NO_UPDATE | BIND_ALL_IMAGES, temp_file, 0, 0,
+ testing_status_routine);
+ ok(ret, "BindImageEx failed: %d\n", GetLastError());
+
+ todo_wine ok(status_routine_called[BindImportModule] == 1,
+ "StatusRoutine was called %d times\n", status_routine_called[BindImportModule]);
+
+ todo_wine ok((status_routine_called[BindImportProcedure] == 1)
+#if defined(_WIN64)
+ || broken(status_routine_called[BindImportProcedure] == 0) /* < Win8 */
+#endif
+ , "StatusRoutine was called %d times\n", status_routine_called[BindImportProcedure]);
+
+ DeleteFileA(temp_file);
+}
+
START_TEST(image)
{
hImageHlp = LoadLibraryA("imagehlp.dll");
@@ -340,14 +433,10 @@
}
pImageGetDigestStream = (void *) GetProcAddress(hImageHlp, "ImageGetDigestStream");
+ pBindImageEx = (void *) GetProcAddress(hImageHlp, "BindImageEx");
- if (!pImageGetDigestStream)
- {
- win_skip("ImageGetDigestStream function is not available\n");
- } else
- {
- test_get_digest_stream();
- }
+ test_get_digest_stream();
+ test_bind_image_ex();
FreeLibrary(hImageHlp);
}
diff -Nru wine1.7-1.7.22/dlls/iphlpapi/iphlpapi_main.c wine1.7-1.7.24/dlls/iphlpapi/iphlpapi_main.c
--- wine1.7-1.7.22/dlls/iphlpapi/iphlpapi_main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/iphlpapi/iphlpapi_main.c 2014-08-08 20:19:29.000000000 +0000
@@ -2511,6 +2511,33 @@
}
/******************************************************************
+ * PfUnBindInterface (IPHLPAPI.@)
+ */
+DWORD WINAPI PfUnBindInterface(INTERFACE_HANDLE interface)
+{
+ FIXME("(%p) stub\n", interface);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/******************************************************************
+ * PfDeleteInterface(IPHLPAPI.@)
+ */
+DWORD WINAPI PfDeleteInterface(INTERFACE_HANDLE interface)
+{
+ FIXME("(%p) stub\n", interface);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/******************************************************************
+ * PfBindInterfaceToIPAddress(IPHLPAPI.@)
+ */
+DWORD WINAPI PfBindInterfaceToIPAddress(INTERFACE_HANDLE interface, PFADDRESSTYPE type, PBYTE ip)
+{
+ FIXME("(%p %d %p) stub\n", interface, type, ip);
+ return ERROR_CALL_NOT_IMPLEMENTED;
+}
+
+/******************************************************************
* GetTcpTable2 (IPHLPAPI.@)
*/
ULONG WINAPI GetTcpTable2(PMIB_TCPTABLE2 table, PULONG size, BOOL order)
diff -Nru wine1.7-1.7.22/dlls/iphlpapi/iphlpapi.spec wine1.7-1.7.24/dlls/iphlpapi/iphlpapi.spec
--- wine1.7-1.7.22/dlls/iphlpapi/iphlpapi.spec 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/iphlpapi/iphlpapi.spec 2014-08-08 20:19:29.000000000 +0000
@@ -245,10 +245,10 @@
#@ stub ParseNetworkString
@ stub _PfAddFiltersToInterface@24
@ stub _PfAddGlobalFilterToInterface@8
-@ stub _PfBindInterfaceToIPAddress@12
+@ stdcall _PfBindInterfaceToIPAddress@12(long long ptr) PfBindInterfaceToIPAddress
@ stub _PfBindInterfaceToIndex@16
@ stdcall _PfCreateInterface@24(long long long long long ptr) PfCreateInterface
-@ stub _PfDeleteInterface@4
+@ stdcall _PfDeleteInterface@4(long) PfDeleteInterface
@ stub _PfDeleteLog@0
@ stub _PfGetInterfaceStatistics@16
@ stub _PfMakeLog@4
@@ -258,7 +258,7 @@
@ stub _PfRemoveGlobalFilterFromInterface@8
@ stub _PfSetLogBuffer@28
@ stub _PfTestPacket@20
-@ stub _PfUnBindInterface@4
+@ stdcall _PfUnBindInterface@4(long) PfUnBindInterface
#@ stub register_icmp
#@ stub ResolveIpNetEntry2
#@ stub ResolveNeighbor
diff -Nru wine1.7-1.7.22/dlls/jscript/jscript.h wine1.7-1.7.24/dlls/jscript/jscript.h
--- wine1.7-1.7.22/dlls/jscript/jscript.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/jscript/jscript.h 2014-08-08 20:19:29.000000000 +0000
@@ -525,7 +525,6 @@
return HRESULT_FACILITY(hres) == FACILITY_JSCRIPT;
}
-const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
const char *debugstr_jsval(const jsval_t) DECLSPEC_HIDDEN;
HRESULT create_jscript_object(BOOL,REFIID,void**) DECLSPEC_HIDDEN;
diff -Nru wine1.7-1.7.22/dlls/jscript/jsutils.c wine1.7-1.7.24/dlls/jscript/jsutils.c
--- wine1.7-1.7.22/dlls/jscript/jsutils.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/jscript/jsutils.c 2014-08-08 20:19:29.000000000 +0000
@@ -30,35 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
WINE_DECLARE_DEBUG_CHANNEL(heap);
-const char *debugstr_variant(const VARIANT *v)
-{
- if(!v)
- return "(null)";
-
- switch(V_VT(v)) {
- case VT_EMPTY:
- return "{VT_EMPTY}";
- case VT_NULL:
- return "{VT_NULL}";
- case VT_I4:
- return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
- case VT_UI4:
- return wine_dbg_sprintf("{VT_UI4: %u}", V_UI4(v));
- case VT_R8:
- return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
- case VT_BSTR:
- return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
- case VT_DISPATCH:
- return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
- case VT_BOOL:
- return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
- case VT_ARRAY|VT_VARIANT:
- return "{VT_ARRAY|VT_VARIANT: ...}";
- default:
- return wine_dbg_sprintf("{vt %d}", V_VT(v));
- }
-}
-
const char *debugstr_jsval(const jsval_t v)
{
switch(jsval_type(v)) {
diff -Nru wine1.7-1.7.22/dlls/kernel32/locale.c wine1.7-1.7.24/dlls/kernel32/locale.c
--- wine1.7-1.7.22/dlls/kernel32/locale.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/kernel32/locale.c 2014-08-08 20:19:29.000000000 +0000
@@ -3367,29 +3367,6 @@
return hkey;
}
-static BOOL NLS_RegEnumSubKey(HANDLE hKey, UINT ulIndex, LPWSTR szKeyName,
- ULONG keyNameSize)
-{
- BYTE buffer[80];
- KEY_BASIC_INFORMATION *info = (KEY_BASIC_INFORMATION *)buffer;
- DWORD dwLen;
-
- if (NtEnumerateKey( hKey, ulIndex, KeyBasicInformation, buffer,
- sizeof(buffer), &dwLen) != STATUS_SUCCESS ||
- info->NameLength > keyNameSize)
- {
- return FALSE;
- }
-
- TRACE("info->Name %s info->NameLength %d\n", debugstr_w(info->Name), info->NameLength);
-
- memcpy( szKeyName, info->Name, info->NameLength);
- szKeyName[info->NameLength / sizeof(WCHAR)] = '\0';
-
- TRACE("returning %s\n", debugstr_w(szKeyName));
- return TRUE;
-}
-
static BOOL NLS_RegEnumValue(HANDLE hKey, UINT ulIndex,
LPWSTR szValueName, ULONG valueNameSize,
LPWSTR szValueData, ULONG valueDataSize)
@@ -3836,70 +3813,6 @@
}
/******************************************************************************
- * EnumSystemGeoID (KERNEL32.@)
- *
- * Call a users function for every location available on the system.
- *
- * PARAMS
- * geoclass [I] Type of information desired (SYSGEOTYPE enum from "winnls.h")
- * reserved [I] Reserved, set to 0
- * pGeoEnumProc [I] Callback function to call for each location
- *
- * RETURNS
- * Success: TRUE.
- * Failure: FALSE. Use GetLastError() to determine the cause.
- */
-BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID reserved, GEO_ENUMPROC pGeoEnumProc)
-{
- static const WCHAR szCountryCodeValueName[] = {
- 'C','o','u','n','t','r','y','C','o','d','e','\0'
- };
- WCHAR szNumber[10];
- HANDLE hKey;
- ULONG ulIndex = 0;
-
- TRACE("(0x%08X,0x%08X,%p)\n", geoclass, reserved, pGeoEnumProc);
-
- if (geoclass != GEOCLASS_NATION || reserved || !pGeoEnumProc)
- {
- SetLastError(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- hKey = NLS_RegOpenKey( 0, szCountryListName );
-
- while (NLS_RegEnumSubKey( hKey, ulIndex, szNumber, sizeof(szNumber) ))
- {
- BOOL bContinue = TRUE;
- DWORD dwGeoId;
- HANDLE hSubKey = NLS_RegOpenKey( hKey, szNumber );
-
- if (hSubKey)
- {
- if (NLS_RegGetDword( hSubKey, szCountryCodeValueName, &dwGeoId ))
- {
- TRACE("Got geoid %d\n", dwGeoId);
-
- if (!pGeoEnumProc( dwGeoId ))
- bContinue = FALSE;
- }
-
- NtClose( hSubKey );
- }
-
- if (!bContinue)
- break;
-
- ulIndex++;
- }
-
- if (hKey)
- NtClose( hKey );
-
- return TRUE;
-}
-
-/******************************************************************************
* InvalidateNLSCache (KERNEL32.@)
*
* Invalidate the cache of NLS values.
@@ -4081,368 +3994,348 @@
return TRUE;
}
+enum locationkind {
+ LOCATION_NATION = 0,
+ LOCATION_REGION,
+ LOCATION_BOTH
+};
+
struct geoinfo_t {
+ GEOID id;
WCHAR iso2W[3];
WCHAR iso3W[4];
+ GEOID parent;
INT uncode;
+ enum locationkind kind;
};
static const struct geoinfo_t geoinfodata[] = {
- { }, /* 0 unassigned */
- { }, /* 1 unassigned */
- { {'A','G',0}, {'A','T','G',0}, 28 }, /* Antigua and Barbuda */
- { {'A','F',0}, {'A','F','G',0}, 4 }, /* Afghanistan */
- { {'D','Z',0}, {'D','Z','A',0}, 12 }, /* Algeria */
- { {'A','Z',0}, {'A','Z','E',0}, 31 }, /* Azerbaijan */
- { {'A','L',0}, {'A','L','B',0}, 8 }, /* Albania */
- { {'A','M',0}, {'A','R','M',0}, 51 }, /* Armenia */
- { {'A','D',0}, {'A','N','D',0}, 20 }, /* Andorra */
- { {'A','O',0}, {'A','G','O',0}, 24 }, /* Angola */
- { {'A','S',0}, {'A','S','M',0}, 16 }, /* American Samoa */
- { {'A','R',0}, {'A','R','G',0}, 32 }, /* Argentina */
- { {'A','U',0}, {'A','U','S',0}, 36 }, /* Australia */
- { }, /* 13 unassigned */
- { {'A','T',0}, {'A','U','T',0}, 40 }, /* Austria */
- { }, /* 15 unassigned */
- { }, /* 16 unassigned */
- { {'B','H',0}, {'B','H','R',0}, 48 }, /* Bahrain */
- { {'B','B',0}, {'B','R','B',0}, 52 }, /* Barbados */
- { {'B','W',0}, {'B','W','A',0}, 72 }, /* Botswana */
- { {'B','M',0}, {'B','M','U',0}, 60 }, /* Bermuda */
- { {'B','E',0}, {'B','E','L',0}, 56 }, /* Belgium */
- { {'B','S',0}, {'B','H','S',0}, 44 }, /* Bahamas, The */
- { {'B','D',0}, {'B','G','D',0}, 50 }, /* Bangladesh */
- { {'B','Z',0}, {'B','L','Z',0}, 84 }, /* Belize */
- { {'B','A',0}, {'B','I','H',0}, 70 }, /* Bosnia and Herzegovina */
- { {'B','O',0}, {'B','O','L',0}, 68 }, /* Bolivia */
- { {'M','M',0}, {'M','M','R',0}, 104 }, /* Myanmar */
- { {'B','J',0}, {'B','E','N',0}, 204 }, /* Benin */
- { {'B','Y',0}, {'B','L','R',0}, 112 }, /* Belarus */
- { {'S','B',0}, {'S','L','B',0}, 90 }, /* Solomon Islands */
- { }, /* 31 unassigned */
- { {'B','R',0}, {'B','R','A',0}, 76 }, /* Brazil */
- { }, /* 33 unassigned */
- { {'B','T',0}, {'B','T','N',0}, 64 }, /* Bhutan */
- { {'B','G',0}, {'B','G','R',0}, 100 }, /* Bulgaria */
- { }, /* 36 unassigned */
- { {'B','N',0}, {'B','R','N',0}, 96 }, /* Brunei */
- { {'B','I',0}, {'B','D','I',0}, 108 }, /* Burundi */
- { {'C','A',0}, {'C','A','N',0}, 124 }, /* Canada */
- { {'K','H',0}, {'K','H','M',0}, 116 }, /* Cambodia */
- { {'T','D',0}, {'T','C','D',0}, 148 }, /* Chad */
- { {'L','K',0}, {'L','K','A',0}, 144 }, /* Sri Lanka */
- { {'C','G',0}, {'C','O','G',0}, 178 }, /* Congo */
- { {'C','D',0}, {'C','O','D',0}, 180 }, /* Congo (DRC) */
- { {'C','N',0}, {'C','H','N',0}, 156 }, /* China */
- { {'C','L',0}, {'C','H','L',0}, 152 }, /* Chile */
- { }, /* 47 unassigned */
- { }, /* 48 unassigned */
- { {'C','M',0}, {'C','M','R',0}, 120 }, /* Cameroon */
- { {'K','M',0}, {'C','O','M',0}, 174 }, /* Comoros */
- { {'C','O',0}, {'C','O','L',0}, 170 }, /* Colombia */
- { }, /* 52 unassigned */
- { }, /* 53 unassigned */
- { {'C','R',0}, {'C','R','I',0}, 188 }, /* Costa Rica */
- { {'C','F',0}, {'C','A','F',0}, 140 }, /* Central African Republic */
- { {'C','U',0}, {'C','U','B',0}, 192 }, /* Cuba */
- { {'C','V',0}, {'C','P','V',0}, 132 }, /* Cape Verde */
- { }, /* 58 unassigned */
- { {'C','Y',0}, {'C','Y','P',0}, 196 }, /* Cyprus */
- { }, /* 60 unassigned */
- { {'D','K',0}, {'D','N','K',0}, 208 }, /* Denmark */
- { {'D','J',0}, {'D','J','I',0}, 262 }, /* Djibouti */
- { {'D','M',0}, {'D','M','A',0}, 212 }, /* Dominica */
- { }, /* 64 unassigned */
- { {'D','O',0}, {'D','O','M',0}, 214 }, /* Dominican Republic */
- { {'E','C',0}, {'E','C','U',0}, 218 }, /* Ecuador */
- { {'E','G',0}, {'E','G','Y',0}, 818 }, /* Egypt */
- { {'I','E',0}, {'I','R','L',0}, 372 }, /* Ireland */
- { {'G','Q',0}, {'G','N','Q',0}, 226 }, /* Equatorial Guinea */
- { {'E','E',0}, {'E','S','T',0}, 233 }, /* Estonia */
- { {'E','R',0}, {'E','R','I',0}, 232 }, /* Eritrea */
- { {'S','V',0}, {'S','L','V',0}, 222 }, /* El Salvador */
- { {'E','T',0}, {'E','T','H',0}, 231 }, /* Ethiopia */
- { }, /* 74 unassigned */
- { {'C','Z',0}, {'C','Z','E',0}, 203 }, /* Czech Republic */
- { }, /* 76 unassigned */
- { {'F','I',0}, {'F','I','N',0}, 246 }, /* Finland */
- { {'F','J',0}, {'F','J','I',0}, 242 }, /* Fiji Islands */
- { }, /* 79 unassigned */
- { {'F','M',0}, {'F','S','M',0}, 583 }, /* Micronesia */
- { {'F','O',0}, {'F','R','O',0}, 234 }, /* Faroe Islands */
- { }, /* 82 unassigned */
- { }, /* 83 unassigned */
- { {'F','R',0}, {'F','R','A',0}, 250 }, /* France */
- { }, /* 85 unassigned */
- { {'G','M',0}, {'G','M','B',0}, 270 }, /* Gambia, The */
- { {'G','A',0}, {'G','A','B',0}, 266 }, /* Gabon */
- { {'G','E',0}, {'G','E','O',0}, 268 }, /* Georgia */
- { {'G','H',0}, {'G','H','A',0}, 288 }, /* Ghana */
- { {'G','I',0}, {'G','I','B',0}, 292 }, /* Gibraltar */
- { {'G','D',0}, {'G','R','D',0}, 308 }, /* Grenada */
- { }, /* 92 unassigned */
- { {'G','L',0}, {'G','R','L',0}, 304 }, /* Greenland */
- { {'D','E',0}, {'D','E','U',0}, 276 }, /* Germany */
- { }, /* 95 unassigned */
- { }, /* 96 unassigned */
- { }, /* 97 unassigned */
- { {'G','R',0}, {'G','R','C',0}, 300 }, /* Greece */
- { {'G','T',0}, {'G','T','M',0}, 320 }, /* Guatemala */
- { {'G','N',0}, {'G','I','N',0}, 324 }, /* Guinea */
- { {'G','Y',0}, {'G','U','Y',0}, 328 }, /* Guyana */
- { }, /* 102 unassigned */
- { {'H','T',0}, {'H','T','I',0}, 332 }, /* Haiti */
- { {'H','K',0}, {'H','K','G',0}, 344 }, /* Hong Kong S.A.R. */
- { }, /* 105 unassigned */
- { {'H','N',0}, {'H','N','D',0}, 340 }, /* Honduras */
- { }, /* 107 unassigned */
- { {'H','R',0}, {'H','R','V',0}, 191 }, /* Croatia */
- { {'H','U',0}, {'H','U','N',0}, 348 }, /* Hungary */
- { {'I','S',0}, {'I','S','L',0}, 352 }, /* Iceland */
- { {'I','D',0}, {'I','D','N',0}, 360 }, /* Indonesia */
- { }, /* 112 unassigned */
- { {'I','N',0}, {'I','N','D',0}, 356 }, /* India */
- { {'I','O',0}, {'I','O','T',0}, 86 }, /* British Indian Ocean Territory */
- { }, /* 115 unassigned */
- { {'I','R',0}, {'I','R','N',0}, 364 }, /* Iran */
- { {'I','L',0}, {'I','S','R',0}, 376 }, /* Israel */
- { {'I','T',0}, {'I','T','A',0}, 380 }, /* Italy */
- { {'C','I',0}, {'C','I','V',0}, 384 }, /* Côte d'Ivoire */
- { }, /* 120 unassigned */
- { {'I','Q',0}, {'I','R','Q',0}, 368 }, /* Iraq */
- { {'J','P',0}, {'J','P','N',0}, 392 }, /* Japan */
- { }, /* 123 unassigned */
- { {'J','M',0}, {'J','A','M',0}, 388 }, /* Jamaica */
- { {'S','J',0}, {'S','J','M',0}, 744 }, /* Jan Mayen */
- { {'J','O',0}, {'J','O','R',0}, 400 }, /* Jordan */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Johnston Atoll */
- { }, /* 128 unassigned */
- { {'K','E',0}, {'K','E','N',0}, 404 }, /* Kenya */
- { {'K','G',0}, {'K','G','Z',0}, 417 }, /* Kyrgyzstan */
- { {'K','P',0}, {'P','R','K',0}, 408 }, /* North Korea */
- { }, /* 132 unassigned */
- { {'K','I',0}, {'K','I','R',0}, 296 }, /* Kiribati */
- { {'K','R',0}, {'K','O','R',0}, 410 }, /* Korea */
- { }, /* 135 unassigned */
- { {'K','W',0}, {'K','W','T',0}, 414 }, /* Kuwait */
- { {'K','Z',0}, {'K','A','Z',0}, 398 }, /* Kazakhstan */
- { {'L','A',0}, {'L','A','O',0}, 418 }, /* Laos */
- { {'L','B',0}, {'L','B','N',0}, 422 }, /* Lebanon */
- { {'L','V',0}, {'L','V','A',0}, 428 }, /* Latvia */
- { {'L','T',0}, {'L','T','U',0}, 440 }, /* Lithuania */
- { {'L','R',0}, {'L','B','R',0}, 430 }, /* Liberia */
- { {'S','K',0}, {'S','V','K',0}, 703 }, /* Slovakia */
- { }, /* 144 unassigned */
- { {'L','I',0}, {'L','I','E',0}, 438 }, /* Liechtenstein */
- { {'L','S',0}, {'L','S','O',0}, 426 }, /* Lesotho */
- { {'L','U',0}, {'L','U','X',0}, 442 }, /* Luxembourg */
- { {'L','Y',0}, {'L','B','Y',0}, 434 }, /* Libya */
- { {'M','G',0}, {'M','D','G',0}, 450 }, /* Madagascar */
- { }, /* 150 unassigned */
- { {'M','O',0}, {'M','A','C',0}, 446 }, /* Macao S.A.R. */
- { {'M','D',0}, {'M','D','A',0}, 498 }, /* Moldova */
- { }, /* 153 unassigned */
- { {'M','N',0}, {'M','N','G',0}, 496 }, /* Mongolia */
- { }, /* 155 unassigned */
- { {'M','W',0}, {'M','W','I',0}, 454 }, /* Malawi */
- { {'M','L',0}, {'M','L','I',0}, 466 }, /* Mali */
- { {'M','C',0}, {'M','C','O',0}, 492 }, /* Monaco */
- { {'M','A',0}, {'M','A','R',0}, 504 }, /* Morocco */
- { {'M','U',0}, {'M','U','S',0}, 480 }, /* Mauritius */
- { }, /* 161 unassigned */
- { {'M','R',0}, {'M','R','T',0}, 478 }, /* Mauritania */
- { {'M','T',0}, {'M','L','T',0}, 470 }, /* Malta */
- { {'O','M',0}, {'O','M','N',0}, 512 }, /* Oman */
- { {'M','V',0}, {'M','D','V',0}, 462 }, /* Maldives */
- { {'M','X',0}, {'M','E','X',0}, 484 }, /* Mexico */
- { {'M','Y',0}, {'M','Y','S',0}, 458 }, /* Malaysia */
- { {'M','Z',0}, {'M','O','Z',0}, 508 }, /* Mozambique */
- { }, /* 169 unassigned */
- { }, /* 170 unassigned */
- { }, /* 171 unassigned */
- { }, /* 172 unassigned */
- { {'N','E',0}, {'N','E','R',0}, 562 }, /* Niger */
- { {'V','U',0}, {'V','U','T',0}, 548 }, /* Vanuatu */
- { {'N','G',0}, {'N','G','A',0}, 566 }, /* Nigeria */
- { {'N','L',0}, {'N','L','D',0}, 528 }, /* Netherlands */
- { {'N','O',0}, {'N','O','R',0}, 578 }, /* Norway */
- { {'N','P',0}, {'N','P','L',0}, 524 }, /* Nepal */
- { }, /* 179 unassigned */
- { {'N','R',0}, {'N','R','U',0}, 520 }, /* Nauru */
- { {'S','R',0}, {'S','U','R',0}, 740 }, /* Suriname */
- { {'N','I',0}, {'N','I','C',0}, 558 }, /* Nicaragua */
- { {'N','Z',0}, {'N','Z','L',0}, 554 }, /* New Zealand */
- { {'P','S',0}, {'P','S','E',0}, 275 }, /* Palestinian Authority */
- { {'P','Y',0}, {'P','R','Y',0}, 600 }, /* Paraguay */
- { }, /* 186 unassigned */
- { {'P','E',0}, {'P','E','R',0}, 604 }, /* Peru */
- { }, /* 188 unassigned */
- { }, /* 189 unassigned */
- { {'P','K',0}, {'P','A','K',0}, 586 }, /* Pakistan */
- { {'P','L',0}, {'P','O','L',0}, 616 }, /* Poland */
- { {'P','A',0}, {'P','A','N',0}, 591 }, /* Panama */
- { {'P','T',0}, {'P','R','T',0}, 620 }, /* Portugal */
- { {'P','G',0}, {'P','N','G',0}, 598 }, /* Papua New Guinea */
- { {'P','W',0}, {'P','L','W',0}, 585 }, /* Palau */
- { {'G','W',0}, {'G','N','B',0}, 624 }, /* Guinea-Bissau */
- { {'Q','A',0}, {'Q','A','T',0}, 634 }, /* Qatar */
- { {'R','E',0}, {'R','E','U',0}, 638 }, /* Reunion */
- { {'M','H',0}, {'M','H','L',0}, 584 }, /* Marshall Islands */
- { {'R','O',0}, {'R','O','U',0}, 642 }, /* Romania */
- { {'P','H',0}, {'P','H','L',0}, 608 }, /* Philippines */
- { {'P','R',0}, {'P','R','I',0}, 630 }, /* Puerto Rico */
- { {'R','U',0}, {'R','U','S',0}, 643 }, /* Russia */
- { {'R','W',0}, {'R','W','A',0}, 646 }, /* Rwanda */
- { {'S','A',0}, {'S','A','U',0}, 682 }, /* Saudi Arabia */
- { {'P','M',0}, {'S','P','M',0}, 666 }, /* St. Pierre and Miquelon */
- { {'K','N',0}, {'K','N','A',0}, 659 }, /* St. Kitts and Nevis */
- { {'S','C',0}, {'S','Y','C',0}, 690 }, /* Seychelles */
- { {'Z','A',0}, {'Z','A','F',0}, 710 }, /* South Africa */
- { {'S','N',0}, {'S','E','N',0}, 686 }, /* Senegal */
- { }, /* 211 unassigned */
- { {'S','I',0}, {'S','V','N',0}, 705 }, /* Slovenia */
- { {'S','L',0}, {'S','L','E',0}, 694 }, /* Sierra Leone */
- { {'S','M',0}, {'S','M','R',0}, 674 }, /* San Marino */
- { {'S','G',0}, {'S','G','P',0}, 702 }, /* Singapore */
- { {'S','O',0}, {'S','O','M',0}, 706 }, /* Somalia */
- { {'E','S',0}, {'E','S','P',0}, 724 }, /* Spain */
- { {'L','C',0}, {'L','C','A',0}, 662 }, /* St. Lucia */
- { {'S','D',0}, {'S','D','N',0}, 736 }, /* Sudan */
- { {'S','J',0}, {'S','J','M',0}, 744 }, /* Svalbard */
- { {'S','E',0}, {'S','W','E',0}, 752 }, /* Sweden */
- { {'S','Y',0}, {'S','Y','R',0}, 760 }, /* Syria */
- { {'C','H',0}, {'C','H','E',0}, 756 }, /* Switzerland */
- { {'A','E',0}, {'A','R','E',0}, 784 }, /* United Arab Emirates */
- { {'T','T',0}, {'T','T','O',0}, 780 }, /* Trinidad and Tobago */
- { }, /* 226 unassigned */
- { {'T','H',0}, {'T','H','A',0}, 764 }, /* Thailand */
- { {'T','J',0}, {'T','J','K',0}, 762 }, /* Tajikistan */
- { }, /* 229 unassigned */
- { }, /* 230 unassigned */
- { {'T','O',0}, {'T','O','N',0}, 776 }, /* Tonga */
- { {'T','G',0}, {'T','G','O',0}, 768 }, /* Togo */
- { {'S','T',0}, {'S','T','P',0}, 678 }, /* São Tomé and Príncipe */
- { {'T','N',0}, {'T','U','N',0}, 788 }, /* Tunisia */
- { {'T','R',0}, {'T','U','R',0}, 792 }, /* Turkey */
- { {'T','V',0}, {'T','U','V',0}, 798 }, /* Tuvalu */
- { {'T','W',0}, {'T','W','N',0}, 158 }, /* Taiwan */
- { {'T','M',0}, {'T','K','M',0}, 795 }, /* Turkmenistan */
- { {'T','Z',0}, {'T','Z','A',0}, 834 }, /* Tanzania */
- { {'U','G',0}, {'U','G','A',0}, 800 }, /* Uganda */
- { {'U','A',0}, {'U','K','R',0}, 804 }, /* Ukraine */
- { {'G','B',0}, {'G','B','R',0}, 826 }, /* United Kingdom */
- { }, /* 243 unassigned */
- { {'U','S',0}, {'U','S','A',0}, 840 }, /* United States */
- { {'B','F',0}, {'B','F','A',0}, 854 }, /* Burkina Faso */
- { {'U','Y',0}, {'U','R','Y',0}, 858 }, /* Uruguay */
- { {'U','Z',0}, {'U','Z','B',0}, 860 }, /* Uzbekistan */
- { {'V','C',0}, {'V','C','T',0}, 670 }, /* St. Vincent and the Grenadines */
- { {'V','E',0}, {'V','E','N',0}, 862 }, /* Bolivarian Republic of Venezuela */
- { }, /* 250 unassigned */
- { {'V','N',0}, {'V','N','M',0}, 704 }, /* Vietnam */
- { {'V','I',0}, {'V','I','R',0}, 850 }, /* Virgin Islands */
- { {'V','A',0}, {'V','A','T',0}, 336 }, /* Vatican City */
- { {'N','A',0}, {'N','A','M',0}, 516 }, /* Namibia */
- { }, /* 255 unassigned */
- { }, /* 256 unassigned */
- { {'E','H',0}, {'E','S','H',0}, 732 }, /* Western Sahara (disputed) */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Wake Island */
- { {'W','S',0}, {'W','S','M',0}, 882 }, /* Samoa */
- { {'S','Z',0}, {'S','W','Z',0}, 748 }, /* Swaziland */
- { {'Y','E',0}, {'Y','E','M',0}, 887 }, /* Yemen */
- { }, /* 262 unassigned */
- { {'Z','M',0}, {'Z','M','B',0}, 894 }, /* Zambia */
- { {'Z','W',0}, {'Z','W','E',0}, 716 }, /* Zimbabwe */
- { }, /* 265 unassigned */
- { }, /* 266 unassigned */
- { }, /* 267 unassigned */
- { }, /* 268 unassigned */
- { {'C','S',0}, {'S','C','G',0}, 891 }, /* Serbia and Montenegro (Former) */
- { {'M','E',0}, {'M','N','E',0}, 499 }, /* Montenegro */
- { {'R','S',0}, {'S','R','B',0}, 688 }, /* Serbia */
- { }, /* 272 unassigned */
- { {'C','W',0}, {'C','U','W',0}, 531 }, /* Curaçao */
- { }, /* 274 unassigned */
- { }, /* 275 unassigned */
- { {'S','S',0}, {'S','S','D',0}, 728 }, /* South Sudan */
- { }, /* 277 unassigned */
- { }, /* 278 unassigned */
- { }, /* 279 unassigned */
- { }, /* 280 unassigned */
- { }, /* 281 unassigned */
- { }, /* 282 unassigned */
- { }, /* 283 unassigned */
- { }, /* 284 unassigned */
- { }, /* 285 unassigned */
- { }, /* 286 unassigned */
- { }, /* 287 unassigned */
- { }, /* 288 unassigned */
- { }, /* 289 unassigned */
- { }, /* 290 unassigned */
- { }, /* 291 unassigned */
- { }, /* 292 unassigned */
- { }, /* 293 unassigned */
- { }, /* 294 unassigned */
- { }, /* 295 unassigned */
- { }, /* 296 unassigned */
- { }, /* 297 unassigned */
- { }, /* 298 unassigned */
- { }, /* 299 unassigned */
- { {'A','I',0}, {'A','I','A',0}, 660 }, /* Anguilla */
- { {'A','Q',0}, {'A','T','A',0}, 10 }, /* Antarctica */
- { {'A','W',0}, {'A','B','W',0}, 533 }, /* Aruba */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Ascension Island */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Ashmore and Cartier Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Baker Island */
- { {'B','V',0}, {'B','V','T',0}, 74 }, /* Bouvet Island */
- { {'K','Y',0}, {'C','Y','M',0}, 136 }, /* Cayman Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Channel Islands */
- { {'C','X',0}, {'C','X','R',0}, 162 }, /* Christmas Island */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Clipperton Island */
- { {'C','C',0}, {'C','C','K',0}, 166 }, /* Cocos (Keeling) Islands */
- { {'C','K',0}, {'C','O','K',0}, 184 }, /* Cook Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Coral Sea Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Diego Garcia */
- { {'F','K',0}, {'F','L','K',0}, 238 }, /* Falkland Islands (Islas Malvinas) */
- { }, /* 316 unassigned */
- { {'G','F',0}, {'G','U','F',0}, 254 }, /* French Guiana */
- { {'P','F',0}, {'P','Y','F',0}, 258 }, /* French Polynesia */
- { {'T','F',0}, {'A','T','F',0}, 260 }, /* French Southern and Antarctic Lands */
- { }, /* 320 unassigned */
- { {'G','P',0}, {'G','L','P',0}, 312 }, /* Guadeloupe */
- { {'G','U',0}, {'G','U','M',0}, 316 }, /* Guam */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Guantanamo Bay */
- { {'G','G',0}, {'G','G','Y',0}, 831 }, /* Guernsey */
- { {'H','M',0}, {'H','M','D',0}, 334 }, /* Heard Island and McDonald Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Howland Island */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Jarvis Island */
- { {'J','E',0}, {'J','E','Y',0}, 832 }, /* Jersey */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Kingman Reef */
- { {'M','Q',0}, {'M','T','Q',0}, 474 }, /* Martinique */
- { {'Y','T',0}, {'M','Y','T',0}, 175 }, /* Mayotte */
- { {'M','S',0}, {'M','S','R',0}, 500 }, /* Montserrat */
- { {'A','N',0}, {'A','N','T',0}, 530 }, /* Netherlands Antilles (Former) */
- { {'N','C',0}, {'N','C','L',0}, 540 }, /* New Caledonia */
- { {'N','U',0}, {'N','I','U',0}, 570 }, /* Niue */
- { {'N','F',0}, {'N','F','K',0}, 574 }, /* Norfolk Island */
- { {'M','P',0}, {'M','N','P',0}, 580 }, /* Northern Mariana Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Palmyra Atoll */
- { {'P','N',0}, {'P','C','N',0}, 612 }, /* Pitcairn Islands */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Rota Island */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Saipan */
- { {'G','S',0}, {'S','G','S',0}, 239 }, /* South Georgia and the South Sandwich Islands */
- { {'S','H',0}, {'S','H','N',0}, 654 }, /* St. Helena */
- { }, /* 344 unassigned */
- { }, /* 345 unassigned */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Tinian Island */
- { {'T','K',0}, {'T','K','L',0}, 772 }, /* Tokelau */
- { {'X','X',0}, {'X','X',0}, 0 }, /* Tristan da Cunha */
- { {'T','C',0}, {'T','C','A',0}, 796 }, /* Turks and Caicos Islands */
- { }, /* 350 unassigned */
- { {'V','G',0}, {'V','G','B',0}, 92 }, /* Virgin Islands, British */
- { {'W','F',0}, {'W','L','F',0}, 876 }, /* Wallis and Futuna */
+ { 2, {'A','G',0}, {'A','T','G',0}, 10039880, 28 }, /* Antigua and Barbuda */
+ { 3, {'A','F',0}, {'A','F','G',0}, 47614, 4 }, /* Afghanistan */
+ { 4, {'D','Z',0}, {'D','Z','A',0}, 42487, 12 }, /* Algeria */
+ { 5, {'A','Z',0}, {'A','Z','E',0}, 47611, 31 }, /* Azerbaijan */
+ { 6, {'A','L',0}, {'A','L','B',0}, 47610, 8 }, /* Albania */
+ { 7, {'A','M',0}, {'A','R','M',0}, 47611, 51 }, /* Armenia */
+ { 8, {'A','D',0}, {'A','N','D',0}, 47610, 20 }, /* Andorra */
+ { 9, {'A','O',0}, {'A','G','O',0}, 42484, 24 }, /* Angola */
+ { 10, {'A','S',0}, {'A','S','M',0}, 26286, 16 }, /* American Samoa */
+ { 11, {'A','R',0}, {'A','R','G',0}, 31396, 32 }, /* Argentina */
+ { 12, {'A','U',0}, {'A','U','S',0}, 10210825, 36 }, /* Australia */
+ { 14, {'A','T',0}, {'A','U','T',0}, 10210824, 40 }, /* Austria */
+ { 17, {'B','H',0}, {'B','H','R',0}, 47611, 48 }, /* Bahrain */
+ { 18, {'B','B',0}, {'B','R','B',0}, 10039880, 52 }, /* Barbados */
+ { 19, {'B','W',0}, {'B','W','A',0}, 10039883, 72 }, /* Botswana */
+ { 20, {'B','M',0}, {'B','M','U',0}, 23581, 60 }, /* Bermuda */
+ { 21, {'B','E',0}, {'B','E','L',0}, 10210824, 56 }, /* Belgium */
+ { 22, {'B','S',0}, {'B','H','S',0}, 10039880, 44 }, /* Bahamas, The */
+ { 23, {'B','D',0}, {'B','G','D',0}, 47614, 50 }, /* Bangladesh */
+ { 24, {'B','Z',0}, {'B','L','Z',0}, 27082, 84 }, /* Belize */
+ { 25, {'B','A',0}, {'B','I','H',0}, 47610, 70 }, /* Bosnia and Herzegovina */
+ { 26, {'B','O',0}, {'B','O','L',0}, 31396, 68 }, /* Bolivia */
+ { 27, {'M','M',0}, {'M','M','R',0}, 47599, 104 }, /* Myanmar */
+ { 28, {'B','J',0}, {'B','E','N',0}, 42483, 204 }, /* Benin */
+ { 29, {'B','Y',0}, {'B','L','R',0}, 47609, 112 }, /* Belarus */
+ { 30, {'S','B',0}, {'S','L','B',0}, 20900, 90 }, /* Solomon Islands */
+ { 32, {'B','R',0}, {'B','R','A',0}, 31396, 76 }, /* Brazil */
+ { 34, {'B','T',0}, {'B','T','N',0}, 47614, 64 }, /* Bhutan */
+ { 35, {'B','G',0}, {'B','G','R',0}, 47609, 100 }, /* Bulgaria */
+ { 37, {'B','N',0}, {'B','R','N',0}, 47599, 96 }, /* Brunei */
+ { 38, {'B','I',0}, {'B','D','I',0}, 47603, 108 }, /* Burundi */
+ { 39, {'C','A',0}, {'C','A','N',0}, 23581, 124 }, /* Canada */
+ { 40, {'K','H',0}, {'K','H','M',0}, 47599, 116 }, /* Cambodia */
+ { 41, {'T','D',0}, {'T','C','D',0}, 42484, 148 }, /* Chad */
+ { 42, {'L','K',0}, {'L','K','A',0}, 47614, 144 }, /* Sri Lanka */
+ { 43, {'C','G',0}, {'C','O','G',0}, 42484, 178 }, /* Congo */
+ { 44, {'C','D',0}, {'C','O','D',0}, 42484, 180 }, /* Congo (DRC) */
+ { 45, {'C','N',0}, {'C','H','N',0}, 47600, 156 }, /* China */
+ { 46, {'C','L',0}, {'C','H','L',0}, 31396, 152 }, /* Chile */
+ { 49, {'C','M',0}, {'C','M','R',0}, 42484, 120 }, /* Cameroon */
+ { 50, {'K','M',0}, {'C','O','M',0}, 47603, 174 }, /* Comoros */
+ { 51, {'C','O',0}, {'C','O','L',0}, 31396, 170 }, /* Colombia */
+ { 54, {'C','R',0}, {'C','R','I',0}, 27082, 188 }, /* Costa Rica */
+ { 55, {'C','F',0}, {'C','A','F',0}, 42484, 140 }, /* Central African Republic */
+ { 56, {'C','U',0}, {'C','U','B',0}, 10039880, 192 }, /* Cuba */
+ { 57, {'C','V',0}, {'C','P','V',0}, 42483, 132 }, /* Cape Verde */
+ { 59, {'C','Y',0}, {'C','Y','P',0}, 47611, 196 }, /* Cyprus */
+ { 61, {'D','K',0}, {'D','N','K',0}, 10039882, 208 }, /* Denmark */
+ { 62, {'D','J',0}, {'D','J','I',0}, 47603, 262 }, /* Djibouti */
+ { 63, {'D','M',0}, {'D','M','A',0}, 10039880, 212 }, /* Dominica */
+ { 65, {'D','O',0}, {'D','O','M',0}, 10039880, 214 }, /* Dominican Republic */
+ { 66, {'E','C',0}, {'E','C','U',0}, 31396, 218 }, /* Ecuador */
+ { 67, {'E','G',0}, {'E','G','Y',0}, 42487, 818 }, /* Egypt */
+ { 68, {'I','E',0}, {'I','R','L',0}, 10039882, 372 }, /* Ireland */
+ { 69, {'G','Q',0}, {'G','N','Q',0}, 42484, 226 }, /* Equatorial Guinea */
+ { 70, {'E','E',0}, {'E','S','T',0}, 10039882, 233 }, /* Estonia */
+ { 71, {'E','R',0}, {'E','R','I',0}, 47603, 232 }, /* Eritrea */
+ { 72, {'S','V',0}, {'S','L','V',0}, 27082, 222 }, /* El Salvador */
+ { 73, {'E','T',0}, {'E','T','H',0}, 47603, 231 }, /* Ethiopia */
+ { 75, {'C','Z',0}, {'C','Z','E',0}, 47609, 203 }, /* Czech Republic */
+ { 77, {'F','I',0}, {'F','I','N',0}, 10039882, 246 }, /* Finland */
+ { 78, {'F','J',0}, {'F','J','I',0}, 20900, 242 }, /* Fiji Islands */
+ { 80, {'F','M',0}, {'F','S','M',0}, 21206, 583 }, /* Micronesia */
+ { 81, {'F','O',0}, {'F','R','O',0}, 10039882, 234 }, /* Faroe Islands */
+ { 84, {'F','R',0}, {'F','R','A',0}, 10210824, 250 }, /* France */
+ { 86, {'G','M',0}, {'G','M','B',0}, 42483, 270 }, /* Gambia, The */
+ { 87, {'G','A',0}, {'G','A','B',0}, 42484, 266 }, /* Gabon */
+ { 88, {'G','E',0}, {'G','E','O',0}, 47611, 268 }, /* Georgia */
+ { 89, {'G','H',0}, {'G','H','A',0}, 42483, 288 }, /* Ghana */
+ { 90, {'G','I',0}, {'G','I','B',0}, 47610, 292 }, /* Gibraltar */
+ { 91, {'G','D',0}, {'G','R','D',0}, 10039880, 308 }, /* Grenada */
+ { 93, {'G','L',0}, {'G','R','L',0}, 23581, 304 }, /* Greenland */
+ { 94, {'D','E',0}, {'D','E','U',0}, 10210824, 276 }, /* Germany */
+ { 98, {'G','R',0}, {'G','R','C',0}, 47610, 300 }, /* Greece */
+ { 99, {'G','T',0}, {'G','T','M',0}, 27082, 320 }, /* Guatemala */
+ { 100, {'G','N',0}, {'G','I','N',0}, 42483, 324 }, /* Guinea */
+ { 101, {'G','Y',0}, {'G','U','Y',0}, 31396, 328 }, /* Guyana */
+ { 103, {'H','T',0}, {'H','T','I',0}, 10039880, 332 }, /* Haiti */
+ { 104, {'H','K',0}, {'H','K','G',0}, 47600, 344 }, /* Hong Kong S.A.R. */
+ { 106, {'H','N',0}, {'H','N','D',0}, 27082, 340 }, /* Honduras */
+ { 108, {'H','R',0}, {'H','R','V',0}, 47610, 191 }, /* Croatia */
+ { 109, {'H','U',0}, {'H','U','N',0}, 47609, 348 }, /* Hungary */
+ { 110, {'I','S',0}, {'I','S','L',0}, 10039882, 352 }, /* Iceland */
+ { 111, {'I','D',0}, {'I','D','N',0}, 47599, 360 }, /* Indonesia */
+ { 113, {'I','N',0}, {'I','N','D',0}, 47614, 356 }, /* India */
+ { 114, {'I','O',0}, {'I','O','T',0}, 39070, 86 }, /* British Indian Ocean Territory */
+ { 116, {'I','R',0}, {'I','R','N',0}, 47614, 364 }, /* Iran */
+ { 117, {'I','L',0}, {'I','S','R',0}, 47611, 376 }, /* Israel */
+ { 118, {'I','T',0}, {'I','T','A',0}, 47610, 380 }, /* Italy */
+ { 119, {'C','I',0}, {'C','I','V',0}, 42483, 384 }, /* Côte d'Ivoire */
+ { 121, {'I','Q',0}, {'I','R','Q',0}, 47611, 368 }, /* Iraq */
+ { 122, {'J','P',0}, {'J','P','N',0}, 47600, 392 }, /* Japan */
+ { 124, {'J','M',0}, {'J','A','M',0}, 10039880, 388 }, /* Jamaica */
+ { 125, {'S','J',0}, {'S','J','M',0}, 10039882, 744 }, /* Jan Mayen */
+ { 126, {'J','O',0}, {'J','O','R',0}, 47611, 400 }, /* Jordan */
+ { 127, {'X','X',0}, {'X','X',0}, 161832256 }, /* Johnston Atoll */
+ { 129, {'K','E',0}, {'K','E','N',0}, 47603, 404 }, /* Kenya */
+ { 130, {'K','G',0}, {'K','G','Z',0}, 47590, 417 }, /* Kyrgyzstan */
+ { 131, {'K','P',0}, {'P','R','K',0}, 47600, 408 }, /* North Korea */
+ { 133, {'K','I',0}, {'K','I','R',0}, 21206, 296 }, /* Kiribati */
+ { 134, {'K','R',0}, {'K','O','R',0}, 47600, 410 }, /* Korea */
+ { 136, {'K','W',0}, {'K','W','T',0}, 47611, 414 }, /* Kuwait */
+ { 137, {'K','Z',0}, {'K','A','Z',0}, 47590, 398 }, /* Kazakhstan */
+ { 138, {'L','A',0}, {'L','A','O',0}, 47599, 418 }, /* Laos */
+ { 139, {'L','B',0}, {'L','B','N',0}, 47611, 422 }, /* Lebanon */
+ { 140, {'L','V',0}, {'L','V','A',0}, 10039882, 428 }, /* Latvia */
+ { 141, {'L','T',0}, {'L','T','U',0}, 10039882, 440 }, /* Lithuania */
+ { 142, {'L','R',0}, {'L','B','R',0}, 42483, 430 }, /* Liberia */
+ { 143, {'S','K',0}, {'S','V','K',0}, 47609, 703 }, /* Slovakia */
+ { 145, {'L','I',0}, {'L','I','E',0}, 10210824, 438 }, /* Liechtenstein */
+ { 146, {'L','S',0}, {'L','S','O',0}, 10039883, 426 }, /* Lesotho */
+ { 147, {'L','U',0}, {'L','U','X',0}, 10210824, 442 }, /* Luxembourg */
+ { 148, {'L','Y',0}, {'L','B','Y',0}, 42487, 434 }, /* Libya */
+ { 149, {'M','G',0}, {'M','D','G',0}, 47603, 450 }, /* Madagascar */
+ { 151, {'M','O',0}, {'M','A','C',0}, 47600, 446 }, /* Macao S.A.R. */
+ { 152, {'M','D',0}, {'M','D','A',0}, 47609, 498 }, /* Moldova */
+ { 154, {'M','N',0}, {'M','N','G',0}, 47600, 496 }, /* Mongolia */
+ { 156, {'M','W',0}, {'M','W','I',0}, 47603, 454 }, /* Malawi */
+ { 157, {'M','L',0}, {'M','L','I',0}, 42483, 466 }, /* Mali */
+ { 158, {'M','C',0}, {'M','C','O',0}, 10210824, 492 }, /* Monaco */
+ { 159, {'M','A',0}, {'M','A','R',0}, 42487, 504 }, /* Morocco */
+ { 160, {'M','U',0}, {'M','U','S',0}, 47603, 480 }, /* Mauritius */
+ { 162, {'M','R',0}, {'M','R','T',0}, 42483, 478 }, /* Mauritania */
+ { 163, {'M','T',0}, {'M','L','T',0}, 47610, 470 }, /* Malta */
+ { 164, {'O','M',0}, {'O','M','N',0}, 47611, 512 }, /* Oman */
+ { 165, {'M','V',0}, {'M','D','V',0}, 47614, 462 }, /* Maldives */
+ { 166, {'M','X',0}, {'M','E','X',0}, 27082, 484 }, /* Mexico */
+ { 167, {'M','Y',0}, {'M','Y','S',0}, 47599, 458 }, /* Malaysia */
+ { 168, {'M','Z',0}, {'M','O','Z',0}, 47603, 508 }, /* Mozambique */
+ { 173, {'N','E',0}, {'N','E','R',0}, 42483, 562 }, /* Niger */
+ { 174, {'V','U',0}, {'V','U','T',0}, 20900, 548 }, /* Vanuatu */
+ { 175, {'N','G',0}, {'N','G','A',0}, 42483, 566 }, /* Nigeria */
+ { 176, {'N','L',0}, {'N','L','D',0}, 10210824, 528 }, /* Netherlands */
+ { 177, {'N','O',0}, {'N','O','R',0}, 10039882, 578 }, /* Norway */
+ { 178, {'N','P',0}, {'N','P','L',0}, 47614, 524 }, /* Nepal */
+ { 180, {'N','R',0}, {'N','R','U',0}, 21206, 520 }, /* Nauru */
+ { 181, {'S','R',0}, {'S','U','R',0}, 31396, 740 }, /* Suriname */
+ { 182, {'N','I',0}, {'N','I','C',0}, 27082, 558 }, /* Nicaragua */
+ { 183, {'N','Z',0}, {'N','Z','L',0}, 10210825, 554 }, /* New Zealand */
+ { 184, {'P','S',0}, {'P','S','E',0}, 47611, 275 }, /* Palestinian Authority */
+ { 185, {'P','Y',0}, {'P','R','Y',0}, 31396, 600 }, /* Paraguay */
+ { 187, {'P','E',0}, {'P','E','R',0}, 31396, 604 }, /* Peru */
+ { 190, {'P','K',0}, {'P','A','K',0}, 47614, 586 }, /* Pakistan */
+ { 191, {'P','L',0}, {'P','O','L',0}, 47609, 616 }, /* Poland */
+ { 192, {'P','A',0}, {'P','A','N',0}, 27082, 591 }, /* Panama */
+ { 193, {'P','T',0}, {'P','R','T',0}, 47610, 620 }, /* Portugal */
+ { 194, {'P','G',0}, {'P','N','G',0}, 20900, 598 }, /* Papua New Guinea */
+ { 195, {'P','W',0}, {'P','L','W',0}, 21206, 585 }, /* Palau */
+ { 196, {'G','W',0}, {'G','N','B',0}, 42483, 624 }, /* Guinea-Bissau */
+ { 197, {'Q','A',0}, {'Q','A','T',0}, 47611, 634 }, /* Qatar */
+ { 198, {'R','E',0}, {'R','E','U',0}, 47603, 638 }, /* Reunion */
+ { 199, {'M','H',0}, {'M','H','L',0}, 21206, 584 }, /* Marshall Islands */
+ { 200, {'R','O',0}, {'R','O','U',0}, 47609, 642 }, /* Romania */
+ { 201, {'P','H',0}, {'P','H','L',0}, 47599, 608 }, /* Philippines */
+ { 202, {'P','R',0}, {'P','R','I',0}, 10039880, 630 }, /* Puerto Rico */
+ { 203, {'R','U',0}, {'R','U','S',0}, 47609, 643 }, /* Russia */
+ { 204, {'R','W',0}, {'R','W','A',0}, 47603, 646 }, /* Rwanda */
+ { 205, {'S','A',0}, {'S','A','U',0}, 47611, 682 }, /* Saudi Arabia */
+ { 206, {'P','M',0}, {'S','P','M',0}, 23581, 666 }, /* St. Pierre and Miquelon */
+ { 207, {'K','N',0}, {'K','N','A',0}, 10039880, 659 }, /* St. Kitts and Nevis */
+ { 208, {'S','C',0}, {'S','Y','C',0}, 47603, 690 }, /* Seychelles */
+ { 209, {'Z','A',0}, {'Z','A','F',0}, 10039883, 710 }, /* South Africa */
+ { 210, {'S','N',0}, {'S','E','N',0}, 42483, 686 }, /* Senegal */
+ { 212, {'S','I',0}, {'S','V','N',0}, 47610, 705 }, /* Slovenia */
+ { 213, {'S','L',0}, {'S','L','E',0}, 42483, 694 }, /* Sierra Leone */
+ { 214, {'S','M',0}, {'S','M','R',0}, 47610, 674 }, /* San Marino */
+ { 215, {'S','G',0}, {'S','G','P',0}, 47599, 702 }, /* Singapore */
+ { 216, {'S','O',0}, {'S','O','M',0}, 47603, 706 }, /* Somalia */
+ { 217, {'E','S',0}, {'E','S','P',0}, 47610, 724 }, /* Spain */
+ { 218, {'L','C',0}, {'L','C','A',0}, 10039880, 662 }, /* St. Lucia */
+ { 219, {'S','D',0}, {'S','D','N',0}, 42487, 736 }, /* Sudan */
+ { 220, {'S','J',0}, {'S','J','M',0}, 10039882, 744 }, /* Svalbard */
+ { 221, {'S','E',0}, {'S','W','E',0}, 10039882, 752 }, /* Sweden */
+ { 222, {'S','Y',0}, {'S','Y','R',0}, 47611, 760 }, /* Syria */
+ { 223, {'C','H',0}, {'C','H','E',0}, 10210824, 756 }, /* Switzerland */
+ { 224, {'A','E',0}, {'A','R','E',0}, 47611, 784 }, /* United Arab Emirates */
+ { 225, {'T','T',0}, {'T','T','O',0}, 10039880, 780 }, /* Trinidad and Tobago */
+ { 227, {'T','H',0}, {'T','H','A',0}, 47599, 764 }, /* Thailand */
+ { 228, {'T','J',0}, {'T','J','K',0}, 47590, 762 }, /* Tajikistan */
+ { 231, {'T','O',0}, {'T','O','N',0}, 26286, 776 }, /* Tonga */
+ { 232, {'T','G',0}, {'T','G','O',0}, 42483, 768 }, /* Togo */
+ { 233, {'S','T',0}, {'S','T','P',0}, 42484, 678 }, /* São Tomé and Príncipe */
+ { 234, {'T','N',0}, {'T','U','N',0}, 42487, 788 }, /* Tunisia */
+ { 235, {'T','R',0}, {'T','U','R',0}, 47611, 792 }, /* Turkey */
+ { 236, {'T','V',0}, {'T','U','V',0}, 26286, 798 }, /* Tuvalu */
+ { 237, {'T','W',0}, {'T','W','N',0}, 47600, 158 }, /* Taiwan */
+ { 238, {'T','M',0}, {'T','K','M',0}, 47590, 795 }, /* Turkmenistan */
+ { 239, {'T','Z',0}, {'T','Z','A',0}, 47603, 834 }, /* Tanzania */
+ { 240, {'U','G',0}, {'U','G','A',0}, 47603, 800 }, /* Uganda */
+ { 241, {'U','A',0}, {'U','K','R',0}, 47609, 804 }, /* Ukraine */
+ { 242, {'G','B',0}, {'G','B','R',0}, 10039882, 826 }, /* United Kingdom */
+ { 244, {'U','S',0}, {'U','S','A',0}, 23581, 840 }, /* United States */
+ { 245, {'B','F',0}, {'B','F','A',0}, 42483, 854 }, /* Burkina Faso */
+ { 246, {'U','Y',0}, {'U','R','Y',0}, 31396, 858 }, /* Uruguay */
+ { 247, {'U','Z',0}, {'U','Z','B',0}, 47590, 860 }, /* Uzbekistan */
+ { 248, {'V','C',0}, {'V','C','T',0}, 10039880, 670 }, /* St. Vincent and the Grenadines */
+ { 249, {'V','E',0}, {'V','E','N',0}, 31396, 862 }, /* Bolivarian Republic of Venezuela */
+ { 251, {'V','N',0}, {'V','N','M',0}, 47599, 704 }, /* Vietnam */
+ { 252, {'V','I',0}, {'V','I','R',0}, 10039880, 850 }, /* Virgin Islands */
+ { 253, {'V','A',0}, {'V','A','T',0}, 47610, 336 }, /* Vatican City */
+ { 254, {'N','A',0}, {'N','A','M',0}, 10039883, 516 }, /* Namibia */
+ { 257, {'E','H',0}, {'E','S','H',0}, 42487, 732 }, /* Western Sahara (disputed) */
+ { 258, {'X','X',0}, {'X','X',0}, 161832256 }, /* Wake Island */
+ { 259, {'W','S',0}, {'W','S','M',0}, 26286, 882 }, /* Samoa */
+ { 260, {'S','Z',0}, {'S','W','Z',0}, 10039883, 748 }, /* Swaziland */
+ { 261, {'Y','E',0}, {'Y','E','M',0}, 47611, 887 }, /* Yemen */
+ { 263, {'Z','M',0}, {'Z','M','B',0}, 47603, 894 }, /* Zambia */
+ { 264, {'Z','W',0}, {'Z','W','E',0}, 47603, 716 }, /* Zimbabwe */
+ { 269, {'C','S',0}, {'S','C','G',0}, 47610, 891 }, /* Serbia and Montenegro (Former) */
+ { 270, {'M','E',0}, {'M','N','E',0}, 47610, 499 }, /* Montenegro */
+ { 271, {'R','S',0}, {'S','R','B',0}, 47610, 688 }, /* Serbia */
+ { 273, {'C','W',0}, {'C','U','W',0}, 10039880, 531 }, /* Curaçao */
+ { 276, {'S','S',0}, {'S','S','D',0}, 42487, 728 }, /* South Sudan */
+ { 300, {'A','I',0}, {'A','I','A',0}, 10039880, 660 }, /* Anguilla */
+ { 301, {'A','Q',0}, {'A','T','A',0}, 39070, 10 }, /* Antarctica */
+ { 302, {'A','W',0}, {'A','B','W',0}, 10039880, 533 }, /* Aruba */
+ { 303, {'X','X',0}, {'X','X',0}, 39070 }, /* Ascension Island */
+ { 304, {'X','X',0}, {'X','X',0}, 10210825 }, /* Ashmore and Cartier Islands */
+ { 305, {'X','X',0}, {'X','X',0}, 161832256 }, /* Baker Island */
+ { 306, {'B','V',0}, {'B','V','T',0}, 39070, 74 }, /* Bouvet Island */
+ { 307, {'K','Y',0}, {'C','Y','M',0}, 10039880, 136 }, /* Cayman Islands */
+ { 308, {'X','X',0}, {'X','X',0}, 10210824, 0, LOCATION_BOTH }, /* Channel Islands */
+ { 309, {'C','X',0}, {'C','X','R',0}, 12, 162 }, /* Christmas Island */
+ { 310, {'X','X',0}, {'X','X',0}, 27114 }, /* Clipperton Island */
+ { 311, {'C','C',0}, {'C','C','K',0}, 10210825, 166 }, /* Cocos (Keeling) Islands */
+ { 312, {'C','K',0}, {'C','O','K',0}, 26286, 184 }, /* Cook Islands */
+ { 313, {'X','X',0}, {'X','X',0}, 10210825 }, /* Coral Sea Islands */
+ { 314, {'X','X',0}, {'X','X',0}, 114 }, /* Diego Garcia */
+ { 315, {'F','K',0}, {'F','L','K',0}, 31396, 238 }, /* Falkland Islands (Islas Malvinas) */
+ { 317, {'G','F',0}, {'G','U','F',0}, 31396, 254 }, /* French Guiana */
+ { 318, {'P','F',0}, {'P','Y','F',0}, 26286, 258 }, /* French Polynesia */
+ { 319, {'T','F',0}, {'A','T','F',0}, 39070, 260 }, /* French Southern and Antarctic Lands */
+ { 321, {'G','P',0}, {'G','L','P',0}, 10039880, 312 }, /* Guadeloupe */
+ { 322, {'G','U',0}, {'G','U','M',0}, 21206, 316 }, /* Guam */
+ { 323, {'X','X',0}, {'X','X',0}, 39070 }, /* Guantanamo Bay */
+ { 324, {'G','G',0}, {'G','G','Y',0}, 308, 831 }, /* Guernsey */
+ { 325, {'H','M',0}, {'H','M','D',0}, 39070, 334 }, /* Heard Island and McDonald Islands */
+ { 326, {'X','X',0}, {'X','X',0}, 161832256 }, /* Howland Island */
+ { 327, {'X','X',0}, {'X','X',0}, 161832256 }, /* Jarvis Island */
+ { 328, {'J','E',0}, {'J','E','Y',0}, 308, 832 }, /* Jersey */
+ { 329, {'X','X',0}, {'X','X',0}, 161832256 }, /* Kingman Reef */
+ { 330, {'M','Q',0}, {'M','T','Q',0}, 10039880, 474 }, /* Martinique */
+ { 331, {'Y','T',0}, {'M','Y','T',0}, 47603, 175 }, /* Mayotte */
+ { 332, {'M','S',0}, {'M','S','R',0}, 10039880, 500 }, /* Montserrat */
+ { 333, {'A','N',0}, {'A','N','T',0}, 10039880, 530, LOCATION_BOTH }, /* Netherlands Antilles (Former) */
+ { 334, {'N','C',0}, {'N','C','L',0}, 20900, 540 }, /* New Caledonia */
+ { 335, {'N','U',0}, {'N','I','U',0}, 26286, 570 }, /* Niue */
+ { 336, {'N','F',0}, {'N','F','K',0}, 10210825, 574 }, /* Norfolk Island */
+ { 337, {'M','P',0}, {'M','N','P',0}, 21206, 580 }, /* Northern Mariana Islands */
+ { 338, {'X','X',0}, {'X','X',0}, 161832256 }, /* Palmyra Atoll */
+ { 339, {'P','N',0}, {'P','C','N',0}, 26286, 612 }, /* Pitcairn Islands */
+ { 340, {'X','X',0}, {'X','X',0}, 337 }, /* Rota Island */
+ { 341, {'X','X',0}, {'X','X',0}, 337 }, /* Saipan */
+ { 342, {'G','S',0}, {'S','G','S',0}, 39070, 239 }, /* South Georgia and the South Sandwich Islands */
+ { 343, {'S','H',0}, {'S','H','N',0}, 42483, 654 }, /* St. Helena */
+ { 346, {'X','X',0}, {'X','X',0}, 337 }, /* Tinian Island */
+ { 347, {'T','K',0}, {'T','K','L',0}, 26286, 772 }, /* Tokelau */
+ { 348, {'X','X',0}, {'X','X',0}, 39070 }, /* Tristan da Cunha */
+ { 349, {'T','C',0}, {'T','C','A',0}, 10039880, 796 }, /* Turks and Caicos Islands */
+ { 351, {'V','G',0}, {'V','G','B',0}, 10039880, 92 }, /* Virgin Islands, British */
+ { 352, {'W','F',0}, {'W','L','F',0}, 26286, 876 }, /* Wallis and Futuna */
+ { 742, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* Africa */
+ { 2129, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* Asia */
+ { 10541, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* Europe */
+ { 15126, {'I','M',0}, {'I','M','N',0}, 10039882, 833 }, /* Man, Isle of */
+ { 19618, {'M','K',0}, {'M','K','D',0}, 47610, 807 }, /* Macedonia, Former Yugoslav Republic of */
+ { 20900, {'X','X',0}, {'X','X',0}, 27114, 0, LOCATION_REGION }, /* Melanesia */
+ { 21206, {'X','X',0}, {'X','X',0}, 27114, 0, LOCATION_REGION }, /* Micronesia */
+ { 21242, {'X','X',0}, {'X','X',0}, 161832256 }, /* Midway Islands */
+ { 23581, {'X','X',0}, {'X','X',0}, 10026358, 0, LOCATION_REGION }, /* Northern America */
+ { 26286, {'X','X',0}, {'X','X',0}, 27114, 0, LOCATION_REGION }, /* Polynesia */
+ { 27082, {'X','X',0}, {'X','X',0}, 161832257, 0, LOCATION_REGION }, /* Central America */
+ { 27114, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* Oceania */
+ { 30967, {'S','X',0}, {'S','X','M',0}, 10039880, 534 }, /* Sint Maarten (Dutch part) */
+ { 31396, {'X','X',0}, {'X','X',0}, 161832257, 0, LOCATION_REGION }, /* South America */
+ { 31706, {'M','F',0}, {'M','A','F',0}, 10039880, 663 }, /* Saint Martin (French part) */
+ { 39070, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* World */
+ { 42483, {'X','X',0}, {'X','X',0}, 742, 0, LOCATION_REGION }, /* Western Africa */
+ { 42484, {'X','X',0}, {'X','X',0}, 742, 0, LOCATION_REGION }, /* Middle Africa */
+ { 42487, {'X','X',0}, {'X','X',0}, 742, 0, LOCATION_REGION }, /* Northern Africa */
+ { 47590, {'X','X',0}, {'X','X',0}, 2129, 0, LOCATION_REGION }, /* Central Asia */
+ { 47599, {'X','X',0}, {'X','X',0}, 2129, 0, LOCATION_REGION }, /* South-Eastern Asia */
+ { 47600, {'X','X',0}, {'X','X',0}, 2129, 0, LOCATION_REGION }, /* Eastern Asia */
+ { 47603, {'X','X',0}, {'X','X',0}, 742, 0, LOCATION_REGION }, /* Eastern Africa */
+ { 47609, {'X','X',0}, {'X','X',0}, 10541, 0, LOCATION_REGION }, /* Eastern Europe */
+ { 47610, {'X','X',0}, {'X','X',0}, 10541, 0, LOCATION_REGION }, /* Southern Europe */
+ { 47611, {'X','X',0}, {'X','X',0}, 2129, 0, LOCATION_REGION }, /* Middle East */
+ { 47614, {'X','X',0}, {'X','X',0}, 2129, 0, LOCATION_REGION }, /* Southern Asia */
+ { 7299303, {'T','L',0}, {'T','L','S',0}, 47599, 626 }, /* Democratic Republic of Timor-Leste */
+ { 10026358, {'X','X',0}, {'X','X',0}, 39070, 0, LOCATION_REGION }, /* Americas */
+ { 10028789, {'A','X',0}, {'A','L','A',0}, 10039882, 248 }, /* Åland Islands */
+ { 10039880, {'X','X',0}, {'X','X',0}, 161832257, 0, LOCATION_REGION }, /* Caribbean */
+ { 10039882, {'X','X',0}, {'X','X',0}, 10541, 0, LOCATION_REGION }, /* Northern Europe */
+ { 10039883, {'X','X',0}, {'X','X',0}, 742, 0, LOCATION_REGION }, /* Southern Africa */
+ { 10210824, {'X','X',0}, {'X','X',0}, 10541, 0, LOCATION_REGION }, /* Western Europe */
+ { 10210825, {'X','X',0}, {'X','X',0}, 27114, 0, LOCATION_REGION }, /* Australia and New Zealand */
+ { 161832015, {'B','L',0}, {'B','L','M',0}, 10039880, 652 }, /* Saint Barthélemy */
+ { 161832256, {'U','M',0}, {'U','M','I',0}, 27114, 581 }, /* U.S. Minor Outlying Islands */
+ { 161832257, {'X','X',0}, {'X','X',0}, 10026358, 0, LOCATION_REGION }, /* Latin America and the Caribbean */
};
+static const struct geoinfo_t *get_geoinfo_dataptr(GEOID geoid)
+{
+ int min, max;
+
+ min = 0;
+ max = sizeof(geoinfodata)/sizeof(struct geoinfo_t)-1;
+
+ while (min <= max) {
+ const struct geoinfo_t *ptr;
+ int n = (min+max)/2;
+
+ ptr = &geoinfodata[n];
+ if (geoid == ptr->id)
+ /* we don't need empty entry */
+ return *ptr->iso2W ? ptr : NULL;
+
+ if (ptr->id > geoid)
+ max = n-1;
+ else
+ min = n+1;
+ }
+
+ return NULL;
+}
+
/******************************************************************************
* GetGeoInfoW (KERNEL32.@)
*/
@@ -4451,31 +4344,26 @@
const struct geoinfo_t *ptr;
const WCHAR *str = NULL;
WCHAR buffW[12];
+ LONG val = 0;
INT len;
TRACE("%d %d %p %d %d\n", geoid, geotype, data, data_len, lang);
- /* validate index */
- if (geoid < 0 || geoid > sizeof(geoinfodata)/sizeof(struct geoinfo_t)) {
- SetLastError(ERROR_INVALID_PARAMETER);
- return 0;
- }
-
- ptr = &geoinfodata[geoid];
- if (!*ptr->iso2W) {
+ if (!(ptr = get_geoinfo_dataptr(geoid))) {
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
}
switch (geotype) {
case GEO_NATION:
+ val = geoid;
+ break;
case GEO_ISO_UN_NUMBER:
- {
- static const WCHAR fmtW[] = {'%','d',0};
- sprintfW(buffW, fmtW, geotype == GEO_NATION ? geoid : ptr->uncode);
- str = buffW;
+ val = ptr->uncode;
+ break;
+ case GEO_PARENT:
+ val = ptr->parent;
break;
- }
case GEO_ISO2:
case GEO_ISO3:
{
@@ -4490,7 +4378,6 @@
case GEO_OFFICIALLANGUAGES:
case GEO_LATITUDE:
case GEO_LONGITUDE:
- case GEO_PARENT:
FIXME("type %d is not supported\n", geotype);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
@@ -4500,6 +4387,12 @@
return 0;
}
+ if (val) {
+ static const WCHAR fmtW[] = {'%','d',0};
+ sprintfW(buffW, fmtW, val);
+ str = buffW;
+ }
+
len = strlenW(str) + 1;
if (!data || !data_len)
return len;
@@ -4543,6 +4436,55 @@
return data_len < len ? 0 : len;
}
+/******************************************************************************
+ * EnumSystemGeoID (KERNEL32.@)
+ *
+ * Call a users function for every location available on the system.
+ *
+ * PARAMS
+ * geoclass [I] Type of information desired (SYSGEOTYPE enum from "winnls.h")
+ * parent [I] GEOID for the parent
+ * enumproc [I] Callback function to call for each location
+ *
+ * RETURNS
+ * Success: TRUE.
+ * Failure: FALSE. Use GetLastError() to determine the cause.
+ */
+BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumproc)
+{
+ INT i;
+
+ TRACE("(%d, %d, %p)\n", geoclass, parent, enumproc);
+
+ if (!enumproc) {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ if (geoclass != GEOCLASS_NATION && geoclass != GEOCLASS_REGION) {
+ SetLastError(ERROR_INVALID_FLAGS);
+ return FALSE;
+ }
+
+ for (i = 0; i < sizeof(geoinfodata)/sizeof(struct geoinfo_t); i++) {
+ const struct geoinfo_t *ptr = &geoinfodata[i];
+
+ if (geoclass == GEOCLASS_NATION && (ptr->kind == LOCATION_REGION))
+ continue;
+
+ if (geoclass == GEOCLASS_REGION && (ptr->kind == LOCATION_NATION))
+ continue;
+
+ if (parent && ptr->parent != parent)
+ continue;
+
+ if (!enumproc(ptr->id))
+ return TRUE;
+ }
+
+ return TRUE;
+}
+
INT WINAPI GetUserDefaultLocaleName(LPWSTR localename, int buffersize)
{
LCID userlcid;
diff -Nru wine1.7-1.7.22/dlls/kernel32/tests/locale.c wine1.7-1.7.24/dlls/kernel32/tests/locale.c
--- wine1.7-1.7.22/dlls/kernel32/tests/locale.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/kernel32/tests/locale.c 2014-08-08 20:19:29.000000000 +0000
@@ -92,6 +92,7 @@
LPNLSVERSIONINFO, LPVOID, LPARAM);
static INT (WINAPI *pGetGeoInfoA)(GEOID, GEOTYPE, LPSTR, INT, LANGID);
static INT (WINAPI *pGetGeoInfoW)(GEOID, GEOTYPE, LPWSTR, INT, LANGID);
+static BOOL (WINAPI *pEnumSystemGeoID)(GEOCLASS, GEOID, GEO_ENUMPROC);
static void InitFunctionPointers(void)
{
@@ -117,6 +118,7 @@
X(CompareStringEx);
X(GetGeoInfoA);
X(GetGeoInfoW);
+ X(EnumSystemGeoID);
#undef X
}
@@ -3126,7 +3128,7 @@
ret = EnumDateFormatsA(enum_datetime_procA, lcid, DATE_YEARMONTH);
if (!ret && (GetLastError() == ERROR_INVALID_FLAGS))
{
- skip("DATE_YEARMONTH is only present on W2K and later\n");
+ win_skip("DATE_YEARMONTH is only present on W2K and later\n");
return;
}
ok(ret, "EnumDateFormatsA(DATE_YEARMONTH) error %d\n", GetLastError());
@@ -3181,7 +3183,7 @@
ret = GetCPInfo(CP_UTF7, &cpinfo);
if (!ret && GetLastError() == ERROR_INVALID_PARAMETER)
{
- skip("Codepage CP_UTF7 is not installed/available\n");
+ win_skip("Codepage CP_UTF7 is not installed/available\n");
}
else
{
@@ -3197,7 +3199,7 @@
ret = GetCPInfo(CP_UTF8, &cpinfo);
if (!ret && GetLastError() == ERROR_INVALID_PARAMETER)
{
- skip("Codepage CP_UTF8 is not installed/available\n");
+ win_skip("Codepage CP_UTF8 is not installed/available\n");
}
else
{
@@ -3896,6 +3898,17 @@
ok(ret == 4, "got %d\n", ret);
ok(!strcmp(buffA, "203"), "got %s\n", buffA);
+ /* GEO_PARENT */
+ buffA[0] = 0;
+ ret = pGetGeoInfoA(203, GEO_PARENT, buffA, 20, 0);
+ if (ret == 0)
+ win_skip("GEO_PARENT not supported.\n");
+ else
+ {
+ ok(ret == 6, "got %d\n", ret);
+ ok(!strcmp(buffA, "47609"), "got %s\n", buffA);
+ }
+
buffA[0] = 0;
ret = pGetGeoInfoA(203, GEO_ISO_UN_NUMBER, buffA, 20, 0);
if (ret == 0)
@@ -3913,6 +3926,73 @@
ok(GetLastError() == ERROR_INVALID_FLAGS, "got %d\n", GetLastError());
}
+static int geoidenum_count;
+static BOOL CALLBACK test_geoid_enumproc(GEOID geoid)
+{
+ INT ret = pGetGeoInfoA(geoid, GEO_ISO2, NULL, 0, 0);
+ ok(ret == 3, "got %d for %d\n", ret, geoid);
+ /* valid geoid starts at 2 */
+ ok(geoid >= 2, "got geoid %d\n", geoid);
+
+ return geoidenum_count++ < 5;
+}
+
+static BOOL CALLBACK test_geoid_enumproc2(GEOID geoid)
+{
+ geoidenum_count++;
+ return TRUE;
+}
+
+static void test_EnumSystemGeoID(void)
+{
+ BOOL ret;
+
+ if (!pEnumSystemGeoID)
+ {
+ win_skip("EnumSystemGeoID is not available.\n");
+ return;
+ }
+
+ SetLastError(0xdeadbeef);
+ ret = pEnumSystemGeoID(GEOCLASS_NATION, 0, NULL);
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %d\n", GetLastError());
+
+ SetLastError(0xdeadbeef);
+ ret = pEnumSystemGeoID(GEOCLASS_NATION+1, 0, test_geoid_enumproc);
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_INVALID_FLAGS, "got %d\n", GetLastError());
+
+ SetLastError(0xdeadbeef);
+ ret = pEnumSystemGeoID(GEOCLASS_NATION+1, 0, NULL);
+ ok(!ret, "got %d\n", ret);
+ ok(GetLastError() == ERROR_INVALID_PARAMETER, "got %d\n", GetLastError());
+
+ ret = pEnumSystemGeoID(GEOCLASS_NATION, 0, test_geoid_enumproc);
+ ok(ret, "got %d\n", ret);
+
+ /* only first level is enumerated, not the whole hierarchy */
+ geoidenum_count = 0;
+ ret = pEnumSystemGeoID(GEOCLASS_NATION, 39070, test_geoid_enumproc2);
+ if (ret == 0)
+ win_skip("Parent GEOID is not supported in EnumSystemGeoID.\n");
+ else
+ ok(ret && geoidenum_count > 0, "got %d, count %d\n", ret, geoidenum_count);
+
+ geoidenum_count = 0;
+ ret = pEnumSystemGeoID(GEOCLASS_REGION, 39070, test_geoid_enumproc2);
+ if (ret == 0)
+ win_skip("GEOCLASS_REGION is not supported in EnumSystemGeoID.\n");
+ else
+ {
+ ok(ret && geoidenum_count > 0, "got %d, count %d\n", ret, geoidenum_count);
+
+ geoidenum_count = 0;
+ ret = pEnumSystemGeoID(GEOCLASS_REGION, 0, test_geoid_enumproc2);
+ ok(ret && geoidenum_count > 0, "got %d, count %d\n", ret, geoidenum_count);
+ }
+}
+
START_TEST(locale)
{
InitFunctionPointers();
@@ -3949,6 +4029,7 @@
test_IsValidLocaleName();
test_CompareStringOrdinal();
test_GetGeoInfo();
+ test_EnumSystemGeoID();
/* this requires collation table patch to make it MS compatible */
if (0) test_sorting();
}
diff -Nru wine1.7-1.7.22/dlls/kernel32/volume.c wine1.7-1.7.24/dlls/kernel32/volume.c
--- wine1.7-1.7.22/dlls/kernel32/volume.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/kernel32/volume.c 2014-08-08 20:19:29.000000000 +0000
@@ -187,6 +187,7 @@
{
HANDLE mgr;
struct mountmgr_unix_drive data;
+ DWORD br;
memset( &data, 0, sizeof(data) );
if (root) data.letter = root[0];
@@ -203,7 +204,7 @@
if (mgr == INVALID_HANDLE_VALUE) return DRIVE_UNKNOWN;
if (!DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE, &data, sizeof(data), &data,
- sizeof(data), NULL, NULL ) && GetLastError() != ERROR_MORE_DATA)
+ sizeof(data), &br, NULL ) && GetLastError() != ERROR_MORE_DATA)
data.type = DRIVE_UNKNOWN;
CloseHandle( mgr );
@@ -1044,6 +1045,7 @@
NTSTATUS status;
HANDLE mgr = INVALID_HANDLE_VALUE;
BOOL ret = FALSE;
+ DWORD br;
TRACE("(%s, %p, %x)\n", debugstr_w(path), volume, size);
if (path[lstrlenW(path)-1] != '\\')
@@ -1110,7 +1112,7 @@
/* now get the true volume name from the mountmgr */
if (!DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_POINTS, input, i_size,
- output, o_size, NULL, NULL ))
+ output, o_size, &br, NULL ))
goto err_ret;
/* Verify and return the data, note string is not null terminated */
@@ -1869,6 +1871,7 @@
{
MOUNTMGR_MOUNT_POINTS *output;
DWORD outsize = 1024;
+ DWORD br;
for (;;)
{
@@ -1877,7 +1880,7 @@
SetLastError( ERROR_NOT_ENOUGH_MEMORY );
return NULL;
}
- if (DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_POINTS, input, insize, output, outsize, NULL, NULL )) break;
+ if (DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_POINTS, input, insize, output, outsize, &br, NULL )) break;
outsize = output->Size;
HeapFree( GetProcessHeap(), 0, output );
if (GetLastError() != ERROR_MORE_DATA) return NULL;
@@ -2024,6 +2027,7 @@
HANDLE WINAPI FindFirstVolumeW( LPWSTR volume, DWORD len )
{
DWORD size = 1024;
+ DWORD br;
HANDLE mgr = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, 0, FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0, 0 );
if (mgr == INVALID_HANDLE_VALUE) return INVALID_HANDLE_VALUE;
@@ -2041,7 +2045,7 @@
memset( &input, 0, sizeof(input) );
if (!DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_POINTS, &input, sizeof(input),
- output, size, NULL, NULL ))
+ output, size, &br, NULL ))
{
if (GetLastError() != ERROR_MORE_DATA) break;
size = output->Size;
diff -Nru wine1.7-1.7.22/dlls/mpr/wnet.c wine1.7-1.7.24/dlls/mpr/wnet.c
--- wine1.7-1.7.22/dlls/mpr/wnet.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mpr/wnet.c 2014-08-08 20:19:29.000000000 +0000
@@ -1763,6 +1763,7 @@
struct mountmgr_unix_drive *data = (struct mountmgr_unix_drive *)buffer;
HANDLE mgr;
DWORD ret = WN_NOT_CONNECTED;
+ DWORD bytes_returned;
if ((mgr = CreateFileW( MOUNTMGR_DOS_DEVICE_NAME, GENERIC_READ|GENERIC_WRITE,
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
@@ -1774,7 +1775,7 @@
memset( data, 0, sizeof(*data) );
data->letter = letter;
if (DeviceIoControl( mgr, IOCTL_MOUNTMGR_QUERY_UNIX_DRIVE, data, sizeof(*data),
- data, sizeof(buffer), NULL, NULL ))
+ data, sizeof(buffer), &bytes_returned, NULL ))
{
char *p, *mount_point = buffer + data->mount_point_offset;
DWORD len;
diff -Nru wine1.7-1.7.22/dlls/mscoree/metahost.c wine1.7-1.7.24/dlls/mscoree/metahost.c
--- wine1.7-1.7.22/dlls/mscoree/metahost.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mscoree/metahost.c 2014-08-08 20:19:29.000000000 +0000
@@ -981,14 +981,12 @@
return FALSE;
}
-HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface,
- LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
+static HRESULT get_runtime(LPCWSTR pwzVersion, BOOL allow_short,
+ REFIID iid, LPVOID *ppRuntime)
{
int i;
DWORD major, minor, build;
- TRACE("%s %s %p\n", debugstr_w(pwzVersion), debugstr_guid(iid), ppRuntime);
-
if (!pwzVersion)
return E_POINTER;
@@ -1003,7 +1001,7 @@
for (i=0; i= 4 && build == 0)))
{
if (runtimes[i].found)
return ICLRRuntimeInfo_QueryInterface(&runtimes[i].ICLRRuntimeInfo_iface, iid,
@@ -1020,6 +1018,14 @@
return CLR_E_SHIM_RUNTIME;
}
+HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface,
+ LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
+{
+ TRACE("%s %s %p\n", debugstr_w(pwzVersion), debugstr_guid(iid), ppRuntime);
+
+ return get_runtime(pwzVersion, FALSE, iid, ppRuntime);
+}
+
HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost* iface,
LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer)
{
@@ -1389,7 +1395,7 @@
supported_runtime *entry;
LIST_FOR_EACH_ENTRY(entry, &parsed_config.supported_runtimes, supported_runtime, entry)
{
- hr = CLRMetaHost_GetRuntime(0, entry->version, &IID_ICLRRuntimeInfo, (void**)result);
+ hr = get_runtime(entry->version, TRUE, &IID_ICLRRuntimeInfo, (void**)result);
if (SUCCEEDED(hr))
{
found = TRUE;
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlanchor.c wine1.7-1.7.24/dlls/mshtml/htmlanchor.c
--- wine1.7-1.7.22/dlls/mshtml/htmlanchor.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlanchor.c 2014-08-08 20:19:29.000000000 +0000
@@ -98,8 +98,9 @@
if(!strcmpiW(target, _parentW)) {
if(!window->parent) {
- WARN("Window has no parent\n");
- return NULL;
+ WARN("Window has no parent, treat as self\n");
+ IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface);
+ return window;
}
IHTMLWindow2_AddRef(&window->parent->base.IHTMLWindow2_iface);
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlelem.c wine1.7-1.7.24/dlls/mshtml/htmlelem.c
--- wine1.7-1.7.22/dlls/mshtml/htmlelem.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlelem.c 2014-08-08 20:19:29.000000000 +0000
@@ -175,11 +175,12 @@
return NS_OK;
}
-HRESULT elem_string_attr_getter(HTMLElement *elem, const WCHAR *name, BSTR *p)
+HRESULT elem_string_attr_getter(HTMLElement *elem, const WCHAR *name, BOOL use_null, BSTR *p)
{
const PRUnichar *val;
nsAString val_str;
nsresult nsres;
+ HRESULT hres = S_OK;
nsres = get_elem_attr_value(elem->nselem, name, &val_str, &val);
if(NS_FAILED(nsres))
@@ -187,9 +188,34 @@
TRACE("%s: returning %s\n", debugstr_w(name), debugstr_w(val));
- *p = SysAllocString(val);
+ if(*val || !use_null) {
+ *p = SysAllocString(val);
+ if(!*p)
+ hres = E_OUTOFMEMORY;
+ }else {
+ *p = NULL;
+ }
nsAString_Finish(&val_str);
- return *p ? S_OK : E_OUTOFMEMORY;
+ return hres;
+}
+
+HRESULT elem_string_attr_setter(HTMLElement *elem, const WCHAR *name, const WCHAR *value)
+{
+ nsAString name_str, val_str;
+ nsresult nsres;
+
+ nsAString_InitDepend(&name_str, name);
+ nsAString_InitDepend(&val_str, value);
+ nsres = nsIDOMHTMLElement_SetAttribute(elem->nselem, &name_str, &val_str);
+ nsAString_Finish(&name_str);
+ nsAString_Finish(&val_str);
+
+ if(NS_FAILED(nsres)) {
+ WARN("SetAttribute failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
typedef struct
@@ -825,8 +851,31 @@
static HRESULT WINAPI HTMLElement_scrollIntoView(IHTMLElement *iface, VARIANT varargStart)
{
HTMLElement *This = impl_from_IHTMLElement(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_variant(&varargStart));
- return E_NOTIMPL;
+ cpp_bool start = TRUE;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_variant(&varargStart));
+
+ switch(V_VT(&varargStart)) {
+ case VT_EMPTY:
+ case VT_ERROR:
+ break;
+ case VT_BOOL:
+ start = V_BOOL(&varargStart) != VARIANT_FALSE;
+ break;
+ default:
+ FIXME("Unsupported argument %s\n", debugstr_variant(&varargStart));
+ }
+
+ if(!This->nselem) {
+ FIXME("Unsupported for comments\n");
+ return E_NOTIMPL;
+ }
+
+ nsres = nsIDOMHTMLElement_ScrollIntoView(This->nselem, start, 1);
+ assert(nsres == NS_OK);
+
+ return S_OK;
}
static HRESULT WINAPI HTMLElement_contains(IHTMLElement *iface, IHTMLElement *pChild,
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlform.c wine1.7-1.7.24/dlls/mshtml/htmlform.c
--- wine1.7-1.7.22/dlls/mshtml/htmlform.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlform.c 2014-08-08 20:19:29.000000000 +0000
@@ -286,15 +286,36 @@
static HRESULT WINAPI HTMLFormElement_put_target(IHTMLFormElement *iface, BSTR v)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->(%s)\n", This, wine_dbgstr_w(v));
- return E_NOTIMPL;
+ nsAString str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, wine_dbgstr_w(v));
+
+ nsAString_InitDepend(&str, v);
+
+ nsres = nsIDOMHTMLFormElement_SetTarget(This->nsform, &str);
+
+ nsAString_Finish(&str);
+ if (NS_FAILED(nsres)) {
+ ERR("Set Target(%s) failed: %08x\n", wine_dbgstr_w(v), nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI HTMLFormElement_get_target(IHTMLFormElement *iface, BSTR *p)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&str, NULL);
+ nsres = nsIDOMHTMLFormElement_GetTarget(This->nsform, &str);
+
+ return return_nsstr(nsres, &str, p);
}
static HRESULT WINAPI HTMLFormElement_put_name(IHTMLFormElement *iface, BSTR v)
@@ -436,8 +457,16 @@
static HRESULT WINAPI HTMLFormElement_reset(IHTMLFormElement *iface)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->()\n", This);
- return E_NOTIMPL;
+ nsresult nsres;
+
+ TRACE("(%p)->()\n", This);
+ nsres = nsIDOMHTMLFormElement_Reset(This->nsform);
+ if (NS_FAILED(nsres)) {
+ ERR("Reset failed: %08x\n", nsres);
+ return E_FAIL;
+ }
+
+ return S_OK;
}
static HRESULT WINAPI HTMLFormElement_put_length(IHTMLFormElement *iface, LONG v)
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlinput.c wine1.7-1.7.24/dlls/mshtml/htmlinput.c
--- wine1.7-1.7.22/dlls/mshtml/htmlinput.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlinput.c 2014-08-08 20:19:29.000000000 +0000
@@ -1337,7 +1337,7 @@
TRACE("(%p)->(%p)\n", This, p);
- return elem_string_attr_getter(&This->element, forW, p);
+ return elem_string_attr_getter(&This->element, forW, FALSE, p);
}
static HRESULT WINAPI HTMLLabelElement_put_accessKey(IHTMLLabelElement *iface, BSTR v)
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlmeta.c wine1.7-1.7.24/dlls/mshtml/htmlmeta.c
--- wine1.7-1.7.22/dlls/mshtml/htmlmeta.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlmeta.c 2014-08-08 20:19:29.000000000 +0000
@@ -108,7 +108,7 @@
TRACE("(%p)->(%p)\n", This, p);
- return elem_string_attr_getter(&This->element, httpEquivW, p);
+ return elem_string_attr_getter(&This->element, httpEquivW, TRUE, p);
}
static HRESULT WINAPI HTMLMetaElement_put_content(IHTMLMetaElement *iface, BSTR v)
@@ -125,7 +125,7 @@
TRACE("(%p)->(%p)\n", This, p);
- return elem_string_attr_getter(&This->element, contentW, p);
+ return elem_string_attr_getter(&This->element, contentW, TRUE, p);
}
static HRESULT WINAPI HTMLMetaElement_put_name(IHTMLMetaElement *iface, BSTR v)
@@ -142,7 +142,7 @@
TRACE("(%p)->(%p)\n", This, p);
- return elem_string_attr_getter(&This->element, nameW, p);
+ return elem_string_attr_getter(&This->element, nameW, TRUE, p);
}
static HRESULT WINAPI HTMLMetaElement_put_url(IHTMLMetaElement *iface, BSTR v)
@@ -159,18 +159,24 @@
return E_NOTIMPL;
}
+static const WCHAR charsetW[] = {'c','h','a','r','s','e','t',0};
+
static HRESULT WINAPI HTMLMetaElement_put_charset(IHTMLMetaElement *iface, BSTR v)
{
HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ return elem_string_attr_setter(&This->element, charsetW, v);
}
static HRESULT WINAPI HTMLMetaElement_get_charset(IHTMLMetaElement *iface, BSTR *p)
{
HTMLMetaElement *This = impl_from_IHTMLMetaElement(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return elem_string_attr_getter(&This->element, charsetW, TRUE, p);
}
static const IHTMLMetaElementVtbl HTMLMetaElementVtbl = {
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlstyle.c wine1.7-1.7.24/dlls/mshtml/htmlstyle.c
--- wine1.7-1.7.22/dlls/mshtml/htmlstyle.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlstyle.c 2014-08-08 20:19:29.000000000 +0000
@@ -172,6 +172,8 @@
{'t','e','x','t','-','d','e','c','o','r','a','t','i','o','n',0};
static const WCHAR attrTextIndent[] =
{'t','e','x','t','-','i','n','d','e','n','t',0};
+static const WCHAR attrTextTransform[] =
+ {'t','e','x','t','-','t','r','a','n','s','f','o','r','m',0};
static const WCHAR attrTop[] =
{'t','o','p',0};
static const WCHAR attrVerticalAlign[] =
@@ -266,6 +268,7 @@
{attrTextAlign, DISPID_IHTMLSTYLE_TEXTALIGN},
{attrTextDecoration, DISPID_IHTMLSTYLE_TEXTDECORATION},
{attrTextIndent, DISPID_IHTMLSTYLE_TEXTINDENT},
+ {attrTextTransform, DISPID_IHTMLSTYLE_TEXTTRANSFORM},
{attrTop, DISPID_IHTMLSTYLE_TOP},
{attrVerticalAlign, DISPID_IHTMLSTYLE_VERTICALALIGN},
{attrVisibility, DISPID_IHTMLSTYLE_VISIBILITY},
@@ -1450,15 +1453,19 @@
static HRESULT WINAPI HTMLStyle_put_textTransform(IHTMLStyle *iface, BSTR v)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ return set_style_attr(This, STYLEID_TEXT_TRANSFORM, v, 0);
}
static HRESULT WINAPI HTMLStyle_get_textTransform(IHTMLStyle *iface, BSTR *p)
{
HTMLStyle *This = impl_from_IHTMLStyle(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_style_attr(This, STYLEID_TEXT_TRANSFORM, p);
}
static HRESULT WINAPI HTMLStyle_put_textAlign(IHTMLStyle *iface, BSTR v)
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlstyle.h wine1.7-1.7.24/dlls/mshtml/htmlstyle.h
--- wine1.7-1.7.22/dlls/mshtml/htmlstyle.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlstyle.h 2014-08-08 20:19:29.000000000 +0000
@@ -101,6 +101,7 @@
STYLEID_TEXT_ALIGN,
STYLEID_TEXT_DECORATION,
STYLEID_TEXT_INDENT,
+ STYLEID_TEXT_TRANSFORM,
STYLEID_TOP,
STYLEID_VERTICAL_ALIGN,
STYLEID_VISIBILITY,
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmltable.c wine1.7-1.7.24/dlls/mshtml/htmltable.c
--- wine1.7-1.7.22/dlls/mshtml/htmltable.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmltable.c 2014-08-08 20:19:29.000000000 +0000
@@ -869,15 +869,35 @@
static HRESULT WINAPI HTMLTable3_put_summary(IHTMLTable3 *iface, BSTR v)
{
HTMLTable *This = impl_from_IHTMLTable3(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(v));
- return E_NOTIMPL;
+ nsAString str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(v));
+
+ nsAString_InitDepend(&str, v);
+
+ nsres = nsIDOMHTMLTableElement_SetSummary(This->nstable, &str);
+
+ nsAString_Finish(&str);
+ if (NS_FAILED(nsres)) {
+ ERR("Set summary(%s) failed: %08x\n", debugstr_w(v), nsres);
+ return E_FAIL;
+ }
+ return S_OK;
}
static HRESULT WINAPI HTMLTable3_get_summary(IHTMLTable3 *iface, BSTR * p)
{
HTMLTable *This = impl_from_IHTMLTable3(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+ nsAString str;
+ nsresult nsres;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ nsAString_Init(&str, NULL);
+ nsres = nsIDOMHTMLTableElement_GetSummary(This->nstable, &str);
+
+ return return_nsstr(nsres, &str, p);
}
static const IHTMLTable3Vtbl HTMLTable3Vtbl = {
@@ -914,10 +934,10 @@
*ppv = &This->IHTMLTable_iface;
}else if(IsEqualGUID(&IID_IHTMLTable2, riid)) {
TRACE("(%p)->(IID_IHTMLTable2 %p)\n", This, ppv);
- *ppv = &This->IHTMLTable_iface;
+ *ppv = &This->IHTMLTable2_iface;
}else if(IsEqualGUID(&IID_IHTMLTable3, riid)) {
TRACE("(%p)->(IID_IHTMLTable3 %p)\n", This, ppv);
- *ppv = &This->IHTMLTable_iface;
+ *ppv = &This->IHTMLTable3_iface;
}
if(*ppv) {
@@ -946,6 +966,8 @@
static const tid_t HTMLTable_iface_tids[] = {
HTMLELEMENT_TIDS,
IHTMLTable_tid,
+ IHTMLTable2_tid,
+ IHTMLTable3_tid,
0
};
@@ -967,6 +989,8 @@
ret->element.node.vtbl = &HTMLTableImplVtbl;
ret->IHTMLTable_iface.lpVtbl = &HTMLTableVtbl;
+ ret->IHTMLTable2_iface.lpVtbl = &HTMLTable2Vtbl;
+ ret->IHTMLTable3_iface.lpVtbl = &HTMLTable3Vtbl;
HTMLElement_Init(&ret->element, doc, nselem, &HTMLTable_dispex);
diff -Nru wine1.7-1.7.22/dlls/mshtml/htmlwindow.c wine1.7-1.7.24/dlls/mshtml/htmlwindow.c
--- wine1.7-1.7.22/dlls/mshtml/htmlwindow.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/htmlwindow.c 2014-08-08 20:19:29.000000000 +0000
@@ -1010,8 +1010,10 @@
static HRESULT WINAPI HTMLWindow2_navigate(IHTMLWindow2 *iface, BSTR url)
{
HTMLWindow *This = impl_from_IHTMLWindow2(iface);
- FIXME("(%p)->(%s)\n", This, debugstr_w(url));
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_w(url));
+
+ return navigate_url(This->outer_window, url, This->outer_window->uri, BINDING_NAVIGATED);
}
static HRESULT WINAPI HTMLWindow2_put_onfocus(IHTMLWindow2 *iface, VARIANT v)
diff -Nru wine1.7-1.7.22/dlls/mshtml/main.c wine1.7-1.7.24/dlls/mshtml/main.c
--- wine1.7-1.7.22/dlls/mshtml/main.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/main.c 2014-08-08 20:19:29.000000000 +0000
@@ -501,37 +501,6 @@
return hres;
}
-const char *debugstr_variant(const VARIANT *v)
-{
- if(!v)
- return "(null)";
-
- switch(V_VT(v)) {
- case VT_EMPTY:
- return "{VT_EMPTY}";
- case VT_NULL:
- return "{VT_NULL}";
- case VT_I2:
- return wine_dbg_sprintf("{VT_I2: %d}", V_I2(v));
- case VT_I4:
- return wine_dbg_sprintf("{VT_I4: %d}", V_I4(v));
- case VT_R8:
- return wine_dbg_sprintf("{VT_R8: %lf}", V_R8(v));
- case VT_BSTR:
- return wine_dbg_sprintf("{VT_BSTR: %s}", debugstr_w(V_BSTR(v)));
- case VT_DISPATCH:
- return wine_dbg_sprintf("{VT_DISPATCH: %p}", V_DISPATCH(v));
- case VT_ERROR:
- return wine_dbg_sprintf("{VT_ERROR: %08x}", V_ERROR(v));
- case VT_BOOL:
- return wine_dbg_sprintf("{VT_BOOL: %x}", V_BOOL(v));
- case VT_UINT:
- return wine_dbg_sprintf("{VT_UINT: %u}", V_UINT(v));
- default:
- return wine_dbg_sprintf("{vt %d}", V_VT(v));
- }
-}
-
const char *debugstr_mshtml_guid(const GUID *iid)
{
#define X(x) if(IsEqualGUID(iid, &x)) return #x
diff -Nru wine1.7-1.7.22/dlls/mshtml/mshtml_private.h wine1.7-1.7.24/dlls/mshtml/mshtml_private.h
--- wine1.7-1.7.22/dlls/mshtml/mshtml_private.h 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/mshtml_private.h 2014-08-08 20:19:29.000000000 +0000
@@ -959,7 +959,8 @@
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,nsIDOMHTMLCollection*) DECLSPEC_HIDDEN;
nsresult get_elem_attr_value(nsIDOMHTMLElement*,const WCHAR*,nsAString*,const PRUnichar**) DECLSPEC_HIDDEN;
-HRESULT elem_string_attr_getter(HTMLElement*,const WCHAR*,BSTR*) DECLSPEC_HIDDEN;
+HRESULT elem_string_attr_getter(HTMLElement*,const WCHAR*,BOOL,BSTR*) DECLSPEC_HIDDEN;
+HRESULT elem_string_attr_setter(HTMLElement*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN;
/* commands */
typedef struct {
@@ -1027,7 +1028,6 @@
HRESULT set_task_timer(HTMLInnerWindow*,DWORD,BOOL,IDispatch*,LONG*) DECLSPEC_HIDDEN;
HRESULT clear_task_timer(HTMLInnerWindow*,BOOL,DWORD) DECLSPEC_HIDDEN;
-const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
const char *debugstr_mshtml_guid(const GUID*) DECLSPEC_HIDDEN;
DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
diff -Nru wine1.7-1.7.22/dlls/mshtml/nsembed.c wine1.7-1.7.24/dlls/mshtml/nsembed.c
--- wine1.7-1.7.22/dlls/mshtml/nsembed.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/nsembed.c 2014-08-08 20:19:29.000000000 +0000
@@ -438,8 +438,10 @@
static void set_environment(LPCWSTR gre_path)
{
- WCHAR path_env[MAX_PATH], buf[20];
- int len, debug_level = 0;
+ size_t len, gre_path_len;
+ int debug_level = 0;
+ WCHAR *path, buf[20];
+ const WCHAR *ptr;
static const WCHAR pathW[] = {'P','A','T','H',0};
static const WCHAR warnW[] = {'w','a','r','n',0};
@@ -449,13 +451,6 @@
{'N','S','P','R','_','L','O','G','_','M','O','D','U','L','E','S',0};
static const WCHAR debug_formatW[] = {'a','l','l',':','%','d',0};
- /* We have to modify PATH as XPCOM loads other DLLs from this directory. */
- GetEnvironmentVariableW(pathW, path_env, sizeof(path_env)/sizeof(WCHAR));
- len = strlenW(path_env);
- path_env[len++] = ';';
- strcpyW(path_env+len, gre_path);
- SetEnvironmentVariableW(pathW, path_env);
-
SetEnvironmentVariableW(xpcom_debug_breakW, warnW);
if(TRACE_ON(gecko))
@@ -467,6 +462,23 @@
sprintfW(buf, debug_formatW, debug_level);
SetEnvironmentVariableW(nspr_log_modulesW, buf);
+
+ len = GetEnvironmentVariableW(pathW, NULL, 0);
+ gre_path_len = strlenW(gre_path);
+ path = heap_alloc((len+gre_path_len+1)*sizeof(WCHAR));
+ if(!path)
+ return;
+ GetEnvironmentVariableW(pathW, path, len);
+
+ /* We have to modify PATH as xul.dll loads other DLLs from this directory. */
+ if(!(ptr = strstrW(path, gre_path))
+ || (ptr > path && *(ptr-1) != ';')
+ || (ptr[gre_path_len] && ptr[gre_path_len] != ';')) {
+ if(len)
+ path[len-1] = ';';
+ strcpyW(path+len, gre_path);
+ SetEnvironmentVariableW(pathW, path);
+ }
}
static BOOL load_xul(const PRUnichar *gre_path)
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/dom.c wine1.7-1.7.24/dlls/mshtml/tests/dom.c
--- wine1.7-1.7.22/dlls/mshtml/tests/dom.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/dom.c 2014-08-08 20:19:29.000000000 +0000
@@ -3764,6 +3764,38 @@
IHTMLFormElement_Release(form);
}
+#define test_form_reset(a) _test_form_reset(__LINE__,a)
+static void _test_form_reset(unsigned line, IUnknown *unk)
+{
+ IHTMLFormElement *form = _get_form_iface(line, unk);
+ HRESULT hres;
+
+ hres = IHTMLFormElement_reset(form);
+ ok_(__FILE__,line)(hres == S_OK, "reset failed: %08x\n", hres);
+
+ IHTMLFormElement_Release(form);
+}
+
+static void test_form_target(IUnknown *unk)
+{
+ IHTMLFormElement *form = get_form_iface(unk);
+ HRESULT hres;
+ BSTR str;
+ static const char target[] = "_blank";
+
+ str = a2bstr(target);
+ hres = IHTMLFormElement_put_target(form, str);
+ ok(hres == S_OK, "put_target(%s) failed: %08x\n", target, hres);
+ SysFreeString(str);
+
+ hres = IHTMLFormElement_get_target(form, &str);
+ ok(hres == S_OK, "get_target failed: %08x\n", hres);
+ ok(!strcmp_wa(str, target), "Expected %s, got %s\n", target, wine_dbgstr_w(str));
+ SysFreeString(str);
+
+ IHTMLFormElement_Release(form);
+}
+
#define test_meta_name(a,b) _test_meta_name(__LINE__,a,b)
static void _test_meta_name(unsigned line, IUnknown *unk, const char *exname)
{
@@ -3771,7 +3803,6 @@
BSTR name = NULL;
HRESULT hres;
-
meta = _get_metaelem_iface(line, unk);
hres = IHTMLMetaElement_get_name(meta, &name);
ok_(__FILE__,line)(hres == S_OK, "get_name failed: %08x\n", hres);
@@ -3787,7 +3818,6 @@
BSTR content = NULL;
HRESULT hres;
-
meta = _get_metaelem_iface(line, unk);
hres = IHTMLMetaElement_get_content(meta, &content);
ok_(__FILE__,line)(hres == S_OK, "get_content failed: %08x\n", hres);
@@ -3803,7 +3833,6 @@
BSTR val = NULL;
HRESULT hres;
-
meta = _get_metaelem_iface(line, unk);
hres = IHTMLMetaElement_get_httpEquiv(meta, &val);
ok_(__FILE__,line)(hres == S_OK, "get_httpEquiv failed: %08x\n", hres);
@@ -3812,6 +3841,40 @@
IHTMLMetaElement_Release(meta);
}
+#define test_meta_charset(a,b) _test_meta_charset(__LINE__,a,b)
+static void _test_meta_charset(unsigned line, IUnknown *unk, const char *exval)
+{
+ IHTMLMetaElement *meta;
+ BSTR val = NULL;
+ HRESULT hres;
+
+ meta = _get_metaelem_iface(line, unk);
+ hres = IHTMLMetaElement_get_charset(meta, &val);
+ ok_(__FILE__,line)(hres == S_OK, "get_charset failed: %08x\n", hres);
+ if(exval)
+ ok_(__FILE__,line)(!strcmp_wa(val, exval), "charset = %s, expected %s\n", wine_dbgstr_w(val), exval);
+ else
+ ok_(__FILE__,line)(!val, "charset = %s, expected NULL\n", wine_dbgstr_w(val));
+ SysFreeString(val);
+ IHTMLMetaElement_Release(meta);
+}
+
+#define set_meta_charset(a,b) _set_meta_charset(__LINE__,a,b)
+static void _set_meta_charset(unsigned line, IUnknown *unk, const char *vala)
+{
+ BSTR val = a2bstr(vala);
+ IHTMLMetaElement *meta;
+ HRESULT hres;
+
+ meta = _get_metaelem_iface(line, unk);
+ hres = IHTMLMetaElement_put_charset(meta, val);
+ ok_(__FILE__,line)(hres == S_OK, "put_charset failed: %08x\n", hres);
+ SysFreeString(val);
+ IHTMLMetaElement_Release(meta);
+
+ _test_meta_charset(line, unk, vala);
+}
+
#define test_link_media(a,b) _test_link_media(__LINE__,a,b)
static void _test_link_media(unsigned line, IHTMLElement *elem, const char *exval)
{
@@ -5930,6 +5993,7 @@
{
IHTMLElementCollection *col;
IHTMLTable *table;
+ IHTMLTable3 *table3;
IHTMLDOMNode *node;
VARIANT v;
HRESULT hres;
@@ -5945,6 +6009,11 @@
if(FAILED(hres))
return;
+ hres = IHTMLElement_QueryInterface(elem, &IID_IHTMLTable3, (void**)&table3);
+ ok(hres == S_OK, "Could not get IHTMLTable3 iface: %08x\n", hres);
+ if(FAILED(hres))
+ return;
+
col = NULL;
hres = IHTMLTable_get_rows(table, &col);
ok(hres == S_OK, "get_rows failed: %08x\n", hres);
@@ -6082,6 +6151,17 @@
ok(!strcmp_wa(V_BSTR(&v), "11"), "Expected 11, got %s\n", wine_dbgstr_w(V_BSTR(&v)));
VariantClear(&v);
+ bstr = a2bstr("summary");
+ hres = IHTMLTable3_put_summary(table3, bstr);
+ ok(hres == S_OK, "put_summary = %08x\n", hres);
+ SysFreeString(bstr);
+
+ hres = IHTMLTable3_get_summary(table3, &bstr);
+ ok(hres == S_OK, "get_summary = %08x\n", hres);
+ ok(!strcmp_wa(bstr, "summary"), "Expected summary, got %s\n", wine_dbgstr_w(bstr));
+ SysFreeString(bstr);
+
+ IHTMLTable3_Release(table3);
IHTMLTable_Release(table);
}
@@ -6920,6 +7000,8 @@
test_meta_name((IUnknown*)elem, "meta name");
test_meta_content((IUnknown*)elem, "text/html; charset=utf-8");
test_meta_httpequiv((IUnknown*)elem, "Content-Type");
+ test_meta_charset((IUnknown*)elem, NULL);
+ set_meta_charset((IUnknown*)elem, "utf-8");
IHTMLElement_Release(elem);
}
@@ -7313,6 +7395,8 @@
test_form_put_encoding((IUnknown*)elem, E_INVALIDARG, "image/png");
test_form_encoding((IUnknown*)elem, "multipart/form-data");
test_form_elements((IUnknown*)elem);
+ test_form_reset((IUnknown*)elem);
+ test_form_target((IUnknown*)elem);
IHTMLElement_Release(elem);
}
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/exectest.html wine1.7-1.7.24/dlls/mshtml/tests/exectest.html
--- wine1.7-1.7.22/dlls/mshtml/tests/exectest.html 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/exectest.html 2014-08-08 20:19:29.000000000 +0000
@@ -55,7 +55,7 @@
testPutSrc();
testPutText();
}catch(e) {
- ok(false, "Got an exception");
+ ok(false, "Got an exception " + e.message);
}
function testPutSrc2() {
@@ -123,7 +123,7 @@
testPutSrc2();
testPutText2();
}catch(e) {
- ok(false, "got an exception");
+ ok(false, "got an exception " + e.message);
}
external.reportSuccess();
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/htmldoc.c wine1.7-1.7.24/dlls/mshtml/tests/htmldoc.c
--- wine1.7-1.7.22/dlls/mshtml/tests/htmldoc.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/htmldoc.c 2014-08-08 20:19:29.000000000 +0000
@@ -978,6 +978,7 @@
case 3000029:
case 3000030:
case 3000031:
+ case 3000032:
/* TODO */
return S_OK;
}
@@ -2855,6 +2856,7 @@
test_readyState(NULL);
return S_OK;
case OLECMDID_UPDATETRAVELENTRY_DATARECOVERY:
+ case OLECMDID_PAGEAVAILABLE:
case 6058:
return E_FAIL; /* FIXME */
default:
@@ -2864,7 +2866,7 @@
}
if(IsEqualGUID(&CGID_ShellDocView, pguidCmdGroup)) {
- if(nCmdID != 63 && (!is_refresh || nCmdID != 37))
+ if(nCmdID != 63 && nCmdID != 178 && (!is_refresh || nCmdID != 37))
test_readyState(NULL);
ok(nCmdexecopt == 0, "nCmdexecopts=%08x\n", nCmdexecopt);
@@ -2976,9 +2978,11 @@
case 83:
case 102:
+ case 133:
case 134: /* TODO */
case 135:
case 136: /* TODO */
+ case 137:
case 139: /* TODO */
case 143: /* TODO */
case 144: /* TODO */
@@ -3293,13 +3297,15 @@
{
static const IID IID_IIETravelLog2 = {0xb67cefd2,0xe3f1,0x478a,{0x9b,0xfa,0xd8,0x93,0x70,0x37,0x5e,0x94}};
static const IID IID_unk_travellog = {0x6afc8b7f,0xbc17,0x4a95,{0x90,0x2f,0x6f,0x5c,0xb5,0x54,0xc3,0xd8}};
+ static const IID IID_unk_travellog2 = {0xf6d02767,0x9c80,0x428d,{0xb9,0x74,0x3f,0x17,0x29,0x45,0x3f,0xdb}};
if(IsEqualGUID(&IID_IUnknown, riid) || IsEqualGUID(&IID_ITravelLog, riid)) {
*ppv = iface;
return S_OK;
}
- if(!IsEqualGUID(&IID_IIETravelLog2, riid) && !IsEqualGUID(&IID_unk_travellog, riid))
+ if(!IsEqualGUID(&IID_IIETravelLog2, riid) && !IsEqualGUID(&IID_unk_travellog, riid)
+ && !IsEqualGUID(&IID_unk_travellog2, riid))
ok(0, "unexpected call %s\n", wine_dbgstr_guid(riid));
*ppv = NULL;
@@ -3433,7 +3439,7 @@
ok(!pDispatch, "pDispatch = %p\n", pDispatch);
ok(!strcmp_wa(lpszUrl, nav_url), "lpszUrl = %s, expected %s\n", wine_dbgstr_w(lpszUrl), nav_url);
- ok(dwFlags == 0x40 || !dwFlags || dwFlags == 0x50, "dwFlags = %x\n", dwFlags);
+ ok(dwFlags == 0x140 /* IE11*/ || dwFlags == 0x40 || !dwFlags || dwFlags == 0x50, "dwFlags = %x\n", dwFlags);
ok(!lpszFrameName, "lpszFrameName = %s\n", wine_dbgstr_w(lpszFrameName));
if(!testing_submit) {
ok(!pPostData, "pPostData = %p\n", pPostData);
@@ -5294,7 +5300,7 @@
switch(load_state) {
case LD_DOLOAD:
case LD_NO:
- if(!nav_url)
+ if(!nav_url && !editmode)
ok(!elem, "elem != NULL\n");
default:
break;
@@ -5746,6 +5752,8 @@
SET_EXPECT(NavigateWithBindCtx);
SET_EXPECT(Exec_Explorer_38); /* todo_wine */
}
+ if(editmode || is_refresh)
+ SET_EXPECT(Exec_ShellDocView_138);
expect_status_text = (LPWSTR)0xdeadbeef; /* TODO */
while(!*b && GetMessageW(&msg, NULL, 0, 0)) {
@@ -5868,6 +5876,8 @@
CHECK_CALLED(NavigateWithBindCtx);
todo_wine CHECK_NOT_CALLED(Exec_Explorer_38);
}
+ if(editmode || is_refresh)
+ CLEAR_CALLED(Exec_ShellDocView_138); /* IE11 */
if(!is_extern)
load_state = LD_COMPLETE;
@@ -5973,7 +5983,7 @@
CHECK_CALLED(TranslateUrl);
if(support_wbapp) {
CHECK_CALLED(FireBeforeNavigate2);
- CHECK_CALLED(Exec_ShellDocView_67);
+ CLEAR_CALLED(Exec_ShellDocView_67); /* Not called by IE11 */
if(!is_hash) {
CHECK_CALLED(Invoke_AMBIENT_SILENT);
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
@@ -6039,7 +6049,7 @@
ok(hres == S_OK, "SuperNavigate failed: %08x\n", hres);
CHECK_CALLED(TranslateUrl);
- CHECK_CALLED(Exec_ShellDocView_67);
+ CLEAR_CALLED(Exec_ShellDocView_67); /* Not called by IE11 */
CHECK_CALLED(Invoke_AMBIENT_SILENT);
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CHECK_CALLED(Exec_ShellDocView_63);
@@ -6110,8 +6120,8 @@
hres = IPersistHistory_LoadHistory(per_hist, history_stream, NULL);
ok(hres == S_OK, "LoadHistory failed: %08x\n", hres);
- CHECK_CALLED_BROKEN(Exec_ShellDocView_138);
- CHECK_CALLED(Exec_ShellDocView_67);
+ CLEAR_CALLED(Exec_ShellDocView_138); /* Not called by IE11 */
+ CLEAR_CALLED(Exec_ShellDocView_67); /* Not called by IE11 */
CHECK_CALLED(FireBeforeNavigate2);
CHECK_CALLED(Invoke_AMBIENT_SILENT);
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
@@ -7834,11 +7844,11 @@
CHECK_CALLED(TranslateUrl);
CHECK_CALLED(FireBeforeNavigate2);
- CHECK_CALLED(Exec_ShellDocView_67);
+ CLEAR_CALLED(Exec_ShellDocView_67); /* Not called by IE11 */
CHECK_CALLED(Invoke_AMBIENT_SILENT);
CHECK_CALLED(Invoke_AMBIENT_OFFLINEIFNOTCONNECTED);
CHECK_CALLED(Exec_ShellDocView_63);
- todo_wine CHECK_CALLED(Exec_ShellDocView_84);
+ CLEAR_CALLED(Exec_ShellDocView_84); /* Not called by IE11 */
CHECK_CALLED(CreateInstance);
CHECK_CALLED(Start);
CHECK_CALLED(Protocol_Read);
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/jstest.html wine1.7-1.7.24/dlls/mshtml/tests/jstest.html
--- wine1.7-1.7.22/dlls/mshtml/tests/jstest.html 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/jstest.html 2014-08-08 20:19:29.000000000 +0000
@@ -248,7 +248,7 @@
try {
runTests();
}catch(e) {
- ok(false, "got exception");
+ ok(false, "got exception " + e.message);
}
external.reportSuccess();
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/nav_test.html wine1.7-1.7.24/dlls/mshtml/tests/nav_test.html
--- wine1.7-1.7.22/dlls/mshtml/tests/nav_test.html 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/nav_test.html 2014-08-08 20:19:29.000000000 +0000
@@ -18,6 +18,7 @@
}
iframe.onload = function() {
+ iframe.onload = null;
var href = iframe.contentWindow.location.href;
ok(/.*blank2.html/.test(href), "Unexpected href " + href);
next_test();
@@ -27,8 +28,24 @@
subframe.src = "blank.html";
}
+function window_navigate_test() {
+ external.trace("Runnint window.navigate() tests...");
+
+ var iframe = document.getElementById("testframe");
+
+ iframe.onload = function() {
+ iframe.onlod = null;
+ var href = iframe.contentWindow.location.href;
+ ok(href === "about:blank", "Unexpected href " + href);
+ next_test();
+ }
+
+ iframe.contentWindow.navigate("about:blank");
+}
+
var tests = [
nav_back_test,
+ window_navigate_test,
function() { external.reportSuccess(); }
];
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/style.c wine1.7-1.7.24/dlls/mshtml/tests/style.c
--- wine1.7-1.7.22/dlls/mshtml/tests/style.c 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/style.c 2014-08-08 20:19:29.000000000 +0000
@@ -1249,6 +1249,22 @@
SysFreeString(str);
str = (void*)0xdeadbeef;
+ hres = IHTMLStyle_get_textTransform(style, &str);
+ ok(hres == S_OK, "get_textTransform failed: %08x\n", hres);
+ ok(!str, "textTransform != NULL\n");
+
+ str = a2bstr("lowercase");
+ hres = IHTMLStyle_put_textTransform(style, str);
+ ok(hres == S_OK, "put_textTransform failed: %08x\n", hres);
+ SysFreeString(str);
+
+ str = NULL;
+ hres = IHTMLStyle_get_textTransform(style, &str);
+ ok(hres == S_OK, "get_textTransform failed: %08x\n", hres);
+ ok(!strcmp_wa(str, "lowercase"), "textTransform = %s\n", wine_dbgstr_w(V_BSTR(&v)));
+ SysFreeString(str);
+
+ str = (void*)0xdeadbeef;
hres = IHTMLStyle_get_filter(style, &str);
ok(hres == S_OK, "get_filter failed: %08x\n", hres);
ok(!str, "filter != NULL\n");
diff -Nru wine1.7-1.7.22/dlls/mshtml/tests/vbtest.html wine1.7-1.7.24/dlls/mshtml/tests/vbtest.html
--- wine1.7-1.7.22/dlls/mshtml/tests/vbtest.html 2014-07-11 18:29:24.000000000 +0000
+++ wine1.7-1.7.24/dlls/mshtml/tests/vbtest.html 2014-08-08 20:19:29.000000000 +0000
@@ -24,7 +24,7 @@
counter++;
incCounter(2);
}catch(e) {
- ok(false, "got an exception");
+ ok(false, "got an exception " + e.message);
}