Commit Graph

182 Commits

Author SHA1 Message Date
Alexandre Julliard 8d12efecc9 dmloader: Check for invalid class in EnableCache().
Fixes a test failure with sone Mingw versions.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-11 21:56:46 +02:00
Michael Stefaniuc 4915c51ea6 dmloader: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-22 10:20:46 +01:00
Alistair Leslie-Hughes 6e986bbd81 dmloader: Release objects on error paths (Coverity).
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 21:26:34 +01:00
Michael Stefaniuc ee639a55e6 dmloader: Simplify tracing of DMUS_CONTAINED_OBJF_KEEP flag.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:52:46 +01:00
Michael Stefaniuc 1ca7f9a36f dmloader: Simplify tracing of the DMUS_CONTAINER_NOLOADS flag.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:52:44 +01:00
Michael Stefaniuc 8320b40077 dmloader: Get rid of single use debugstr_dmreturn().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 09:52:41 +01:00
Michael Stefaniuc dccedd4761 dmloader: Use the debug functions provided by dmobject.[ch].
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 08:32:41 +01:00
Michael Stefaniuc 92749c2694 dmloader: Get rid of the 'dmdump' debug channel.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 08:32:31 +01:00
Michael Stefaniuc 55252b97ca dmloader: Just use dump_DMUS_OBJECTDESC().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 08:32:27 +01:00
Francois Gouget 1ee1f3d6e1 dmloader: Fix the spelling of a TRACE() message and a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 21:06:59 +01:00
Michael Stefaniuc 25370018f2 dmloader: Remove commented out dead code.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 11:09:48 +01:00
Alistair Leslie-Hughes 292d62e3bb dmime: Trace pbMemData/llMemLength on the same line.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:23:02 +01:00
Alistair Leslie-Hughes 4df9039f75 dmloader: Support DMUS_OBJ_MEMORY cache lookups.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 08:22:47 +01:00
Alistair Leslie-Hughes 8388ea840f dmloader: Rewrite IDirectMusicLoader8 ReleaseObject using find_cache_object.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:59 +01:00
Alistair Leslie-Hughes cc67ea6dfa dmloader: Rewrite IDirectMusicLoader8 CacheObject using find_cache_object.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:56 +01:00
Alistair Leslie-Hughes d66b3ae922 dmloader: Rewrite cache object lookup.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 21:31:53 +01:00
Alistair Leslie-Hughes 4aee9ba5ad dmloader: Stop after find first matching object.
This stops a crash in Legoland on startup when finding cached objects.
Placing a break in each of the if's causes the wrong object to be loaded.

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

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-22 22:59:34 +01:00
Alistair Leslie-Hughes 9da70c0758 dmloader: ScanDirectory doesn't specify the full path.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 23:03:21 +01:00
Alexandre Julliard a420853848 dmloader: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 10:29:43 +02:00
Michael Stefaniuc 2fcbe743f5 dmloader: Fix a memory leak.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:04:14 +01:00
Michael Stefaniuc 47e57c58b6 dmloader: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-23 22:25:53 +02:00
Michael Stefaniuc 95a339b609 dmloader: Remove an unused impl_from_ helper.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-14 10:15:59 +02:00
Michael Stefaniuc cb403450eb dmloader: Reimplement ParseDescriptor() for DirectMusicContainer.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 09:16:29 +02:00
Michael Stefaniuc 7028142771 dmusic: Sync up the dmobject.[ch] files.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-16 09:16:19 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Michael Stefaniuc 7b5668a6e7 include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-25 12:09:17 +02:00
Michael Stefaniuc 9e74cdc639 dmloader/tests: Add IDirectMusicObject::ParseDescriptor() tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-06 04:40:55 -06:00
Nikolay Sivov 96fd03b269 dmloader: Use safe list iterator when clearing the cache (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:56 +09:00
Michael Stefaniuc cfb1f130fd dmloader: Remove a now redundant helper function.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:14:00 +02:00
Michael Stefaniuc 4a70f67ffc dmloader: Get rid of two gratuitous typedefs.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:43 +02:00
Michael Stefaniuc ad0dbe3e02 dmloader: Don't leak memory in the cache.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:39 +02:00
Michael Stefaniuc 3531e50c93 dmloader: Simplify the cache list handling.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:36 +02:00
Michael Stefaniuc c2aa725356 dmloader: Remove some commented out debugging code.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:31 +02:00
Michael Stefaniuc fd4cdf5df4 dmloader: Simplify the search path handling.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:27 +02:00
Michael Stefaniuc a8900c9bbb dmloader: Move struct definitions to the files they are used in.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:22 +02:00
Michael Stefaniuc 8b98126666 dmloader: Use a bitfield to store the per class cache enable info.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:07:13 +02:00
Michael Stefaniuc 693b40f7dc dmloader/tests: Add some EnableCache() tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:03:30 +02:00
Michael Stefaniuc d60aead138 dmloader/tests: Add more SetSearchDirectory() tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:03:27 +02:00
Michael Stefaniuc 2e3a8a6fb8 dmloader: Handle NULL and empty path strings in SetSearchDirectory().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 21:03:21 +02:00
Michael Stefaniuc f42d14fdd0 dmloader/tests: NUL terminate a wide string.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 10:36:36 +02:00
Michael Stefaniuc 0f202ac84b dmloader: Initialize a stack variable to avoid erratic test behavior.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 10:36:32 +02:00
Michael Stefaniuc ae600c0b2c dmloader/tests: Add some IDirectMusicLoader directory tests.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:20 +02:00
Michael Stefaniuc a69dbd41be dmloader: Return an error for an invalid directory.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:18 +02:00
Michael Stefaniuc 879c428200 dmloader: Cleanup IDirectMusicLoaderImpl_SetSearchDirectory().
and emit a FIXME only if the clear flag is set.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:15 +02:00
Michael Stefaniuc ed6ee0f815 dmloader: Avoid a crash on a NULL string pointer.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-27 22:23:11 +02:00
Nikolay Sivov f0fb2f16ca dmusic/tests: Use void* instead of void** type value for outer argument.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-24 20:30:30 +02:00
Fabian Maurer ca0f6c0d51 dmloader: Better error reporting in IDirectMusicLoaderImpl_SetObject.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-21 20:57:06 +01:00
Michael Stefaniuc 149859b002 dmloader: Remove superfluous "IDirectMusicContainer" from method names. 2015-04-28 15:35:38 +09:00
Michael Stefaniuc 8c6c7f6b49 dmloader: Add and use a generic IPersistStream_GetClassID. 2015-04-28 15:35:23 +09:00
Michael Stefaniuc d9e0c9fb82 dmloader/tests: Add more DirectMusicCollection tests. 2015-04-28 15:35:16 +09:00