diff -Nru wine-compholio-1.7.10~daily/Make.vars.in wine-compholio-1.7.10~daily/Make.vars.in --- wine-compholio-1.7.10~daily/Make.vars.in 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/Make.vars.in 2014-01-11 03:17:37.000000000 +0000 @@ -50,9 +50,6 @@ LINGUAS = @LINGUAS@ ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo) PORCFLAGS = @PORCFLAGS@ -BUILDIMAGE = $(top_srcdir)/tools/buildimage -C2MAN = $(top_srcdir)/tools/c2man.pl -RUNTEST = $(top_srcdir)/tools/runtest RUNTESTFLAGS = -q -P wine MAKECTESTS = $(TOOLSDIR)/tools/make_ctests$(TOOLSEXT) MAKEXFTMPL = $(TOOLSDIR)/tools/make_xftmpl$(TOOLSEXT) diff -Nru wine-compholio-1.7.10~daily/debian/bzr-builder.manifest wine-compholio-1.7.10~daily/debian/bzr-builder.manifest --- wine-compholio-1.7.10~daily/debian/bzr-builder.manifest 2014-01-10 03:50:00.000000000 +0000 +++ wine-compholio-1.7.10~daily/debian/bzr-builder.manifest 2014-01-11 03:53:35.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debversion}~daily-201401100317 -lp:wine revid:git-v1:ebccff822576cbff2b4401c74d83912d637a7026 +# bzr-builder format 0.3 deb-version {debversion}~daily-201401110317 +lp:wine revid:git-v1:8953c74e349928a5c81d3cea9ffe264c81c3ab65 merge compholio-daily-package lp:wine-compholio revid:git-v1:f7de52878808e185f49106fb978ade25bc7cc758 diff -Nru wine-compholio-1.7.10~daily/debian/changelog wine-compholio-1.7.10~daily/debian/changelog --- wine-compholio-1.7.10~daily/debian/changelog 2014-01-10 03:50:00.000000000 +0000 +++ wine-compholio-1.7.10~daily/debian/changelog 2014-01-11 03:53:35.000000000 +0000 @@ -1,8 +1,8 @@ -wine-compholio (1.7.10~daily-201401100317~ubuntu13.04.1) raring; urgency=low +wine-compholio (1.7.10~daily-201401110317~ubuntu13.04.1) raring; urgency=low * Auto build. - -- Launchpad Package Builder Fri, 10 Jan 2014 03:50:00 +0000 + -- Launchpad Package Builder Sat, 11 Jan 2014 03:53:35 +0000 wine-compholio (1.7.10) unstable; urgency=low * Removed monitor enumeration patch included in upstream Wine 1.7.10. diff -Nru wine-compholio-1.7.10~daily/dlls/advapi32/cred.c wine-compholio-1.7.10~daily/dlls/advapi32/cred.c --- wine-compholio-1.7.10~daily/dlls/advapi32/cred.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/advapi32/cred.c 2014-01-11 03:17:37.000000000 +0000 @@ -580,8 +580,6 @@ ERR("SecKeychainAddInternetPassword returned %ld\n", status); if (status == errSecDuplicateItem) { - SecKeychainItemRef keychain_item; - status = SecKeychainFindInternetPassword(NULL, strlen(servername), servername, domain ? strlen(domain) : 0, domain, strlen(username), username, diff -Nru wine-compholio-1.7.10~daily/dlls/advapi32/crypt.c wine-compholio-1.7.10~daily/dlls/advapi32/crypt.c --- wine-compholio-1.7.10~daily/dlls/advapi32/crypt.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/advapi32/crypt.c 2014-01-11 03:17:37.000000000 +0000 @@ -2172,7 +2172,7 @@ SetLastError(ERROR_INVALID_PARAMETER); return FALSE; } - if (dwFlags & PP_USE_HARDWARE_RNG) + if (dwParam == PP_USE_HARDWARE_RNG) { FIXME("PP_USE_HARDWARE_RNG: What do I do with this?\n"); FIXME("\tLetting the CSP decide.\n"); diff -Nru wine-compholio-1.7.10~daily/dlls/advapi32/tests/security.c wine-compholio-1.7.10~daily/dlls/advapi32/tests/security.c --- wine-compholio-1.7.10~daily/dlls/advapi32/tests/security.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/advapi32/tests/security.c 2014-01-11 03:17:37.000000000 +0000 @@ -35,8 +35,13 @@ #include "wine/test.h" +#ifndef PROCESS_QUERY_LIMITED_INFORMATION +#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000 +#endif + /* PROCESS_ALL_ACCESS in Vista+ PSDKs is incompatible with older Windows versions */ #define PROCESS_ALL_ACCESS_NT4 (PROCESS_ALL_ACCESS & ~0xf000) +#define PROCESS_ALL_ACCESS_VISTA (PROCESS_ALL_ACCESS | 0xf000) #ifndef EVENT_QUERY_STATE #define EVENT_QUERY_STATE 0x0001 @@ -46,6 +51,14 @@ #define SEMAPHORE_QUERY_STATE 0x0001 #endif +#ifndef THREAD_SET_LIMITED_INFORMATION +#define THREAD_SET_LIMITED_INFORMATION 0x0400 +#define THREAD_QUERY_LIMITED_INFORMATION 0x0800 +#endif + +#define THREAD_ALL_ACCESS_NT4 (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x3ff) +#define THREAD_ALL_ACCESS_VISTA (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xffff) + /* copied from Wine winternl.h - not included in the Windows SDK */ typedef enum _OBJECT_INFORMATION_CLASS { ObjectBasicInformation, @@ -4529,6 +4542,7 @@ int todo, generic, mapped; } map[] = { + { 0, 0, 0 }, { 1, GENERIC_READ, STANDARD_RIGHTS_READ | MUTANT_QUERY_STATE }, { 0, GENERIC_WRITE, STANDARD_RIGHTS_WRITE }, { 0, GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE }, @@ -4562,6 +4576,13 @@ ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); CloseHandle(dup); + + SetLastError(0xdeadbeef); + dup = OpenMutexA(0, FALSE, "WineTestMutex"); +todo_wine + ok(!dup, "OpenMutex should fail\n"); +todo_wine + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError()); } test_default_handle_security(token, mutex, &mapping); @@ -4582,6 +4603,7 @@ int todo, generic, mapped; } map[] = { + { 0, 0, 0 }, { 1, GENERIC_READ, STANDARD_RIGHTS_READ | EVENT_QUERY_STATE }, { 1, GENERIC_WRITE, STANDARD_RIGHTS_WRITE | EVENT_MODIFY_STATE }, { 1, GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE }, @@ -4615,6 +4637,13 @@ ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); CloseHandle(dup); + + SetLastError(0xdeadbeef); + dup = OpenEventA(0, FALSE, "WineTestEvent"); +todo_wine + ok(!dup, "OpenEvent should fail\n"); +todo_wine + ok(GetLastError() == ERROR_ACCESS_DENIED, "wrong error %u\n", GetLastError()); } test_default_handle_security(token, event, &mapping); @@ -4635,6 +4664,7 @@ int todo, generic, mapped; } map[] = { + { 0, 0, 0 }, { 1, GENERIC_READ, STANDARD_RIGHTS_READ | SEMAPHORE_QUERY_STATE }, { 0, GENERIC_WRITE, STANDARD_RIGHTS_WRITE | SEMAPHORE_MODIFY_STATE }, { 1, GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE }, @@ -4689,6 +4719,7 @@ int todo, generic, mapped; } map[] = { + { 0, 0, 0 }, { 1, GENERIC_READ, FILE_GENERIC_READ }, { 1, GENERIC_WRITE, FILE_GENERIC_WRITE }, { 1, GENERIC_EXECUTE, FILE_GENERIC_EXECUTE }, @@ -4758,13 +4789,14 @@ static void test_file_security(HANDLE token) { - DWORD ret, i, access; + DWORD ret, i, access, bytes; HANDLE file, dup; static const struct { int generic, mapped; } map[] = { + { 0, 0 }, { GENERIC_READ, FILE_GENERIC_READ }, { GENERIC_WRITE, FILE_GENERIC_WRITE }, { GENERIC_EXECUTE, FILE_GENERIC_EXECUTE }, @@ -4772,10 +4804,12 @@ }; char temp_path[MAX_PATH]; char file_name[MAX_PATH]; + char buf[16]; GetTempPathA(MAX_PATH, temp_path); GetTempFileNameA(temp_path, "tmp", 0, file_name); + /* file */ SetLastError(0xdeadbeef); file = CreateFileA(file_name, GENERIC_ALL, 0, NULL, CREATE_ALWAYS, 0, NULL); ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); @@ -4797,7 +4831,273 @@ } CloseHandle(file); + + SetLastError(0xdeadbeef); + file = CreateFileA(file_name, 0, 0, NULL, OPEN_EXISTING, 0, NULL); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + access = get_obj_access(file); +todo_wine + ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#x\n", access); + + bytes = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = ReadFile(file, buf, sizeof(buf), &bytes, NULL); + ok(!ret, "ReadFile should fail\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(bytes == 0, "expected 0, got %u\n", bytes); + + CloseHandle(file); + + SetLastError(0xdeadbeef); + file = CreateFileA(file_name, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + access = get_obj_access(file); +todo_wine + ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#x\n", access); + + bytes = 0xdeadbeef; + SetLastError(0xdeadbeef); + ret = ReadFile(file, buf, sizeof(buf), &bytes, NULL); + ok(!ret, "ReadFile should fail\n"); + ok(GetLastError() == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %d\n", GetLastError()); + ok(bytes == 0, "expected 0, got %u\n", bytes); + + CloseHandle(file); DeleteFileA(file_name); + + /* directory */ + SetLastError(0xdeadbeef); + file = CreateFileA(temp_path, GENERIC_ALL, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + access = get_obj_access(file); + ok(access == FILE_ALL_ACCESS, "expected FILE_ALL_ACCESS, got %#x\n", access); + + for (i = 0; i < sizeof(map)/sizeof(map[0]); i++) + { + SetLastError( 0xdeadbeef ); + ret = DuplicateHandle(GetCurrentProcess(), file, GetCurrentProcess(), &dup, + map[i].generic, FALSE, 0); + ok(ret, "DuplicateHandle error %d\n", GetLastError()); + + access = get_obj_access(dup); + ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + + CloseHandle(dup); + } + + CloseHandle(file); + + SetLastError(0xdeadbeef); + file = CreateFileA(temp_path, 0, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + access = get_obj_access(file); +todo_wine + ok(access == (FILE_READ_ATTRIBUTES | SYNCHRONIZE), "expected FILE_READ_ATTRIBUTES | SYNCHRONIZE, got %#x\n", access); + + CloseHandle(file); + + SetLastError(0xdeadbeef); + file = CreateFileA(temp_path, GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + ok(file != INVALID_HANDLE_VALUE, "CreateFile error %d\n", GetLastError()); + + access = get_obj_access(file); +todo_wine + ok(access == (FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES), "expected FILE_GENERIC_WRITE | FILE_READ_ATTRIBUTES, got %#x\n", access); + + CloseHandle(file); +} + +static void test_filemap_security(void) +{ + DWORD ret, i, access; + HANDLE mapping, dup; + static const struct + { + int generic, mapped; + } map[] = + { + { 0, 0 }, + { GENERIC_READ, STANDARD_RIGHTS_READ | SECTION_QUERY | SECTION_MAP_READ }, + { GENERIC_WRITE, STANDARD_RIGHTS_WRITE | SECTION_MAP_WRITE }, + { GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SECTION_MAP_EXECUTE }, + { GENERIC_ALL, STANDARD_RIGHTS_REQUIRED | SECTION_ALL_ACCESS } + }; + + SetLastError(0xdeadbeef); + mapping = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_EXECUTE_READWRITE, 0, 4096, NULL); + if (mapping) + { + access = get_obj_access(mapping); +todo_wine + ok(access == (STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE), + "expected STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE | SECTION_MAP_EXECUTE, got %#x\n", access); + } + else /* win2k fails to create EXECUTE mapping using system page file */ + { + SetLastError(0xdeadbeef); + mapping = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 4096, NULL); + ok(mapping != 0, "CreateFileMapping error %d\n", GetLastError()); + + access = get_obj_access(mapping); + ok(access == (STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE), + "expected STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ | SECTION_MAP_WRITE, got %#x\n", access); + } + + for (i = 0; i < sizeof(map)/sizeof(map[0]); i++) + { + SetLastError( 0xdeadbeef ); + ret = DuplicateHandle(GetCurrentProcess(), mapping, GetCurrentProcess(), &dup, + map[i].generic, FALSE, 0); + ok(ret, "DuplicateHandle error %d\n", GetLastError()); + + access = get_obj_access(dup); + ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + + CloseHandle(dup); + } + + CloseHandle(mapping); +} + +static void test_thread_security(void) +{ + DWORD ret, i, access; + HANDLE thread, dup; + static const struct + { + int generic, mapped; + } map[] = + { + { 0, 0 }, + { GENERIC_READ, STANDARD_RIGHTS_READ | THREAD_QUERY_INFORMATION | THREAD_GET_CONTEXT }, + { GENERIC_WRITE, STANDARD_RIGHTS_WRITE | THREAD_SET_INFORMATION | THREAD_SET_CONTEXT | THREAD_TERMINATE | THREAD_SUSPEND_RESUME | 0x4 }, + { GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE }, + { GENERIC_ALL, THREAD_ALL_ACCESS_NT4 } + }; + + SetLastError(0xdeadbeef); + thread = CreateThread(NULL, 0, (void *)0xdeadbeef, NULL, CREATE_SUSPENDED, &ret); + ok(thread != 0, "CreateThread error %d\n", GetLastError()); + + access = get_obj_access(thread); + ok(access == THREAD_ALL_ACCESS_NT4 || access == THREAD_ALL_ACCESS_VISTA, "expected THREAD_ALL_ACCESS, got %#x\n", access); + + for (i = 0; i < sizeof(map)/sizeof(map[0]); i++) + { + SetLastError( 0xdeadbeef ); + ret = DuplicateHandle(GetCurrentProcess(), thread, GetCurrentProcess(), &dup, + map[i].generic, FALSE, 0); + ok(ret, "DuplicateHandle error %d\n", GetLastError()); + + access = get_obj_access(dup); + switch (map[i].generic) + { + case GENERIC_READ: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | THREAD_QUERY_LIMITED_INFORMATION) /* Vista+ */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_WRITE: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | THREAD_SET_LIMITED_INFORMATION) /* Vista+ */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_EXECUTE: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | THREAD_QUERY_LIMITED_INFORMATION) /* Vista+ */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_ALL: + ok(access == map[i].mapped || access == THREAD_ALL_ACCESS_VISTA, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + default: + ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + } + + CloseHandle(dup); + } + + TerminateThread(thread, 0); + CloseHandle(thread); +} + +static void test_process_access(void) +{ + DWORD ret, i, access; + HANDLE process, dup; + STARTUPINFOA sti; + PROCESS_INFORMATION pi; + char cmdline[] = "winver.exe"; + static const struct + { + int generic, mapped; + } map[] = + { + { 0, 0 }, + { GENERIC_READ, STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ }, + { GENERIC_WRITE, STANDARD_RIGHTS_WRITE | PROCESS_SET_QUOTA | PROCESS_SET_INFORMATION | PROCESS_SUSPEND_RESUME | + PROCESS_VM_WRITE | PROCESS_DUP_HANDLE | PROCESS_CREATE_PROCESS | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION }, + { GENERIC_EXECUTE, STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE }, + { GENERIC_ALL, PROCESS_ALL_ACCESS_NT4 } + }; + + memset(&sti, 0, sizeof(sti)); + sti.cb = sizeof(sti); + SetLastError(0xdeadbeef); + ret = CreateProcessA(NULL, cmdline, NULL, NULL, FALSE, CREATE_SUSPENDED, NULL, NULL, &sti, &pi); + ok(ret, "CreateProcess() error %d\n", GetLastError()); + + CloseHandle(pi.hThread); + process = pi.hProcess; + + access = get_obj_access(process); + ok(access == PROCESS_ALL_ACCESS_NT4 || access == PROCESS_ALL_ACCESS_VISTA, "expected PROCESS_ALL_ACCESS, got %#x\n", access); + + for (i = 0; i < sizeof(map)/sizeof(map[0]); i++) + { + SetLastError( 0xdeadbeef ); + ret = DuplicateHandle(GetCurrentProcess(), process, GetCurrentProcess(), &dup, + map[i].generic, FALSE, 0); + ok(ret, "DuplicateHandle error %d\n", GetLastError()); + + access = get_obj_access(dup); + switch (map[i].generic) + { + case GENERIC_READ: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION) /* Vista+ */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_WRITE: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_TERMINATE) /* before Vista */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_EXECUTE: +todo_wine + ok(access == map[i].mapped || access == (map[i].mapped | PROCESS_QUERY_LIMITED_INFORMATION | PROCESS_TERMINATE) /* Vista+ */, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + case GENERIC_ALL: + ok(access == map[i].mapped || access == PROCESS_ALL_ACCESS_VISTA, + "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + default: + ok(access == map[i].mapped, "%d: expected %#x, got %#x\n", i, map[i].mapped, access); + break; + } + + CloseHandle(dup); + } + + TerminateProcess(process, 0); + CloseHandle(process); } static BOOL validate_impersonation_token(HANDLE token, DWORD *token_type) @@ -4875,6 +5175,9 @@ test_named_pipe_security(token); test_semaphore_security(token); test_file_security(token); + test_filemap_security(); + test_thread_security(); + test_process_access(); /* FIXME: test other kernel object types */ CloseHandle(process_token); diff -Nru wine-compholio-1.7.10~daily/dlls/d3dx9_36/tests/mesh.c wine-compholio-1.7.10~daily/dlls/d3dx9_36/tests/mesh.c --- wine-compholio-1.7.10~daily/dlls/d3dx9_36/tests/mesh.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/d3dx9_36/tests/mesh.c 2014-01-11 03:17:37.000000000 +0000 @@ -26,6 +26,16 @@ #include "wine/test.h" #include "d3dx9.h" +#ifndef NAN +/* From wine/port.h */ +static inline float __port_nan(void) +{ + static const unsigned __nan_bytes = 0x7fc00000; + return *(const float *)&__nan_bytes; +} +#define NAN __port_nan() +#endif + /* Set the WINETEST_DEBUG environment variable to be greater than 1 for verbose * function call traces of ID3DXAllocateHierarchy callbacks. */ #define TRACECALLBACK if(winetest_debug > 1) trace diff -Nru wine-compholio-1.7.10~daily/dlls/ddraw/main.c wine-compholio-1.7.10~daily/dlls/ddraw/main.c --- wine-compholio-1.7.10~daily/dlls/ddraw/main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/ddraw/main.c 2014-01-11 03:17:37.000000000 +0000 @@ -85,7 +85,7 @@ { TRACE("Interface %d: %s\n", adapter, wine_dbgstr_guid(&adapter_id.device_identifier)); cont_enum = callback(&adapter_id.device_identifier, adapter_id.description, - adapter_id.device_name, context, 0); + adapter_id.device_name, context, wined3d_get_adapter_monitor(wined3d, adapter)); } } } diff -Nru wine-compholio-1.7.10~daily/dlls/dmband/dmutils.c wine-compholio-1.7.10~daily/dlls/dmband/dmutils.c --- wine-compholio-1.7.10~daily/dlls/dmband/dmutils.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmband/dmutils.c 2014-01-11 03:17:37.000000000 +0000 @@ -337,7 +337,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmcompos/dmcompos_main.c wine-compholio-1.7.10~daily/dlls/dmcompos/dmcompos_main.c --- wine-compholio-1.7.10~daily/dlls/dmcompos/dmcompos_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmcompos/dmcompos_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -220,7 +220,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/audiopath.c wine-compholio-1.7.10~daily/dlls/dmime/audiopath.c --- wine-compholio-1.7.10~daily/dlls/dmime/audiopath.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/audiopath.c 2014-01-11 03:17:37.000000000 +0000 @@ -139,7 +139,7 @@ if (IsEqualIID (iidInterface, &IID_IDirectMusicGraph)) { if (NULL == This->pToolGraph) { IDirectMusicGraphImpl* pGraph; - DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL); + create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph); This->pToolGraph = (IDirectMusicGraph*) pGraph; } *ppObject = This->pToolGraph; @@ -170,7 +170,7 @@ IDirectMusicPerformance8_GetGraph(This->pPerf, &pPerfoGraph); if (NULL == pPerfoGraph) { IDirectMusicGraphImpl* pGraph = NULL; - DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL); + create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph); IDirectMusicPerformance8_SetGraph(This->pPerf, (IDirectMusicGraph*) pGraph); /* we need release as SetGraph do an AddRef */ IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) pGraph); @@ -296,7 +296,7 @@ /* FIXME: should this be determined from stream? */ pDesc->dwValidData |= DMUS_OBJ_CLASS; - pDesc->guidClass = CLSID_DirectMusicAudioPath; + pDesc->guidClass = This->pDesc->guidClass; IStream_Read (pStream, &Chunk, sizeof(FOURCC)+sizeof(DWORD), NULL); TRACE_(dmfile)(": %s chunk (size = 0x%04x)", debugstr_fourcc (Chunk.fccID), Chunk.dwSize); @@ -634,7 +634,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmaudiopath(REFIID lpcGUID, void **ppobj) +{ IDirectMusicAudioPathImpl* obj; obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAudioPathImpl)); @@ -649,7 +650,7 @@ obj->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC)); DM_STRUCT_INIT(obj->pDesc); obj->pDesc->dwValidData |= DMUS_OBJ_CLASS; - obj->pDesc->guidClass = CLSID_DirectMusicAudioPath; + obj->pDesc->guidClass = CLSID_DirectMusicAudioPathConfig; obj->ref = 0; /* will be inited by QueryInterface */ return IDirectMusicAudioPathImpl_IUnknown_QueryInterface ((LPUNKNOWN)&obj->UnknownVtbl, lpcGUID, ppobj); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/dmime_main.c wine-compholio-1.7.10~daily/dlls/dmime/dmime_main.c --- wine-compholio-1.7.10~daily/dlls/dmime/dmime_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/dmime_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -28,7 +28,7 @@ typedef struct { IClassFactory IClassFactory_iface; - HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter); + HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ret_iface); } IClassFactoryImpl; /****************************************************************** @@ -80,7 +80,10 @@ TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv); - return This->fnCreateInstance(riid, ppv, pUnkOuter); + if(pUnkOuter) + return CLASS_E_NOAGGREGATION; + + return This->fnCreateInstance(riid, ppv); } static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) @@ -104,28 +107,20 @@ }; -static IClassFactoryImpl Performance_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicPerformanceImpl}; -static IClassFactoryImpl Segment_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSegmentImpl}; -static IClassFactoryImpl SegmentState_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicSegmentStateImpl}; -static IClassFactoryImpl Graph_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicGraphImpl}; -static IClassFactoryImpl TempoTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicTempoTrack}; -static IClassFactoryImpl SeqTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSeqTrack}; -static IClassFactoryImpl SysExTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSysExTrack}; -static IClassFactoryImpl TimeSigTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicTimeSigTrack}; -static IClassFactoryImpl ParamControlTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicParamControlTrack}; -static IClassFactoryImpl MarkerTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicMarkerTrack}; -static IClassFactoryImpl LyricsTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicLyricsTrack}; -static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicSegTriggerTrack}; -static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl}, - DMUSIC_CreateDirectMusicAudioPathImpl}; -static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicWaveTrack}; +static IClassFactoryImpl Performance_CF = {{&classfactory_vtbl}, create_dmperformance}; +static IClassFactoryImpl Segment_CF = {{&classfactory_vtbl}, create_dmsegment}; +static IClassFactoryImpl SegmentState_CF = {{&classfactory_vtbl}, create_dmsegmentstate}; +static IClassFactoryImpl Graph_CF = {{&classfactory_vtbl}, create_dmgraph}; +static IClassFactoryImpl TempoTrack_CF = {{&classfactory_vtbl}, create_dmtempotrack}; +static IClassFactoryImpl SeqTrack_CF = {{&classfactory_vtbl}, create_dmseqtrack}; +static IClassFactoryImpl SysExTrack_CF = {{&classfactory_vtbl}, create_dmsysextrack}; +static IClassFactoryImpl TimeSigTrack_CF = {{&classfactory_vtbl}, create_dmtimesigtrack}; +static IClassFactoryImpl ParamControlTrack_CF = {{&classfactory_vtbl}, create_dmparamcontroltrack}; +static IClassFactoryImpl MarkerTrack_CF = {{&classfactory_vtbl}, create_dmmarkertrack}; +static IClassFactoryImpl LyricsTrack_CF = {{&classfactory_vtbl}, create_dmlyricstrack}; +static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl}, create_dmsegtriggertrack}; +static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl}, create_dmaudiopath}; +static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, create_dmwavetrack}; /****************************************************************** * DllMain @@ -209,7 +204,8 @@ *ppv = &SegTriggerTrack_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; - } else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicAudioPath) && IsEqualIID (riid, &IID_IClassFactory)) { + } else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicAudioPathConfig) && + IsEqualIID (riid, &IID_IClassFactory)) { *ppv = &AudioPath_CF; IClassFactory_AddRef((IClassFactory*)*ppv); return S_OK; diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/dmime_private.h wine-compholio-1.7.10~daily/dlls/dmime/dmime_private.h --- wine-compholio-1.7.10~daily/dlls/dmime/dmime_private.h 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/dmime_private.h 2014-01-11 03:17:37.000000000 +0000 @@ -64,21 +64,21 @@ /***************************************************************************** * ClassFactory */ -extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; - -extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; -extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmperformance(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmsegment(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmsegmentstate(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmgraph(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmaudiopath(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; + +extern HRESULT WINAPI create_dmlyricstrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmmarkertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmparamcontroltrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmsegtriggertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmseqtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmsysextrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmtempotrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmtimesigtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; +extern HRESULT WINAPI create_dmwavetrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN; /***************************************************************************** diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/dmutils.c wine-compholio-1.7.10~daily/dlls/dmime/dmutils.c --- wine-compholio-1.7.10~daily/dlls/dmime/dmutils.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/dmutils.c 2014-01-11 03:17:37.000000000 +0000 @@ -273,7 +273,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/graph.c wine-compholio-1.7.10~daily/dlls/dmime/graph.c --- wine-compholio-1.7.10~daily/dlls/dmime/graph.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/graph.c 2014-01-11 03:17:37.000000000 +0000 @@ -598,7 +598,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmgraph(REFIID lpcGUID, void **ppobj) +{ IDirectMusicGraphImpl* obj; obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/lyricstrack.c wine-compholio-1.7.10~daily/dlls/dmime/lyricstrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/lyricstrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/lyricstrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -265,7 +265,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmlyricstrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicLyricsTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLyricsTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/markertrack.c wine-compholio-1.7.10~daily/dlls/dmime/markertrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/markertrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/markertrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -265,7 +265,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmmarkertrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicMarkerTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMarkerTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/paramcontroltrack.c wine-compholio-1.7.10~daily/dlls/dmime/paramcontroltrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/paramcontroltrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/paramcontroltrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -265,7 +265,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmparamcontroltrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicParamControlTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicParamControlTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/performance.c wine-compholio-1.7.10~daily/dlls/dmime/performance.c --- wine-compholio-1.7.10~daily/dlls/dmime/performance.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/performance.c 2014-01-11 03:17:37.000000000 +0000 @@ -304,7 +304,7 @@ FIXME("(%p, %p, %d, 0x%s, %p): stub\n", This, pSegment, dwFlags, wine_dbgstr_longlong(i64StartTime), ppSegmentState); if (ppSegmentState) - return DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (LPVOID*)ppSegmentState, NULL); + return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState); return S_OK; } @@ -966,7 +966,7 @@ FIXME("(%p, %p, %p, %p, %d, 0x%s, %p, %p, %p): stub\n", This, pSource, pwzSegmentName, pTransition, dwFlags, wine_dbgstr_longlong(i64StartTime), ppSegmentState, pFrom, pAudioPath); if (ppSegmentState) - return DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (LPVOID*)ppSegmentState, NULL); + return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState); return S_OK; } @@ -1002,7 +1002,7 @@ return E_POINTER; } - DMUSIC_CreateDirectMusicAudioPathImpl (&IID_IDirectMusicAudioPath, (LPVOID*)&pPath, NULL); + create_dmaudiopath(&IID_IDirectMusicAudioPath, (void**)&pPath); default_path = (IDirectMusicAudioPathImpl*)((char*)(pPath) - offsetof(IDirectMusicAudioPathImpl,AudioPathVtbl)); default_path->pPerf = &This->IDirectMusicPerformance8_iface; @@ -1029,8 +1029,8 @@ if (NULL == ppNewPath) { return E_POINTER; } - - DMUSIC_CreateDirectMusicAudioPathImpl (&IID_IDirectMusicAudioPath, (LPVOID*)&pPath, NULL); + + create_dmaudiopath(&IID_IDirectMusicAudioPath, (void**)&pPath); default_path = (IDirectMusicAudioPathImpl*)((char*)(pPath) - offsetof(IDirectMusicAudioPathImpl,AudioPathVtbl)); default_path->pPerf = &This->IDirectMusicPerformance8_iface; @@ -1209,15 +1209,11 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmperformance(REFIID lpcGUID, void **ppobj) +{ IDirectMusicPerformance8Impl *obj; - TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter); - - if (pUnkOuter) { - *ppobj = NULL; - return CLASS_E_NOAGGREGATION; - } + TRACE("(%p,%p)\n", lpcGUID, ppobj); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl)); if (NULL == obj) { diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/segment.c wine-compholio-1.7.10~daily/dlls/dmime/segment.c --- wine-compholio-1.7.10~daily/dlls/dmime/segment.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/segment.c 2014-01-11 03:17:37.000000000 +0000 @@ -293,7 +293,7 @@ if (NULL == ppSegState) { return E_POINTER; } - hr = DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (void**) ppSegState, NULL); + hr = create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**) ppSegState); if (FAILED(hr)) { return hr; } @@ -1332,15 +1332,11 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmsegment(REFIID lpcGUID, void **ppobj) +{ IDirectMusicSegment8Impl* obj; HRESULT hr; - if (pUnkOuter) { - *ppobj = NULL; - return CLASS_E_NOAGGREGATION; - } - obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegment8Impl)); if (NULL == obj) { *ppobj = NULL; diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/segmentstate.c wine-compholio-1.7.10~daily/dlls/dmime/segmentstate.c --- wine-compholio-1.7.10~daily/dlls/dmime/segmentstate.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/segmentstate.c 2014-01-11 03:17:37.000000000 +0000 @@ -123,7 +123,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmsegmentstate(REFIID lpcGUID, void **ppobj) +{ IDirectMusicSegmentState8Impl* obj; obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/segtriggertrack.c wine-compholio-1.7.10~daily/dlls/dmime/segtriggertrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/segtriggertrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/segtriggertrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -518,7 +518,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmsegtriggertrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicSegTriggerTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegTriggerTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/seqtrack.c wine-compholio-1.7.10~daily/dlls/dmime/seqtrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/seqtrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/seqtrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -265,7 +265,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmseqtrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicSeqTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSeqTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/sysextrack.c wine-compholio-1.7.10~daily/dlls/dmime/sysextrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/sysextrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/sysextrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -265,7 +265,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmsysextrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicSysExTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSysExTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/tempotrack.c wine-compholio-1.7.10~daily/dlls/dmime/tempotrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/tempotrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/tempotrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -391,7 +391,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmtempotrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicTempoTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/tests/Makefile.in wine-compholio-1.7.10~daily/dlls/dmime/tests/Makefile.in --- wine-compholio-1.7.10~daily/dlls/dmime/tests/Makefile.in 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/tests/Makefile.in 2014-01-11 03:17:37.000000000 +0000 @@ -2,4 +2,5 @@ IMPORTS = user32 ole32 C_SRCS = \ + dmime.c \ performance.c diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/tests/dmime.c wine-compholio-1.7.10~daily/dlls/dmime/tests/dmime.c --- wine-compholio-1.7.10~daily/dlls/dmime/tests/dmime.c 1970-01-01 00:00:00.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/tests/dmime.c 2014-01-11 03:17:37.000000000 +0000 @@ -0,0 +1,384 @@ +/* + * Copyright 2012, 2014 Michael Stefaniuc + * + * 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 + */ + +#define COBJMACROS + +#include +#include +#include +#include + +#define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0])) + +static BOOL missing_dmime(void) +{ + IDirectMusicSegment8 *dms; + HRESULT hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSegment, (void**)&dms); + + if (hr == S_OK && dms) + { + IDirectMusicSegment_Release(dms); + return FALSE; + } + return TRUE; +} + +static void test_COM_audiopath(void) +{ + IDirectMusicAudioPath *dmap; + IUnknown *unk; + IDirectMusicPerformance8 *performance; + ULONG refcount; + HRESULT hr; + + hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicPerformance8, (void**)&performance); + ok(hr == S_OK || broken(hr == E_NOINTERFACE), + "DirectMusicPerformance create failed: %08x\n", hr); + if (!performance) { + win_skip("IDirectMusicPerformance8 not available\n"); + return; + } + hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL, + DMUS_APATH_SHARED_STEREOPLUSREVERB, 64, DMUS_AUDIOF_ALL, NULL); + ok(hr == S_OK, "DirectMusicPerformance_InitAudio failed: %08x\n", hr); + hr = IDirectMusicPerformance8_GetDefaultAudioPath(performance, &dmap); + ok(hr == S_OK, "DirectMusicPerformance_GetDefaultAudioPath failed: %08x\n", hr); + + /* IDirectMusicObject and IPersistStream are not supported */ + hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IDirectMusicObject, (void**)&unk); + todo_wine ok(FAILED(hr) && !unk, "Unexpected IDirectMusicObject interface: hr=%08x, iface=%p\n", + hr, unk); + if (unk) IUnknown_Release(unk); + hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IPersistStream, (void**)&unk); + todo_wine ok(FAILED(hr) && !unk, "Unexpected IPersistStream interface: hr=%08x, iface=%p\n", + hr, unk); + if (unk) IUnknown_Release(unk); + + /* Same refcount for all DirectMusicAudioPath interfaces */ + refcount = IDirectMusicAudioPath_AddRef(dmap); + ok(refcount == 3, "refcount == %u, expected 3\n", refcount); + + hr = IDirectMusicAudioPath_QueryInterface(dmap, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicAudioPath_Release(dmap) > 1); /* performance has a reference too */ + IDirectMusicPerformance8_CloseDown(performance); + IDirectMusicPerformance8_Release(performance); +} + +static void test_COM_audiopathconfig(void) +{ + IDirectMusicAudioPath *dmap = (IDirectMusicAudioPath*)0xdeadbeef; + IDirectMusicObject *dmo; + IPersistStream *ps; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, (IUnknown*)&dmap, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dmap); + if (hr == REGDB_E_CLASSNOTREG) { + win_skip("DirectMusicAudioPathConfig not registered\n"); + return; + } + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicAudioPathConfig create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dmap, "dmap = %p\n", dmap); + + /* IDirectMusicAudioPath not supported */ + hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicAudioPath, (void**)&dmap); + todo_wine ok(FAILED(hr) && !dmap, + "Unexpected IDirectMusicAudioPath interface: hr=%08x, iface=%p\n", hr, dmap); + + /* IDirectMusicObject and IPersistStream supported */ + hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER, + &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "DirectMusicObject create failed: %08x, expected S_OK\n", hr); + IPersistStream_Release(ps); + hr = CoCreateInstance(&CLSID_DirectMusicAudioPathConfig, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicObject, (void**)&dmo); + ok(hr == S_OK, "DirectMusicObject create failed: %08x, expected S_OK\n", hr); + + /* Same refcount for all DirectMusicObject interfaces */ + refcount = IDirectMusicObject_AddRef(dmo); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicObject_QueryInterface(dmo, &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + refcount = IPersistStream_AddRef(ps); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IPersistStream_Release(ps); + + hr = IDirectMusicObject_QueryInterface(dmo, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IUnknown_Release(unk); + + /* IDirectMusicAudioPath still not supported */ + hr = IDirectMusicObject_QueryInterface(dmo, &IID_IDirectMusicAudioPath, (void**)&dmap); + todo_wine ok(FAILED(hr) && !dmap, + "Unexpected IDirectMusicAudioPath interface: hr=%08x, iface=%p\n", hr, dmap); + + while (IDirectMusicObject_Release(dmo)); +} + + +static void test_COM_graph(void) +{ + IDirectMusicGraph *dmg = (IDirectMusicGraph*)0xdeadbeef; + IDirectMusicObject *dmo; + IPersistStream *ps; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicGraph, (IUnknown*)&dmg, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dmg); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicGraph create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dmg, "dmg = %p\n", dmg); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IClassFactory, + (void**)&dmg); + ok(hr == E_NOINTERFACE, "DirectMusicGraph create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicGraph interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicGraph, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicGraph, (void**)&dmg); + ok(hr == S_OK, "DirectMusicGraph create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicGraph_AddRef(dmg); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IDirectMusicObject, (void**)&dmo); + if (hr == E_NOINTERFACE) { + win_skip("DirectMusicGraph without IDirectMusicObject\n"); + return; + } + ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr); + refcount = IDirectMusicObject_AddRef(dmo); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IDirectMusicObject_Release(dmo); + + hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + refcount = IPersistStream_AddRef(ps); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IPersistStream_Release(ps); + + hr = IDirectMusicGraph_QueryInterface(dmg, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 6, "refcount == %u, expected 6\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicGraph_Release(dmg)); +} + +static void test_COM_segment(void) +{ + IDirectMusicSegment8 *dms = (IDirectMusicSegment8*)0xdeadbeef; + IDirectMusicObject *dmo; + IPersistStream *stream; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicSegment, (IUnknown*)&dms, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dms); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicSegment create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dms, "dms = %p\n", dms); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectSound, (void**)&dms); + ok(hr == E_NOINTERFACE, + "DirectMusicSegment create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount */ + hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSegment8, (void**)&dms); + if (hr == E_NOINTERFACE) { + win_skip("DirectMusicSegment without IDirectMusicSegment8\n"); + return; + } + ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicSegment8_AddRef(dms); + ok (refcount == 2, "refcount == %u, expected 2\n", refcount); + hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IDirectMusicObject, (void**)&dmo); + ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr); + IDirectMusicSegment8_AddRef(dms); + refcount = IDirectMusicSegment8_Release(dms); + ok (refcount == 3, "refcount == %u, expected 3\n", refcount); + hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IPersistStream, (void**)&stream); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + refcount = IDirectMusicSegment8_Release(dms); + ok (refcount == 3, "refcount == %u, expected 3\n", refcount); + hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_Release(unk); + ok (refcount == 3, "refcount == %u, expected 3\n", refcount); + refcount = IDirectMusicObject_Release(dmo); + ok (refcount == 2, "refcount == %u, expected 2\n", refcount); + refcount = IPersistStream_Release(stream); + ok (refcount == 1, "refcount == %u, expected 1\n", refcount); + refcount = IDirectMusicSegment8_Release(dms); + ok (refcount == 0, "refcount == %u, expected 0\n", refcount); +} + +static void test_COM_segmentstate(void) +{ + IDirectMusicSegmentState8 *dmss8 = (IDirectMusicSegmentState8*)0xdeadbeef; + IUnknown *unk; + ULONG refcount; + HRESULT hr; + + /* COM aggregation */ + hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, (IUnknown*)&dmss8, CLSCTX_INPROC_SERVER, + &IID_IUnknown, (void**)&dmss8); + ok(hr == CLASS_E_NOAGGREGATION, + "DirectMusicSegmentState8 create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); + ok(!dmss8, "dmss8 = %p\n", dmss8); + + /* Invalid RIID */ + hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicObject, (void**)&dmss8); + ok(hr == E_NOINTERFACE, + "DirectMusicSegmentState8 create failed: %08x, expected E_NOINTERFACE\n", hr); + + /* Same refcount for all DirectMusicSegmentState interfaces */ + hr = CoCreateInstance(&CLSID_DirectMusicSegmentState, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusicSegmentState8, (void**)&dmss8); + if (hr == E_NOINTERFACE) { + win_skip("DirectMusicSegmentState without IDirectMusicSegmentState8\n"); + return; + } + ok(hr == S_OK, "DirectMusicSegmentState8 create failed: %08x, expected S_OK\n", hr); + refcount = IDirectMusicSegmentState8_AddRef(dmss8); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicSegmentState8_QueryInterface(dmss8, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicSegmentState8_Release(dmss8)); +} + +static void test_COM_track(void) +{ + IDirectMusicTrack8 *dmt8; + IPersistStream *ps; + IUnknown *unk; + ULONG refcount; + HRESULT hr; +#define X(class) &CLSID_ ## class, #class + const struct { + REFCLSID clsid; + const char *name; + } class[] = { + { X(DirectMusicLyricsTrack) }, + { X(DirectMusicMarkerTrack) }, + { X(DirectMusicParamControlTrack) }, + { X(DirectMusicSegmentTriggerTrack) }, + { X(DirectMusicSeqTrack) }, + { X(DirectMusicSysExTrack) }, + { X(DirectMusicTempoTrack) }, + { X(DirectMusicTimeSigTrack) }, + { X(DirectMusicWaveTrack) } + }; +#undef X + unsigned int i; + + for (i = 0; i < ARRAY_SIZE(class); i++) { + /* COM aggregation */ + dmt8 = (IDirectMusicTrack8*)0xdeadbeef; + hr = CoCreateInstance(class[i].clsid, (IUnknown*)&dmt8, CLSCTX_INPROC_SERVER, &IID_IUnknown, + (void**)&dmt8); + if (hr == REGDB_E_CLASSNOTREG) { + win_skip("%s not registered\n", class[i].name); + continue; + } + ok(hr == CLASS_E_NOAGGREGATION, + "%s create failed: %08x, expected CLASS_E_NOAGGREGATION\n", class[i].name, hr); + ok(!dmt8, "dmt8 = %p\n", dmt8); + + /* Invalid RIID */ + hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicObject, + (void**)&dmt8); + ok(hr == E_NOINTERFACE, "%s create failed: %08x, expected E_NOINTERFACE\n", + class[i].name, hr); + + /* Same refcount for all DirectMusicTrack interfaces */ + hr = CoCreateInstance(class[i].clsid, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicTrack8, + (void**)&dmt8); + if (hr == E_NOINTERFACE && !dmt8) { + skip("%s not created with CoCreateInstance()\n", class[i].name); + continue; + } + ok(hr == S_OK, "%s create failed: %08x, expected S_OK\n", class[i].name, hr); + refcount = IDirectMusicTrack8_AddRef(dmt8); + ok(refcount == 2, "refcount == %u, expected 2\n", refcount); + + hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IPersistStream, (void**)&ps); + ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); + refcount = IPersistStream_AddRef(ps); + ok(refcount == 4, "refcount == %u, expected 4\n", refcount); + refcount = IPersistStream_Release(ps); + + hr = IDirectMusicTrack8_QueryInterface(dmt8, &IID_IUnknown, (void**)&unk); + ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); + refcount = IUnknown_AddRef(unk); + ok(refcount == 5, "refcount == %u, expected 5\n", refcount); + refcount = IUnknown_Release(unk); + + while (IDirectMusicTrack8_Release(dmt8)); + } +} + +START_TEST(dmime) +{ + CoInitialize(NULL); + + if (missing_dmime()) + { + skip("dmime not available\n"); + CoUninitialize(); + return; + } + test_COM_audiopath(); + test_COM_audiopathconfig(); + test_COM_graph(); + test_COM_segment(); + test_COM_segmentstate(); + test_COM_track(); + + CoUninitialize(); +} diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/tests/performance.c wine-compholio-1.7.10~daily/dlls/dmime/tests/performance.c --- wine-compholio-1.7.10~daily/dlls/dmime/tests/performance.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/tests/performance.c 2014-01-11 03:17:37.000000000 +0000 @@ -255,55 +255,6 @@ ok (refcount == 0, "refcount == %u, expected 0\n", refcount); } -static void test_dms_COM(void) -{ - IDirectMusicSegment8 *dms = (IDirectMusicSegment8*)0xdeadbeef; - IDirectMusicObject *dmo; - IPersistStream *stream; - IUnknown *unk; - ULONG refcount; - HRESULT hr; - - /* COM aggregation */ - hr = CoCreateInstance(&CLSID_DirectMusicSegment, (IUnknown*)&dms, CLSCTX_INPROC_SERVER, - &IID_IUnknown, (void**)&dms); - ok(hr == CLASS_E_NOAGGREGATION, - "DirectMusicSegment create failed: %08x, expected CLASS_E_NOAGGREGATION\n", hr); - ok(!dms, "dms = %p\n", dms); - - /* Invalid RIID */ - hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectSound, (void**)&dms); - ok(hr == E_NOINTERFACE, - "DirectMusicSegment create failed: %08x, expected E_NOINTERFACE\n", hr); - - /* Same refcount */ - hr = CoCreateInstance(&CLSID_DirectMusicSegment, NULL, CLSCTX_INPROC_SERVER, - &IID_IDirectMusicSegment8, (void**)&dms); - ok(hr == S_OK, "DirectMusicSegment create failed: %08x, expected S_OK\n", hr); - refcount = IDirectMusicSegment8_AddRef(dms); - ok (refcount == 2, "refcount == %u, expected 2\n", refcount); - hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IDirectMusicObject, (void**)&dmo); - ok(hr == S_OK, "QueryInterface for IID_IDirectMusicObject failed: %08x\n", hr); - IDirectMusicSegment8_AddRef(dms); - refcount = IDirectMusicSegment8_Release(dms); - ok (refcount == 3, "refcount == %u, expected 3\n", refcount); - hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IPersistStream, (void**)&stream); - ok(hr == S_OK, "QueryInterface for IID_IPersistStream failed: %08x\n", hr); - refcount = IDirectMusicSegment8_Release(dms); - ok (refcount == 3, "refcount == %u, expected 3\n", refcount); - hr = IDirectMusicSegment8_QueryInterface(dms, &IID_IUnknown, (void**)&unk); - ok(hr == S_OK, "QueryInterface for IID_IUnknown failed: %08x\n", hr); - refcount = IUnknown_Release(unk); - ok (refcount == 3, "refcount == %u, expected 3\n", refcount); - refcount = IDirectMusicObject_Release(dmo); - ok (refcount == 2, "refcount == %u, expected 2\n", refcount); - refcount = IPersistStream_Release(stream); - ok (refcount == 1, "refcount == %u, expected 1\n", refcount); - refcount = IDirectMusicSegment8_Release(dms); - ok (refcount == 0, "refcount == %u, expected 0\n", refcount); -} - START_TEST( performance ) { HRESULT hr; @@ -323,7 +274,5 @@ test_COM(); test_createport(); - test_dms_COM(); - CoUninitialize(); } diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/timesigtrack.c wine-compholio-1.7.10~daily/dlls/dmime/timesigtrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/timesigtrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/timesigtrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -270,7 +270,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmtimesigtrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicTimeSigTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTimeSigTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmime/wavetrack.c wine-compholio-1.7.10~daily/dlls/dmime/wavetrack.c --- wine-compholio-1.7.10~daily/dlls/dmime/wavetrack.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmime/wavetrack.c 2014-01-11 03:17:37.000000000 +0000 @@ -271,7 +271,8 @@ }; /* for ClassFactory */ -HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { +HRESULT WINAPI create_dmwavetrack(REFIID lpcGUID, void **ppobj) +{ IDirectMusicWaveTrack* track; track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveTrack)); diff -Nru wine-compholio-1.7.10~daily/dlls/dmloader/debug.c wine-compholio-1.7.10~daily/dlls/dmloader/debug.c --- wine-compholio-1.7.10~daily/dlls/dmloader/debug.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmloader/debug.c 2014-01-11 03:17:37.000000000 +0000 @@ -101,7 +101,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmscript/dmscript_main.c wine-compholio-1.7.10~daily/dlls/dmscript/dmscript_main.c --- wine-compholio-1.7.10~daily/dlls/dmscript/dmscript_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmscript/dmscript_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -253,7 +253,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmstyle/dmutils.c wine-compholio-1.7.10~daily/dlls/dmstyle/dmutils.c --- wine-compholio-1.7.10~daily/dlls/dmstyle/dmutils.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmstyle/dmutils.c 2014-01-11 03:17:37.000000000 +0000 @@ -270,7 +270,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmsynth/dmsynth_main.c wine-compholio-1.7.10~daily/dlls/dmsynth/dmsynth_main.c --- wine-compholio-1.7.10~daily/dlls/dmsynth/dmsynth_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmsynth/dmsynth_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -188,7 +188,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dmusic/dmusic_main.c wine-compholio-1.7.10~daily/dlls/dmusic/dmusic_main.c --- wine-compholio-1.7.10~daily/dlls/dmusic/dmusic_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dmusic/dmusic_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -226,7 +226,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/dswave/dswave_main.c wine-compholio-1.7.10~daily/dlls/dswave/dswave_main.c --- wine-compholio-1.7.10~daily/dlls/dswave/dswave_main.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/dswave/dswave_main.c 2014-01-11 03:17:37.000000000 +0000 @@ -188,7 +188,6 @@ /* CLSIDs */ GE(CLSID_AudioVBScript), GE(CLSID_DirectMusic), - GE(CLSID_DirectMusicAudioPath), GE(CLSID_DirectMusicAudioPathConfig), GE(CLSID_DirectMusicAuditionTrack), GE(CLSID_DirectMusicBand), diff -Nru wine-compholio-1.7.10~daily/dlls/kernel32/tests/profile.c wine-compholio-1.7.10~daily/dlls/kernel32/tests/profile.c --- wine-compholio-1.7.10~daily/dlls/kernel32/tests/profile.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/kernel32/tests/profile.c 2014-01-11 03:17:37.000000000 +0000 @@ -92,7 +92,7 @@ static void test_profile_string(void) { - static const WCHAR emptyW[] = { 0 }; + static WCHAR emptyW[] = { 0 }; /* if "const", GetPrivateProfileStringW(emptyW, ...) crashes on win2k */ static const WCHAR keyW[] = { 'k','e','y',0 }; static const WCHAR sW[] = { 's',0 }; static const WCHAR TESTFILE2W[] = {'.','\\','t','e','s','t','w','i','n','e','2','.','i','n','i',0}; diff -Nru wine-compholio-1.7.10~daily/dlls/mshtml/mutation.c wine-compholio-1.7.10~daily/dlls/mshtml/mutation.c --- wine-compholio-1.7.10~daily/dlls/mshtml/mutation.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/mshtml/mutation.c 2014-01-11 03:17:37.000000000 +0000 @@ -642,7 +642,7 @@ nsIDOMElement *nselem; nsresult nsres; - TRACE("(%p)\n", This); + TRACE("(%p)->(%p %p)\n", This, aDocument, aContent); nsres = nsIContent_QueryInterface(aContent, &IID_nsIDOMElement, (void**)&nselem); if(NS_SUCCEEDED(nsres)) { diff -Nru wine-compholio-1.7.10~daily/dlls/mshtml/npplugin.c wine-compholio-1.7.10~daily/dlls/mshtml/npplugin.c --- wine-compholio-1.7.10~daily/dlls/mshtml/npplugin.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/mshtml/npplugin.c 2014-01-11 03:17:37.000000000 +0000 @@ -671,7 +671,6 @@ HRESULT hres; hres = create_plugin_host(window->doc, nselem, obj, &clsid, &host); - nsIDOMElement_Release(nselem); IUnknown_Release(obj); if(SUCCEEDED(hres)) instance->pdata = host; diff -Nru wine-compholio-1.7.10~daily/dlls/oleaut32/tests/safearray.c wine-compholio-1.7.10~daily/dlls/oleaut32/tests/safearray.c --- wine-compholio-1.7.10~daily/dlls/oleaut32/tests/safearray.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/oleaut32/tests/safearray.c 2014-01-11 03:17:37.000000000 +0000 @@ -83,32 +83,33 @@ DWORD clearCalled; } IRecordInfoImpl; -static const IRecordInfoVtbl IRecordInfoImpl_VTable; - static inline IRecordInfoImpl *impl_from_IRecordInfo(IRecordInfo *iface) { return CONTAINING_RECORD(iface, IRecordInfoImpl, IRecordInfo_iface); } -static IRecordInfoImpl *IRecordInfoImpl_Construct(void) +static HRESULT WINAPI RecordInfo_QueryInterface(IRecordInfo *iface, REFIID riid, void **obj) { - IRecordInfoImpl *rec; + *obj = NULL; - rec = HeapAlloc(GetProcessHeap(), 0, sizeof(IRecordInfoImpl)); - rec->IRecordInfo_iface.lpVtbl = &IRecordInfoImpl_VTable; - rec->ref = START_REF_COUNT; - rec->clearCalled = 0; - rec->sizeCalled = 0; - return rec; + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IRecordInfo)) + { + *obj = iface; + IRecordInfo_AddRef(iface); + return S_OK; + } + + return E_NOINTERFACE; } -static ULONG CALLBACK IRecordInfoImpl_AddRef(IRecordInfo *iface) +static ULONG WINAPI RecordInfo_AddRef(IRecordInfo *iface) { IRecordInfoImpl* This = impl_from_IRecordInfo(iface); return InterlockedIncrement(&This->ref); } -static ULONG CALLBACK IRecordInfoImpl_Release(IRecordInfo *iface) +static ULONG WINAPI RecordInfo_Release(IRecordInfo *iface) { IRecordInfoImpl* This = impl_from_IRecordInfo(iface); ULONG ref = InterlockedDecrement(&This->ref); @@ -119,16 +120,40 @@ return ref; } +static HRESULT WINAPI RecordInfo_RecordInit(IRecordInfo *iface, PVOID pvNew) +{ + ok(0, "enexpected call\n"); + return E_NOTIMPL; +} + static BOOL fail_GetSize; /* Whether to fail the GetSize call */ -static HRESULT CALLBACK IRecordInfoImpl_RecordClear(IRecordInfo *iface, PVOID pvExisting) +static HRESULT WINAPI RecordInfo_RecordClear(IRecordInfo *iface, PVOID pvExisting) { IRecordInfoImpl* This = impl_from_IRecordInfo(iface); This->clearCalled++; return S_OK; } -static HRESULT CALLBACK IRecordInfoImpl_GetSize(IRecordInfo *iface, ULONG* size) +static HRESULT WINAPI RecordInfo_RecordCopy(IRecordInfo *iface, PVOID pvExisting, PVOID pvNew) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetGuid(IRecordInfo *iface, GUID *pguid) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetName(IRecordInfo *iface, BSTR *pbstrName) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetSize(IRecordInfo *iface, ULONG* size) { IRecordInfoImpl* This = impl_from_IRecordInfo(iface); This->sizeCalled++; @@ -141,37 +166,107 @@ return S_OK; } -static HRESULT CALLBACK IRecordInfoImpl_Dummy(IRecordInfo *iface) +static HRESULT WINAPI RecordInfo_GetTypeInfo(IRecordInfo *iface, ITypeInfo **ppTypeInfo) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetField(IRecordInfo *iface, PVOID pvData, + LPCOLESTR szFieldName, VARIANT *pvarField) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetFieldNoCopy(IRecordInfo *iface, PVOID pvData, + LPCOLESTR szFieldName, VARIANT *pvarField, PVOID *ppvDataCArray) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_PutField(IRecordInfo *iface, ULONG wFlags, PVOID pvData, + LPCOLESTR szFieldName, VARIANT *pvarField) { - trace("Called an unexpected IRecordInfo method - please report!\n"); - /* Quit because we'll just crash anyway */ - fflush(NULL); - exit(255); -} - -static const IRecordInfoVtbl IRecordInfoImpl_VTable = -{ - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_AddRef, - IRecordInfoImpl_Release, - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_RecordClear, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - IRecordInfoImpl_GetSize, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy, - (PVOID)IRecordInfoImpl_Dummy + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_PutFieldNoCopy(IRecordInfo *iface, ULONG wFlags, + PVOID pvData, LPCOLESTR szFieldName, VARIANT *pvarField) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_GetFieldNames(IRecordInfo *iface, ULONG *pcNames, + BSTR *rgBstrNames) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static BOOL WINAPI RecordInfo_IsMatchingType(IRecordInfo *iface, IRecordInfo *info2) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static PVOID WINAPI RecordInfo_RecordCreate(IRecordInfo *iface) +{ + ok(0, "unexpected call\n"); + return NULL; +} + +static HRESULT WINAPI RecordInfo_RecordCreateCopy(IRecordInfo *iface, PVOID pvSource, + PVOID *ppvDest) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static HRESULT WINAPI RecordInfo_RecordDestroy(IRecordInfo *iface, PVOID pvRecord) +{ + ok(0, "unexpected call\n"); + return E_NOTIMPL; +} + +static const IRecordInfoVtbl RecordInfoVtbl = +{ + RecordInfo_QueryInterface, + RecordInfo_AddRef, + RecordInfo_Release, + RecordInfo_RecordInit, + RecordInfo_RecordClear, + RecordInfo_RecordCopy, + RecordInfo_GetGuid, + RecordInfo_GetName, + RecordInfo_GetSize, + RecordInfo_GetTypeInfo, + RecordInfo_GetField, + RecordInfo_GetFieldNoCopy, + RecordInfo_PutField, + RecordInfo_PutFieldNoCopy, + RecordInfo_GetFieldNames, + RecordInfo_IsMatchingType, + RecordInfo_RecordCreate, + RecordInfo_RecordCreateCopy, + RecordInfo_RecordDestroy }; +static IRecordInfoImpl *IRecordInfoImpl_Construct(void) +{ + IRecordInfoImpl *rec; + + rec = HeapAlloc(GetProcessHeap(), 0, sizeof(IRecordInfoImpl)); + rec->IRecordInfo_iface.lpVtbl = &RecordInfoVtbl; + rec->ref = START_REF_COUNT; + rec->clearCalled = 0; + rec->sizeCalled = 0; + return rec; +} + static DWORD SAFEARRAY_GetVTSize(VARTYPE vt) { switch (vt) diff -Nru wine-compholio-1.7.10~daily/dlls/wbemprox/builtin.c wine-compholio-1.7.10~daily/dlls/wbemprox/builtin.c --- wine-compholio-1.7.10~daily/dlls/wbemprox/builtin.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wbemprox/builtin.c 2014-01-11 03:17:37.000000000 +0000 @@ -364,6 +364,7 @@ { prop_lastbootuptimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localdatetimeW, CIM_DATETIME|COL_FLAG_DYNAMIC }, { prop_localeW, CIM_STRING|COL_FLAG_DYNAMIC }, + { prop_nameW, CIM_STRING }, { prop_osarchitectureW, CIM_STRING }, { prop_oslanguageW, CIM_UINT32, VT_I4 }, { prop_osproductsuiteW, CIM_UINT32, VT_I4 }, @@ -520,6 +521,11 @@ {'3','2','-','b','i','t',0}; static const WCHAR os_64bitW[] = {'6','4','-','b','i','t',0}; +static const WCHAR os_nameW[] = + {'M','i','c','r','o','s','o','f','t',' ','W','i','n','d','o','w','s',' ','X','P',' ', + 'P','r','o','f','e','s','s','i','o','n','a','l','|','C',':','\\','W','I','N','D','O','W','S', + '|','\\','D','e','v','i','c','e','\\','H','a','r','d','d','i','s','k','0', + '\\','P','a','r','t','i','t','i','o','n','1',0}; static const WCHAR os_versionW[] = {'5','.','1','.','2','6','0','0',0}; static const WCHAR sounddevice_productnameW[] = @@ -633,6 +639,7 @@ const WCHAR *lastbootuptime; const WCHAR *localdatetime; const WCHAR *locale; + const WCHAR *name; const WCHAR *osarchitecture; UINT32 oslanguage; UINT32 osproductsuite; @@ -1943,6 +1950,7 @@ rec->lastbootuptime = get_lastbootuptime(); rec->localdatetime = get_localdatetime(); rec->locale = get_locale(); + rec->name = os_nameW; rec->osarchitecture = get_osarchitecture(); rec->oslanguage = GetSystemDefaultLangID(); rec->osproductsuite = 2461140; /* Windows XP Professional */ diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/device.c wine-compholio-1.7.10~daily/dlls/wined3d/device.c --- wine-compholio-1.7.10~daily/dlls/wined3d/device.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/device.c 2014-01-11 03:17:37.000000000 +0000 @@ -580,8 +580,8 @@ desc.format = WINED3DFMT_B5G6R5_UNORM; desc.multisample_type = WINED3D_MULTISAMPLE_NONE; desc.multisample_quality = 0; - desc.usage = 0; - desc.pool = WINED3D_POOL_SYSTEM_MEM; + desc.usage = WINED3DUSAGE_DYNAMIC; + desc.pool = WINED3D_POOL_DEFAULT; desc.width = bm.bmWidth; desc.height = bm.bmHeight; desc.depth = 1; @@ -3809,8 +3809,8 @@ desc.format = WINED3DFMT_B8G8R8A8_UNORM; desc.multisample_type = WINED3D_MULTISAMPLE_NONE; desc.multisample_quality = 0; - desc.usage = 0; - desc.pool = WINED3D_POOL_SYSTEM_MEM; + desc.usage = WINED3DUSAGE_DYNAMIC; + desc.pool = WINED3D_POOL_DEFAULT; desc.width = cursor_image->resource.width; desc.height = cursor_image->resource.height; desc.depth = 1; @@ -3825,7 +3825,7 @@ } surface = surface_from_resource(wined3d_texture_get_sub_resource(texture, 0)); - if (FAILED(wined3d_surface_map(surface, &map_desc, NULL, 0))) + if (FAILED(wined3d_surface_map(surface, &map_desc, NULL, WINED3D_MAP_DISCARD))) { ERR("Failed to map destination surface.\n"); wined3d_texture_decref(texture); diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/surface.c wine-compholio-1.7.10~daily/dlls/wined3d/surface.c --- wine-compholio-1.7.10~daily/dlls/wined3d/surface.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/surface.c 2014-01-11 03:17:37.000000000 +0000 @@ -514,21 +514,30 @@ return WINED3D_OK; } -static void surface_get_memory(const struct wined3d_surface *surface, struct wined3d_bo_address *data) +static void surface_get_memory(const struct wined3d_surface *surface, struct wined3d_bo_address *data, + DWORD location) { - if (surface->user_memory) + if (location & SFLAG_INUSERMEM) { data->addr = surface->user_memory; data->buffer_object = 0; return; } - if (surface->flags & SFLAG_PBO) + if (location & SFLAG_INSYSMEM) { - data->addr = NULL; - data->buffer_object = surface->pbo; + if (surface->flags & SFLAG_PBO) + { + data->addr = NULL; + data->buffer_object = surface->pbo; + return; + } + data->addr = surface->resource.allocatedMemory; + data->buffer_object = 0; return; } - data->addr = surface->resource.allocatedMemory; + + ERR("Unexpected locations %s.\n", debug_surflocation(location)); + data->addr = NULL; data->buffer_object = 0; } @@ -551,7 +560,7 @@ struct wined3d_context *context; GLenum error; struct wined3d_bo_address data; - surface_get_memory(surface, &data); + surface_get_memory(surface, &data, SFLAG_INSYSMEM); context = context_acquire(surface->resource.device, NULL); @@ -755,12 +764,12 @@ } else { - if (!(surface->flags & SFLAG_INSYSMEM)) + if (!(surface->flags & surface->map_binding)) { TRACE("Palette changed with surface that does not have an up to date system memory copy.\n"); - surface_load_location(surface, SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); } - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); + surface_invalidate_location(surface, ~surface->map_binding); } } @@ -797,47 +806,55 @@ { TRACE("WINED3D_MAP_DISCARD flag passed, marking SYSMEM as up to date.\n"); surface_prepare_system_memory(surface); - surface_validate_location(surface, SFLAG_INSYSMEM); + surface_validate_location(surface, surface->map_binding); } else { if (surface->resource.usage & WINED3DUSAGE_DYNAMIC) WARN_(d3d_perf)("Mapping a dynamic surface without WINED3D_MAP_DISCARD.\n"); - surface_load_location(surface, SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); } if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); + surface_invalidate_location(surface, ~surface->map_binding); - if (surface->flags & SFLAG_PBO) + switch (surface->map_binding) { - BYTE *ret; - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; + case SFLAG_INUSERMEM: + return surface->user_memory; - context = context_acquire(device, NULL); - gl_info = context->gl_info; + case SFLAG_INSYSMEM: + if (surface->flags & SFLAG_PBO) + { + BYTE *ret; + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - checkGLcall("glBindBufferARB"); + context = context_acquire(device, NULL); + gl_info = context->gl_info; - ret = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); - checkGLcall("glMapBufferARB"); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + checkGLcall("glBindBufferARB"); - /* Make sure the PBO isn't set anymore in order not to break non-PBO - * calls. */ - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glBindBufferARB"); + ret = GL_EXTCALL(glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, GL_READ_WRITE_ARB)); + checkGLcall("glMapBufferARB"); - context_release(context); - return ret; - } + /* Make sure the PBO isn't set anymore in order not to break non-PBO + * calls. */ + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glBindBufferARB"); - if (surface->user_memory) - return surface->user_memory; + context_release(context); + return ret; + } + + return surface->resource.allocatedMemory; - return surface->resource.allocatedMemory; + default: + ERR("Unexpected map binding %s.\n", debug_surflocation(surface->map_binding)); + return NULL; + } } static void surface_unmap(struct wined3d_surface *surface) @@ -848,21 +865,32 @@ memset(&surface->lockedRect, 0, sizeof(surface->lockedRect)); - if (surface->flags & SFLAG_PBO) + switch (surface->map_binding) { - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; + case SFLAG_INUSERMEM: + break; + + case SFLAG_INSYSMEM: + if (surface->flags & SFLAG_PBO) + { + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; - TRACE("Freeing PBO memory.\n"); + TRACE("Freeing PBO memory.\n"); - context = context_acquire(device, NULL); - gl_info = context->gl_info; + context = context_acquire(device, NULL); + gl_info = context->gl_info; - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); - GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); - GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); - checkGLcall("glUnmapBufferARB"); - context_release(context); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, surface->pbo)); + GL_EXTCALL(glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB)); + GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0)); + checkGLcall("glUnmapBufferARB"); + context_release(context); + } + break; + + default: + ERR("Unexpected map binding %s.\n", debug_surflocation(surface->map_binding)); } TRACE("dirtyfied %u.\n", surface->flags & (SFLAG_INDRAWABLE | SFLAG_INTEXTURE) ? 0 : 1); @@ -1325,9 +1353,6 @@ surface->resource.allocatedMemory = surface->resource.heap_memory; } - surface_validate_location(surface, SFLAG_INSYSMEM); - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); - return TRUE; } @@ -1354,7 +1379,10 @@ * and all flags get lost */ if (!(surface->flags & SFLAG_PBO)) + { surface_init_sysmem(surface); + surface_validate_location(surface, surface->map_binding); + } /* We also get here when the ddraw swapchain is destroyed, for example * for a mode switch. In this case this surface won't necessarily be * an implicit surface. We have to mark it lost so that the @@ -1363,9 +1391,9 @@ } else { - surface_load_location(surface, SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); } - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); + surface_invalidate_location(surface, ~surface->map_binding); surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED); context = context_acquire(device, NULL); @@ -1497,10 +1525,18 @@ TRACE("surface %p, rect %s, flags %#x.\n", surface, wine_dbgstr_rect(rect), flags); - if (surface->user_memory) - return surface->user_memory; + switch (surface->map_binding) + { + case SFLAG_INUSERMEM: + return surface->user_memory; + + case SFLAG_INSYSMEM: + return surface->resource.allocatedMemory; - return surface->resource.allocatedMemory; + default: + ERR("Unexpected map binding %s.\n", debug_surflocation(surface->map_binding)); + return NULL; + } } static void gdi_surface_unmap(struct wined3d_surface *surface) @@ -1545,7 +1581,8 @@ /* This call just downloads data, the caller is responsible for binding the * correct texture. */ /* Context activation is done by the caller. */ -static void surface_download_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info) +static void surface_download_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, + DWORD dst_location) { const struct wined3d_format *format = surface->resource.format; struct wined3d_bo_address data; @@ -1557,7 +1594,7 @@ return; } - surface_get_memory(surface, &data); + surface_get_memory(surface, &data, dst_location); if (format->flags & WINED3DFMT_FLAG_COMPRESSED) { @@ -2060,7 +2097,7 @@ surface_load_location(dst_surface, SFLAG_INTEXTURE); wined3d_texture_bind(dst_surface->container, context, FALSE); - surface_get_memory(src_surface, &data); + surface_get_memory(src_surface, &data, src_surface->flags); src_pitch = wined3d_surface_get_pitch(src_surface); surface_upload_data(dst_surface, gl_info, src_format, src_rect, src_pitch, dst_point, FALSE, &data); @@ -2284,8 +2321,8 @@ /* To perform the color key conversion we need a sysmem copy of * the surface. Make sure we have it. */ - surface_load_location(surface, SFLAG_INSYSMEM); - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); + surface_invalidate_location(surface, ~surface->map_binding); /* Switching color keying on / off may change the internal format. */ if (ck_changed) surface_force_reload(surface); @@ -2743,6 +2780,8 @@ surface->flags &= ~SFLAG_NONPOW2; surface->user_memory = mem; + if (surface->user_memory) + surface->map_binding = SFLAG_INUSERMEM; surface->pitch = pitch; surface->resource.format = format; surface->resource.multisample_type = multisample_type; @@ -2760,11 +2799,12 @@ return hr; } surface->resource.allocatedMemory = surface->dib.bitmap_data; - surface->flags |= SFLAG_INSYSMEM; } else if (!surface_init_sysmem(surface)) return E_OUTOFMEMORY; + surface_validate_location(surface, surface->map_binding); + return WINED3D_OK; } @@ -3307,7 +3347,7 @@ return WINED3D_OK; } -static void read_from_framebuffer(struct wined3d_surface *surface) +static void read_from_framebuffer(struct wined3d_surface *surface, DWORD dst_location) { struct wined3d_device *device = surface->resource.device; const struct wined3d_gl_info *gl_info; @@ -3322,7 +3362,7 @@ struct wined3d_bo_address data; UINT pitch = wined3d_surface_get_pitch(surface); - surface_get_memory(surface, &data); + surface_get_memory(surface, &data, dst_location); context = context_acquire(device, surface); context_apply_blit_state(context, device); @@ -4321,7 +4361,7 @@ } static void surface_blt_to_drawable(const struct wined3d_device *device, - enum wined3d_texture_filter_type filter, BOOL color_key, + enum wined3d_texture_filter_type filter, BOOL alpha_test, struct wined3d_surface *src_surface, const RECT *src_rect_in, struct wined3d_surface *dst_surface, const RECT *dst_rect_in) { @@ -4348,7 +4388,7 @@ device->blitter->set_shader(device->blit_priv, context, src_surface); - if (color_key) + if (alpha_test) { gl_info->gl_ops.gl.p_glEnable(GL_ALPHA_TEST); checkGLcall("glEnable(GL_ALPHA_TEST)"); @@ -4372,7 +4412,7 @@ draw_textured_quad(src_surface, context, &src_rect, &dst_rect, filter); - if (color_key) + if (alpha_test) { gl_info->gl_ops.gl.p_glDisable(GL_ALPHA_TEST); checkGLcall("glDisable(GL_ALPHA_TEST)"); @@ -4571,7 +4611,8 @@ src_surface->container->color_key_flags &= ~WINEDDSD_CKSRCBLT; } - surface_blt_to_drawable(device, filter, flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE), + surface_blt_to_drawable(device, filter, + flags & (WINEDDBLT_KEYSRC | WINEDDBLT_KEYSRCOVERRIDE | WINEDDBLT_ALPHATEST), src_surface, src_rect, dst_surface, dst_rect); /* Restore the color key parameters */ @@ -4864,7 +4905,7 @@ } static void surface_load_sysmem(struct wined3d_surface *surface, - const struct wined3d_gl_info *gl_info) + const struct wined3d_gl_info *gl_info, DWORD dst_location) { surface_prepare_system_memory(surface); @@ -4881,7 +4922,7 @@ context = context_acquire(device, NULL); wined3d_texture_bind_and_dirtify(surface->container, context, !(surface->flags & SFLAG_INTEXTURE)); - surface_download_data(surface, gl_info); + surface_download_data(surface, gl_info, dst_location); context_release(context); @@ -4890,7 +4931,7 @@ if (surface->flags & SFLAG_INDRAWABLE) { - read_from_framebuffer(surface); + read_from_framebuffer(surface, dst_location); return; } @@ -4978,20 +5019,20 @@ if (srgb) { - if ((surface->flags & (SFLAG_INTEXTURE | SFLAG_INSYSMEM)) == SFLAG_INTEXTURE) + if ((surface->flags & (SFLAG_INTEXTURE | surface->map_binding)) == SFLAG_INTEXTURE) { /* Performance warning... */ FIXME("Downloading RGB surface %p to reload it as sRGB.\n", surface); - surface_load_location(surface, SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); } } else { - if ((surface->flags & (SFLAG_INSRGBTEX | SFLAG_INSYSMEM)) == SFLAG_INSRGBTEX) + if ((surface->flags & (SFLAG_INSRGBTEX | surface->map_binding)) == SFLAG_INSRGBTEX) { /* Performance warning... */ FIXME("Downloading sRGB surface %p to reload it as RGB.\n", surface); - surface_load_location(surface, SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); } } @@ -5027,7 +5068,7 @@ surface_remove_pbo(surface, gl_info); } - surface_get_memory(surface, &data); + surface_get_memory(surface, &data, surface->flags); if (format.convert) { /* This code is entered for texture formats which need a fixup. */ @@ -5149,8 +5190,9 @@ switch (location) { + case SFLAG_INUSERMEM: case SFLAG_INSYSMEM: - surface_load_sysmem(surface, gl_info); + surface_load_sysmem(surface, gl_info, location); break; case SFLAG_INDRAWABLE: @@ -6396,6 +6438,8 @@ surface->resource.allocatedMemory = surface->dib.bitmap_data; } + surface->map_binding = SFLAG_INSYSMEM; + return hr; } diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/swapchain.c wine-compholio-1.7.10~daily/dlls/wined3d/swapchain.c --- wine-compholio-1.7.10~daily/dlls/wined3d/swapchain.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/swapchain.c 2014-01-11 03:17:37.000000000 +0000 @@ -432,7 +432,7 @@ RECT rect = {0, 0, src_surface->resource.width, src_surface->resource.height}; /* Blit the logo into the upper left corner of the drawable. */ - wined3d_surface_blt(back_buffer, &rect, src_surface, &rect, WINEDDBLT_KEYSRC, + wined3d_surface_blt(back_buffer, &rect, src_surface, &rect, WINEDDBLT_ALPHATEST, NULL, WINED3D_TEXF_POINT); } @@ -453,7 +453,7 @@ if (swapchain->desc.windowed) MapWindowPoints(NULL, swapchain->win_handle, (POINT *)&destRect, 2); - wined3d_surface_blt(back_buffer, &destRect, cursor, NULL, WINEDDBLT_KEYSRC, + wined3d_surface_blt(back_buffer, &destRect, cursor, NULL, WINEDDBLT_ALPHATEST, NULL, WINED3D_TEXF_POINT); } diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/texture.c wine-compholio-1.7.10~daily/dlls/wined3d/texture.c --- wine-compholio-1.7.10~daily/dlls/wined3d/texture.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/texture.c 2014-01-11 03:17:37.000000000 +0000 @@ -735,8 +735,8 @@ { struct wined3d_surface *surface = surface_from_resource(sub_resource); - surface_load_location(surface, SFLAG_INSYSMEM); - surface_invalidate_location(surface, ~SFLAG_INSYSMEM); + surface_load_location(surface, surface->map_binding); + surface_invalidate_location(surface, ~surface->map_binding); } static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource) diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/utils.c wine-compholio-1.7.10~daily/dlls/wined3d/utils.c --- wine-compholio-1.7.10~daily/dlls/wined3d/utils.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/utils.c 2014-01-11 03:17:37.000000000 +0000 @@ -2795,7 +2795,7 @@ } const char *debug_surflocation(DWORD flag) { - char buf[128]; + char buf[140]; buf[0] = 0; if (flag & SFLAG_INSYSMEM) strcat(buf, " | SFLAG_INSYSMEM"); /* 17 */ @@ -2804,6 +2804,7 @@ if (flag & SFLAG_INSRGBTEX) strcat(buf, " | SFLAG_INSRGBTEX"); /* 18 */ if (flag & SFLAG_INRB_MULTISAMPLE) strcat(buf, " | SFLAG_INRB_MULTISAMPLE"); /* 25 */ if (flag & SFLAG_INRB_RESOLVED) strcat(buf, " | SFLAG_INRB_RESOLVED"); /* 22 */ + if (flag & SFLAG_INUSERMEM) strcat(buf, " | SFLAG_INUSERMEM"); /* 18 */ return wine_dbg_sprintf("%s", buf[0] ? buf + 3 : "0"); } diff -Nru wine-compholio-1.7.10~daily/dlls/wined3d/wined3d_private.h wine-compholio-1.7.10~daily/dlls/wined3d/wined3d_private.h --- wine-compholio-1.7.10~daily/dlls/wined3d/wined3d_private.h 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/wined3d/wined3d_private.h 2014-01-11 03:17:37.000000000 +0000 @@ -1083,7 +1083,8 @@ DWORD lastWasPow2Texture : 8; /* MAX_TEXTURES, 8 */ DWORD fixed_function_usage_map : 8; /* MAX_TEXTURES, 8 */ DWORD lowest_disabled_stage : 4; /* Max MAX_TEXTURES, 8 */ - DWORD padding : 20; + DWORD rebind_fbo : 1; + DWORD padding : 19; DWORD shader_update_mask; DWORD constant_update_mask; DWORD numbered_array_mask; @@ -1116,7 +1117,6 @@ struct fbo_entry *current_fbo; GLuint fbo_read_binding; GLuint fbo_draw_binding; - BOOL rebind_fbo; struct wined3d_surface **blit_targets; GLenum *draw_buffers; DWORD draw_buffers_mask; /* Enabled draw buffers, 31 max. */ @@ -2192,7 +2192,7 @@ struct wined3d_texture *container; struct wined3d_swapchain *swapchain; struct wined3d_palette *palette; /* D3D7 style palette handling */ - DWORD draw_binding; + DWORD draw_binding, map_binding; void *user_memory; DWORD flags; @@ -2298,12 +2298,13 @@ #define SFLAG_SRGBALLOCATED 0x00001000 /* A sRGB GL texture is allocated for this surface. */ #define SFLAG_PBO 0x00002000 /* The surface has a PBO. */ #define SFLAG_INSYSMEM 0x00004000 /* The system memory copy is current. */ -#define SFLAG_INTEXTURE 0x00008000 /* The GL texture is current. */ -#define SFLAG_INSRGBTEX 0x00010000 /* The GL sRGB texture is current. */ -#define SFLAG_INDRAWABLE 0x00020000 /* The GL drawable is current. */ -#define SFLAG_INRB_MULTISAMPLE 0x00040000 /* The multisample renderbuffer is current. */ -#define SFLAG_INRB_RESOLVED 0x00080000 /* The resolved renderbuffer is current. */ -#define SFLAG_DISCARDED 0x00100000 /* Surface was discarded, allocating new location is enough. */ +#define SFLAG_INUSERMEM 0x00008000 /* The user memory copy is current. */ +#define SFLAG_INTEXTURE 0x00010000 /* The GL texture is current. */ +#define SFLAG_INSRGBTEX 0x00020000 /* The GL sRGB texture is current. */ +#define SFLAG_INDRAWABLE 0x00040000 /* The GL drawable is current. */ +#define SFLAG_INRB_MULTISAMPLE 0x00080000 /* The multisample renderbuffer is current. */ +#define SFLAG_INRB_RESOLVED 0x00100000 /* The resolved renderbuffer is current. */ +#define SFLAG_DISCARDED 0x00200000 /* Surface was discarded, allocating new location is enough. */ /* In some conditions the surface memory must not be freed: * SFLAG_CONVERTED: Converting the data back would take too long @@ -2320,6 +2321,7 @@ SFLAG_PIN_SYSMEM) #define SFLAG_LOCATIONS (SFLAG_INSYSMEM | \ + SFLAG_INUSERMEM | \ SFLAG_INTEXTURE | \ SFLAG_INSRGBTEX | \ SFLAG_INDRAWABLE | \ diff -Nru wine-compholio-1.7.10~daily/dlls/winemac.drv/cocoa_app.m wine-compholio-1.7.10~daily/dlls/winemac.drv/cocoa_app.m --- wine-compholio-1.7.10~daily/dlls/winemac.drv/cocoa_app.m 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/winemac.drv/cocoa_app.m 2014-01-11 03:17:37.000000000 +0000 @@ -709,87 +709,90 @@ - (BOOL) setMode:(CGDisplayModeRef)mode forDisplay:(CGDirectDisplayID)displayID { BOOL ret = FALSE; - BOOL active = [NSApp isActive]; NSNumber* displayIDKey = [NSNumber numberWithUnsignedInt:displayID]; - CGDisplayModeRef currentMode = NULL, originalMode; - - if (!active) - currentMode = CGDisplayModeRetain((CGDisplayModeRef)[latentDisplayModes objectForKey:displayIDKey]); - if (!currentMode) - currentMode = CGDisplayCopyDisplayMode(displayID); - if (!currentMode) // Invalid display ID - return FALSE; - - if ([self mode:mode matchesMode:currentMode]) // Already there! - { - CGDisplayModeRelease(currentMode); - return TRUE; - } - - mode = [self modeMatchingMode:mode forDisplay:displayID]; - if (!mode) - { - CGDisplayModeRelease(currentMode); - return FALSE; - } + CGDisplayModeRef originalMode; originalMode = (CGDisplayModeRef)[originalDisplayModes objectForKey:displayIDKey]; - if (!originalMode) - originalMode = currentMode; - if ([self mode:mode matchesMode:originalMode]) + if (originalMode && [self mode:mode matchesMode:originalMode]) { if ([originalDisplayModes count] == 1) // If this is the last changed display, do a blanket reset { - if (active) - { - CGRestorePermanentDisplayConfiguration(); - if (!displaysCapturedForFullscreen) - CGReleaseAllDisplays(); - } + CGRestorePermanentDisplayConfiguration(); + if (!displaysCapturedForFullscreen) + CGReleaseAllDisplays(); [originalDisplayModes removeAllObjects]; - [latentDisplayModes removeAllObjects]; ret = TRUE; } else // ... otherwise, try to restore just the one display { - if (active) - ret = (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr); - else + mode = [self modeMatchingMode:mode forDisplay:displayID]; + if (mode && CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr) { - [latentDisplayModes removeObjectForKey:displayIDKey]; + [originalDisplayModes removeObjectForKey:displayIDKey]; ret = TRUE; } - if (ret) - [originalDisplayModes removeObjectForKey:displayIDKey]; } } else { + BOOL active = [NSApp isActive]; + CGDisplayModeRef currentMode; + + currentMode = CGDisplayModeRetain((CGDisplayModeRef)[latentDisplayModes objectForKey:displayIDKey]); + if (!currentMode) + currentMode = CGDisplayCopyDisplayMode(displayID); + if (!currentMode) // Invalid display ID + return FALSE; + + if ([self mode:mode matchesMode:currentMode]) // Already there! + { + CGDisplayModeRelease(currentMode); + return TRUE; + } + + CGDisplayModeRelease(currentMode); + currentMode = NULL; + + mode = [self modeMatchingMode:mode forDisplay:displayID]; + if (!mode) + return FALSE; + if ([originalDisplayModes count] || displaysCapturedForFullscreen || !active || CGCaptureAllDisplays() == CGDisplayNoErr) { if (active) - ret = (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr); + { + // If we get here, we have the displays captured. If we don't + // know the original mode of the display, the current mode must + // be the original. We should re-query the current mode since + // another process could have changed it between when we last + // checked and when we captured the displays. + if (!originalMode) + originalMode = currentMode = CGDisplayCopyDisplayMode(displayID); + + if (originalMode) + ret = (CGDisplaySetDisplayMode(displayID, mode, NULL) == CGDisplayNoErr); + if (ret && !(currentMode && [self mode:mode matchesMode:currentMode])) + [originalDisplayModes setObject:(id)originalMode forKey:displayIDKey]; + else if (![originalDisplayModes count]) + { + CGRestorePermanentDisplayConfiguration(); + if (!displaysCapturedForFullscreen) + CGReleaseAllDisplays(); + } + + if (currentMode) + CGDisplayModeRelease(currentMode); + } else { [latentDisplayModes setObject:(id)mode forKey:displayIDKey]; ret = TRUE; } - if (ret) - [originalDisplayModes setObject:(id)originalMode forKey:displayIDKey]; - else if (![originalDisplayModes count]) - { - CGRestorePermanentDisplayConfiguration(); - [latentDisplayModes removeAllObjects]; - if (!displaysCapturedForFullscreen) - CGReleaseAllDisplays(); - } } } - CGDisplayModeRelease(currentMode); - if (ret) [self adjustWindowLevels]; @@ -2064,13 +2067,14 @@ - (void)applicationDidBecomeActive:(NSNotification *)notification { NSNumber* displayID; + NSDictionary* modesToRealize = [latentDisplayModes autorelease]; - for (displayID in latentDisplayModes) + latentDisplayModes = [[NSMutableDictionary alloc] init]; + for (displayID in modesToRealize) { - CGDisplayModeRef mode = (CGDisplayModeRef)[latentDisplayModes objectForKey:displayID]; + CGDisplayModeRef mode = (CGDisplayModeRef)[modesToRealize objectForKey:displayID]; [self setMode:mode forDisplay:[displayID unsignedIntValue]]; } - [latentDisplayModes removeAllObjects]; [self updateCursorClippingState]; diff -Nru wine-compholio-1.7.10~daily/dlls/winemac.drv/display.c wine-compholio-1.7.10~daily/dlls/winemac.drv/display.c --- wine-compholio-1.7.10~daily/dlls/winemac.drv/display.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/winemac.drv/display.c 2014-01-11 03:17:37.000000000 +0000 @@ -235,7 +235,9 @@ struct macdrv_display *displays; int num_displays; CFArrayRef display_modes; - CFIndex count, i, safe; + CFIndex count, i, safe, best; + CGDisplayModeRef best_display_mode; + uint32_t best_io_flags; TRACE("%s %p %p 0x%08x %p\n", debugstr_w(devname), devmode, hwnd, flags, lpvoid); @@ -299,6 +301,7 @@ TRACE("\n"); safe = -1; + best_display_mode = NULL; count = CFArrayGetCount(display_modes); for (i = 0; i < count; i++) { @@ -334,57 +337,78 @@ if (devmode->dmDisplayFrequency != (DWORD)refresh_rate) continue; } + if (devmode->dmFields & DM_DISPLAYFLAGS) + { + if (!(devmode->dmDisplayFlags & DM_INTERLACED) != !(io_flags & kDisplayModeInterlacedFlag)) + continue; + } + else if (best_display_mode) + { + if (io_flags & kDisplayModeInterlacedFlag && !(best_io_flags & kDisplayModeInterlacedFlag)) + continue; + else if (!(io_flags & kDisplayModeInterlacedFlag) && best_io_flags & kDisplayModeInterlacedFlag) + goto better; + } if (devmode->dmFields & DM_DISPLAYFIXEDOUTPUT) { if (!(devmode->dmDisplayFixedOutput == DMDFO_STRETCH) != !(io_flags & kDisplayModeStretchedFlag)) continue; } - if (devmode->dmFields & DM_DISPLAYFLAGS) + else if (best_display_mode) { - if (!(devmode->dmDisplayFlags & DM_INTERLACED) != !(io_flags & kDisplayModeInterlacedFlag)) + if (io_flags & kDisplayModeStretchedFlag && !(best_io_flags & kDisplayModeStretchedFlag)) continue; + else if (!(io_flags & kDisplayModeStretchedFlag) && best_io_flags & kDisplayModeStretchedFlag) + goto better; } + if (best_display_mode) + continue; + +better: + best_display_mode = display_mode; + best = safe; + best_io_flags = io_flags; + } + + if (best_display_mode) + { /* we have a valid mode */ - TRACE("Requested display settings match mode %ld\n", safe); + TRACE("Requested display settings match mode %ld\n", best); if ((flags & CDS_UPDATEREGISTRY) && !write_registry_settings(devmode)) { WARN("Failed to update registry\n"); ret = DISP_CHANGE_NOTUPDATED; - break; } + else if (flags & (CDS_TEST | CDS_NORESET)) + ret = DISP_CHANGE_SUCCESSFUL; + else if (macdrv_set_display_mode(&displays[0], best_display_mode)) + { + int mode_bpp = display_mode_bits_per_pixel(best_display_mode); + size_t width = CGDisplayModeGetWidth(best_display_mode); + size_t height = CGDisplayModeGetHeight(best_display_mode); - if (flags & (CDS_TEST | CDS_NORESET)) + SendMessageW(GetDesktopWindow(), WM_MACDRV_UPDATE_DESKTOP_RECT, mode_bpp, + MAKELPARAM(width, height)); ret = DISP_CHANGE_SUCCESSFUL; + } else { - if (macdrv_set_display_mode(&displays[0], display_mode)) - { - SendMessageW(GetDesktopWindow(), WM_MACDRV_UPDATE_DESKTOP_RECT, mode_bpp, - MAKELPARAM(width, height)); - ret = DISP_CHANGE_SUCCESSFUL; - } - else - { - WARN("Failed to set display mode\n"); - ret = DISP_CHANGE_FAILED; - } + WARN("Failed to set display mode\n"); + ret = DISP_CHANGE_FAILED; } - - break; } - - CFRelease(display_modes); - macdrv_free_displays(displays); - - if (i >= count) + else { /* no valid modes found */ ERR("No matching mode found %ux%ux%d @%u!\n", devmode->dmPelsWidth, devmode->dmPelsHeight, bpp, devmode->dmDisplayFrequency); } + CFRelease(display_modes); + macdrv_free_displays(displays); + return ret; } diff -Nru wine-compholio-1.7.10~daily/dlls/ws2_32/tests/sock.c wine-compholio-1.7.10~daily/dlls/ws2_32/tests/sock.c --- wine-compholio-1.7.10~daily/dlls/ws2_32/tests/sock.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/dlls/ws2_32/tests/sock.c 2014-01-11 03:17:37.000000000 +0000 @@ -7356,7 +7356,7 @@ if (!pWSALookupServiceBeginW || !pWSALookupServiceEnd || !pWSALookupServiceNextW) { - win_skip("WSALookupServiceBeginW or WSALookupServiceEnd or WSALookupServiceNextW not found"); + win_skip("WSALookupServiceBeginW or WSALookupServiceEnd or WSALookupServiceNextW not found\n"); return; } diff -Nru wine-compholio-1.7.10~daily/include/dmusici.h wine-compholio-1.7.10~daily/include/dmusici.h --- wine-compholio-1.7.10~daily/include/dmusici.h 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/include/dmusici.h 2014-01-11 03:17:37.000000000 +0000 @@ -63,7 +63,6 @@ DEFINE_GUID(CLSID_DirectMusicSection, 0x3f037241,0x414e,0x11d1,0xa7,0xce,0x00,0xa0,0xc9,0x13,0xf7,0x3c); DEFINE_GUID(CLSID_DirectMusicAuditionTrack, 0xd2ac2897,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); DEFINE_GUID(CLSID_DirectMusicSegTriggerTrack, 0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x00,0x60,0x08,0x93,0xb1,0xb6); -DEFINE_GUID(CLSID_DirectMusicAudioPath, 0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); DEFINE_GUID(CLSID_DirectMusicTemplate, 0xd30bcc65,0x60e8,0x11d1,0xa7,0xce,0x00,0xa0,0xc9,0x13,0xf7,0x3c); DEFINE_GUID(CLSID_DirectMusicScriptAutoImpSegment, 0x4062c116,0x0270,0x11d3,0x8b,0xcb,0x00,0x60,0x08,0x93,0xb1,0xb6); DEFINE_GUID(CLSID_AudioVBScript, 0x4ee17959,0x931e,0x49e4,0xa2,0xc6,0x97,0x7e,0xcf,0x36,0x28,0xf3); diff -Nru wine-compholio-1.7.10~daily/include/wine/wined3d.h wine-compholio-1.7.10~daily/include/wine/wined3d.h --- wine-compholio-1.7.10~daily/include/wine/wined3d.h 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/include/wine/wined3d.h 2014-01-11 03:17:37.000000000 +0000 @@ -1268,6 +1268,7 @@ #define WINEDDBLT_WAIT 0x01000000 #define WINEDDBLT_DEPTHFILL 0x02000000 #define WINEDDBLT_DONOTWAIT 0x08000000 +#define WINEDDBLT_ALPHATEST 0x80000000 /* DDSURFACEDESC.dwFlags */ #define WINEDDSD_CAPS 0x00000001 diff -Nru wine-compholio-1.7.10~daily/tools/makedep.c wine-compholio-1.7.10~daily/tools/makedep.c --- wine-compholio-1.7.10~daily/tools/makedep.c 2014-01-10 03:17:56.000000000 +0000 +++ wine-compholio-1.7.10~daily/tools/makedep.c 2014-01-11 03:17:37.000000000 +0000 @@ -467,6 +467,36 @@ /******************************************************************* + * src_dir_path + */ +static char *src_dir_path( const char *path ) +{ + if (src_dir) return strmake( "%s/%s", src_dir, path ); + return xstrdup( path ); +} + + +/******************************************************************* + * top_obj_dir_path + */ +static char *top_obj_dir_path( const char *path ) +{ + if (top_obj_dir) return strmake( "%s/%s", top_obj_dir, path ); + return xstrdup( path ); +} + + +/******************************************************************* + * top_dir_path + */ +static char *top_dir_path( const char *path ) +{ + if (top_src_dir) return strmake( "%s/%s", top_src_dir, path ); + return top_obj_dir_path( path ); +} + + +/******************************************************************* * init_paths */ static void init_paths(void) @@ -475,8 +505,7 @@ if (src_dir && !strcmp( src_dir, "." )) src_dir = NULL; if (top_src_dir && top_obj_dir && !strcmp( top_src_dir, top_obj_dir )) top_src_dir = NULL; - if (top_src_dir) strarray_insert( &include_args, 0, strmake( "-I%s/include", top_src_dir )); - else if (top_obj_dir) strarray_insert( &include_args, 0, strmake( "-I%s/include", top_obj_dir )); + strarray_insert( &include_args, 0, strmake( "-I%s", top_dir_path( "include" ))); } @@ -638,16 +667,13 @@ /* now try in source dir */ if (src_dir) { - pFile->filename = strmake( "%s/%s", src_dir, pFile->name ); + pFile->filename = src_dir_path( pFile->name ); file = open_file( pFile->filename ); } /* now try parent dir */ if (!file && parent_dir) { - if (src_dir) - pFile->filename = strmake( "%s/%s/%s", src_dir, parent_dir, pFile->name ); - else - pFile->filename = strmake( "%s/%s", parent_dir, pFile->name ); + pFile->filename = src_dir_path( strmake( "%s/%s", parent_dir, pFile->name )); file = open_file( pFile->filename ); } if (!file) fatal_perror( "open %s", pFile->name ); @@ -670,9 +696,7 @@ if (strendswith( pFile->name, ".tab.h" )) { - filename = replace_extension( pFile->name, ".tab.h", ".y" ); - if (src_dir) filename = strmake( "%s/%s", src_dir, filename ); - + filename = src_dir_path( replace_extension( pFile->name, ".tab.h", ".y" )); if ((file = open_file( filename ))) { pFile->sourcename = filename; @@ -688,9 +712,7 @@ if (strendswith( pFile->name, ".h" )) { - filename = replace_extension( pFile->name, ".h", ".idl" ); - if (src_dir) filename = strmake( "%s/%s", src_dir, filename ); - + filename = src_dir_path( replace_extension( pFile->name, ".h", ".idl" )); if ((file = open_file( filename ))) { pFile->sourcename = filename; @@ -701,20 +723,14 @@ } /* now try in source dir */ - if (src_dir) - filename = strmake( "%s/%s", src_dir, pFile->name ); - else - filename = xstrdup( pFile->name ); + filename = src_dir_path( pFile->name ); if ((file = open_file( filename ))) goto found; free( filename ); /* now try in parent source dir */ if (parent_dir) { - if (src_dir) - filename = strmake( "%s/%s/%s", src_dir, parent_dir, pFile->name ); - else - filename = strmake( "%s/%s", parent_dir, pFile->name ); + filename = src_dir_path( strmake( "%s/%s", parent_dir, pFile->name )); if ((file = open_file( filename ))) goto found; free( filename ); } @@ -723,18 +739,11 @@ if (strendswith( pFile->name, ".h" )) { - filename = replace_extension( pFile->name, ".h", ".idl" ); - if (top_src_dir) - filename = strmake( "%s/include/%s", top_src_dir, filename ); - else if (top_obj_dir) - filename = strmake( "%s/include/%s", top_obj_dir, filename ); - else - filename = NULL; - - if (filename && (file = open_file( filename ))) + filename = top_dir_path( strmake( "include/%s", replace_extension( pFile->name, ".h", ".idl" ))); + if ((file = open_file( filename ))) { pFile->sourcename = filename; - pFile->filename = strmake( "%s/include/%s", top_obj_dir, pFile->name ); + pFile->filename = top_obj_dir_path( strmake( "include/%s", pFile->name )); return file; } free( filename ); @@ -744,18 +753,11 @@ if (strendswith( pFile->name, ".h" )) { - filename = replace_extension( pFile->name, ".h", ".h.in" ); - if (top_src_dir) - filename = strmake( "%s/include/%s", top_src_dir, filename ); - else if (top_obj_dir) - filename = strmake( "%s/include/%s", top_obj_dir, filename ); - else - filename = NULL; - - if (filename && (file = open_file( filename ))) + filename = top_dir_path( strmake( "include/%s", replace_extension( pFile->name, ".h", ".h.in" ))); + if ((file = open_file( filename ))) { pFile->sourcename = filename; - pFile->filename = strmake( "%s/include/%s", top_obj_dir, pFile->name ); + pFile->filename = top_obj_dir_path( strmake( "include/%s", pFile->name )); return file; } free( filename ); @@ -765,18 +767,11 @@ if (strendswith( pFile->name, "tmpl.h" )) { - filename = replace_extension( pFile->name, ".h", ".x" ); - if (top_src_dir) - filename = strmake( "%s/include/%s", top_src_dir, filename ); - else if (top_obj_dir) - filename = strmake( "%s/include/%s", top_obj_dir, filename ); - else - filename = NULL; - - if (filename && (file = open_file( filename ))) + filename = top_dir_path( strmake( "include/%s", replace_extension( pFile->name, ".h", ".x" ))); + if ((file = open_file( filename ))) { pFile->sourcename = filename; - pFile->filename = strmake( "%s/include/%s", top_obj_dir, pFile->name ); + pFile->filename = top_obj_dir_path( strmake( "include/%s", pFile->name )); return file; } free( filename ); @@ -1411,11 +1406,7 @@ strarray_add( &includes, "-I." ); if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir )); - if (parent_dir) - { - if (src_dir) strarray_add( &includes, strmake( "-I%s/%s", src_dir, parent_dir )); - else strarray_add( &includes, strmake( "-I%s", parent_dir )); - } + if (parent_dir) strarray_add( &includes, strmake( "-I%s", src_dir_path( parent_dir ))); if (top_src_dir && top_obj_dir) strarray_add( &includes, strmake( "-I%s/include", top_obj_dir )); strarray_addall( &includes, include_args ); @@ -1580,8 +1571,8 @@ if (fontforge && !src_dir) { output( "%s.ttf: %s\n", obj, source->filename ); - output( "\t%s -script %s/fonts/genttf.ff %s $@\n", - fontforge, top_src_dir ? top_src_dir : top_obj_dir, source->filename ); + output( "\t%s -script %s %s $@\n", + fontforge, top_dir_path( "fonts/genttf.ff" ), source->filename ); } free( fontforge ); continue; /* no dependencies */ @@ -1594,8 +1585,8 @@ if (convert && rsvg && icotool && !src_dir) { output( "%s.ico %s.bmp: %s\n", obj, obj, source->filename ); - output( "\tCONVERT=\"%s\" ICOTOOL=\"%s\" RSVG=\"%s\" $(BUILDIMAGE) %s $@\n", - convert, icotool, rsvg, source->filename ); + output( "\tCONVERT=\"%s\" ICOTOOL=\"%s\" RSVG=\"%s\" %s %s $@\n", + convert, icotool, rsvg, top_dir_path( "tools/buildimage" ), source->filename ); } free( convert ); free( rsvg ); @@ -1640,7 +1631,8 @@ { strarray_add( &test_files, source->name ); output( "%s.ok:\n", obj ); - output( "\t$(RUNTEST) $(RUNTESTFLAGS) -T %s -M %s -p %s%s %s && touch $@\n", top_obj_dir, + output( "\t%s $(RUNTESTFLAGS) -T %s -M %s -p %s%s %s && touch $@\n", + top_dir_path( "tools/runtest" ), top_obj_dir, testdll, replace_extension( testdll, ".dll", "_test.exe" ), dllext, obj ); } if (!strcmp( ext, "c" ) && !(source->flags & FLAG_GENERATED)) @@ -1686,7 +1678,7 @@ if (dlldata_files.count) { - output( "dlldata.c: $(WIDL) %s\n", src_dir ? strmake("%s/Makefile.in", src_dir ) : "Makefile.in" ); + output( "dlldata.c: $(WIDL) %s\n", src_dir_path( "Makefile.in" )); output( "\t$(WIDL) --dlldata-only -o $@" ); output_filenames( dlldata_files ); output( "\n" ); @@ -1696,9 +1688,9 @@ { char *importlib = get_expanded_make_variable( "IMPORTLIB" ); struct strarray all_libs = empty_strarray; - char *spec_file = appmode.count ? NULL : replace_extension( module, ".dll", ".spec" ); + char *spec_file = NULL; - if (spec_file && src_dir) spec_file = strmake( "%s/%s", src_dir, spec_file ); + if (!appmode.count) spec_file = src_dir_path( replace_extension( module, ".dll", ".spec" )); for (i = 0; i < delayimports.count; i++) strarray_add( &all_libs, strmake( "-l%s", delayimports.str[i] )); for (i = 0; i < imports.count; i++) @@ -1793,26 +1785,26 @@ char *manext = get_expanded_make_variable( "api_manext" ); output( "manpages::\n" ); - output( "\t$(C2MAN) -w %s -R%s", spec_file, top_obj_dir ); - output_filename( strmake( "-I%s/include", top_src_dir ? top_src_dir : top_obj_dir )); + output( "\t%s -w %s -R%s", top_dir_path( "tools/c2man.pl" ), spec_file, top_obj_dir ); + output_filename( strmake( "-I%s", top_dir_path( "include" ))); output_filename( strmake( "-o %s/documentation/man%s", top_obj_dir, manext ? manext : "3w" )); output_filenames( c2man_files ); output( "\n" ); output( "htmlpages::\n" ); - output( "\t$(C2MAN) -Th -w %s -R%s", spec_file, top_obj_dir ); - output_filename( strmake( "-I%s/include", top_src_dir ? top_src_dir : top_obj_dir )); + output( "\t%s -Th -w %s -R%s", top_dir_path( "tools/c2man.pl" ), spec_file, top_obj_dir ); + output_filename( strmake( "-I%s", top_dir_path( "include" ))); output_filename( strmake( "-o %s/documentation/html", top_obj_dir )); output_filenames( c2man_files ); output( "\n" ); output( "sgmlpages::\n" ); - output( "\t$(C2MAN) -Ts -w %s -R%s", spec_file, top_obj_dir ); - output_filename( strmake( "-I%s/include", top_src_dir ? top_src_dir : top_obj_dir )); + output( "\t%s -Ts -w %s -R%s", top_dir_path( "tools/c2man.pl" ), spec_file, top_obj_dir ); + output_filename( strmake( "-I%s", top_dir_path( "include" ))); output_filename( strmake( "-o %s/documentation/api-guide", top_obj_dir )); output_filenames( c2man_files ); output( "\n" ); output( "xmlpages::\n" ); - output( "\t$(C2MAN) -Tx -w %s -R%s", spec_file, top_obj_dir ); - output_filename( strmake( "-I%s/include", top_src_dir ? top_src_dir : top_obj_dir )); + output( "\t%s -Tx -w %s -R%s", top_dir_path( "tools/c2man.pl" ), spec_file, top_obj_dir ); + output_filename( strmake( "-I%s", top_dir_path( "include" ))); output_filename( strmake( "-o %s/documentation/api-guide-xml", top_obj_dir )); output_filenames( c2man_files ); output( "\n" ); @@ -1887,8 +1879,8 @@ if (top_obj_dir) { char *testres = replace_extension( testdll, ".dll", "_test.res" ); - output( "all: %s/programs/winetest/%s\n", top_obj_dir, testres ); - output( "%s/programs/winetest/%s: %s%s\n", top_obj_dir, testres, stripped, dllext ); + output( "all: %s/%s\n", top_obj_dir_path( "programs/winetest" ), testres ); + output( "%s/%s: %s%s\n", top_obj_dir_path( "programs/winetest" ), testres, stripped, dllext ); output( "\techo \"%s TESTRES \\\"%s%s\\\"\" | $(WRC) -o $@\n", testmodule, stripped, dllext ); } @@ -1912,7 +1904,7 @@ strarray_add( &phony_targets, "crosstest" ); } - output( "testlist.c: $(MAKECTESTS) %s\n", src_dir ? strmake("%s/Makefile.in", src_dir ) : "Makefile.in" ); + output( "testlist.c: $(MAKECTESTS) %s\n", src_dir_path( "Makefile.in" )); output( "\t$(MAKECTESTS) -o $@" ); output_filenames( test_files ); output( "\n" ); @@ -2139,8 +2131,7 @@ if (use_msvcrt) { strarray_add( &dllflags, get_expanded_make_variable( "MSVCRTFLAGS" )); - strarray_add( &include_args, - strmake( "-I%s/include/msvcrt", top_src_dir ? top_src_dir : top_obj_dir )); + strarray_add( &include_args, strmake( "-I%s", top_dir_path( "include/msvcrt" ))); } list_init( &sources );