Module: wine
Branch: master
Commit: de6aba11d4d647cbc82320d8b3aef22551173aa0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=de6aba11d4d647cbc82320d8b…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sat Dec 8 22:34:45 2007 +0100
d3d9: Add a note about a breakage in the refrast.
---
dlls/d3d9/tests/visual.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index 7118b19..125c535 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -4968,7 +4968,15 @@ void test_vshader_input(IDirect3DDevice9 *device)
ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %s\n", DXGetErrorString9(hr));
color = getPixelColor(device, 480, 360);
- /* vs_1_1 may fail, accept the clear color */
+ /* vs_1_1 may fail, accept the clear color
+ *
+ * NOTE: This test fails on the reference rasterizer. In the refrast, the 4 vertices have different colors,
+ * i.e., the whole old stream is read, and not just the last used attribute. Some games require that this
+ * does *not* happen, otherwise they can crash because of a read from a bad pointer, so do not accept the
+ * refrast's result.
+ *
+ * A test app for this behavior is Half Life 2 Episode 2 in dxlevel 95, and related games(Portal, TF2).
+ */
ok(color == 0x000000FF || color == 0x00808080,
"Input test: Quad 2(different colors) returned color 0x%08x, expected 0x000000FF\n", color);
color = getPixelColor(device, 160, 120);
Module: wine
Branch: master
Commit: d22568d094d1ca82632f22216743a5cf728eeb9c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d22568d094d1ca82632f22216…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Tue Dec 18 10:01:05 2007 +0100
shell32/tests: Use GetProcAddress() on SHGetPathFromIDListW() because it is missing on Windows 95.
---
dlls/shell32/tests/shlfolder.c | 47 +++++++++++++++++++++++----------------
1 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c
index 721b9da..59e032e 100644
--- a/dlls/shell32/tests/shlfolder.c
+++ b/dlls/shell32/tests/shlfolder.c
@@ -43,6 +43,7 @@
static IMalloc *ppM;
static HRESULT (WINAPI *pSHBindToParent)(LPCITEMIDLIST, REFIID, LPVOID*, LPCITEMIDLIST*);
+static BOOL (WINAPI *pSHGetPathFromIDListW)(LPCITEMIDLIST,LPWSTR);
static BOOL (WINAPI *pSHGetSpecialFolderPathW)(HWND, LPWSTR, int, BOOL);
static HRESULT (WINAPI *pStrRetToBufW)(STRRET*,LPCITEMIDLIST,LPWSTR,UINT);
static LPITEMIDLIST (WINAPI *pILFindLastID)(LPCITEMIDLIST);
@@ -56,6 +57,7 @@ static void init_function_pointers(void)
hmod = GetModuleHandleA("shell32.dll");
pSHBindToParent = (void*)GetProcAddress(hmod, "SHBindToParent");
+ pSHGetPathFromIDListW = (void*)GetProcAddress(hmod, "SHGetPathFromIDListW");
pSHGetSpecialFolderPathW = (void*)GetProcAddress(hmod, "SHGetSpecialFolderPathW");
pILFindLastID = (void *)GetProcAddress(hmod, (LPCSTR)16);
pILFree = (void*)GetProcAddress(hmod, (LPSTR)155);
@@ -363,10 +365,10 @@ static void test_GetDisplayName(void)
static const WCHAR wszDirName[] = { 'w','i','n','e','t','e','s','t',0 };
/* I'm trying to figure if there is a functional difference between calling
- * SHGetPathFromIDList and calling GetDisplayNameOf(SHGDN_FORPARSING) after
+ * SHGetPathFromIDListW and calling GetDisplayNameOf(SHGDN_FORPARSING) after
* binding to the shellfolder. One thing I thought of was that perhaps
- * SHGetPathFromIDList would be able to get the path to a file, which does
- * not exist anymore, while the other method would'nt. It turns out there's
+ * SHGetPathFromIDListW would be able to get the path to a file, which does
+ * not exist anymore, while the other method wouldn't. It turns out there's
* no functional difference in this respect.
*/
@@ -461,9 +463,12 @@ static void test_GetDisplayName(void)
RemoveDirectoryA(szTestDir);
/* SHGetPathFromIDListW still works, although the file is not present anymore. */
- result = SHGetPathFromIDListW(pidlTestFile, wszTestFile2);
- ok (result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError());
- ok (!lstrcmpiW(wszTestFile, wszTestFile2), "SHGetPathFromIDListW returns incorrect path!\n");
+ if (pSHGetPathFromIDListW)
+ {
+ result = pSHGetPathFromIDListW(pidlTestFile, wszTestFile2);
+ ok (result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError());
+ ok (!lstrcmpiW(wszTestFile, wszTestFile2), "SHGetPathFromIDListW returns incorrect path!\n");
+ }
if(!pSHBindToParent) return;
@@ -793,26 +798,30 @@ static void test_SHGetPathFromIDList(void)
HMODULE hShell32;
LPITEMIDLIST pidlPrograms;
- if(!pSHGetSpecialFolderPathW) return;
+ if(!pSHGetPathFromIDListW || !pSHGetSpecialFolderPathW)
+ {
+ skip("SHGetPathFromIDListW() or SHGetSpecialFolderPathW() is missing\n");
+ return;
+ }
- /* Calling SHGetPathFromIDList with no pidl should return the empty string */
+ /* Calling SHGetPathFromIDListW with no pidl should return the empty string */
wszPath[0] = 'a';
wszPath[1] = '\0';
- result = SHGetPathFromIDListW(NULL, wszPath);
+ result = pSHGetPathFromIDListW(NULL, wszPath);
ok(!result, "Expected failure\n");
ok(!wszPath[0], "Expected empty string\n");
- /* Calling SHGetPathFromIDList with an empty pidl should return the desktop folder's path. */
+ /* Calling SHGetPathFromIDListW with an empty pidl should return the desktop folder's path. */
result = pSHGetSpecialFolderPathW(NULL, wszDesktop, CSIDL_DESKTOP, FALSE);
ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %u\n", GetLastError());
if (!result) return;
- result = SHGetPathFromIDListW(pidlEmpty, wszPath);
+ result = pSHGetPathFromIDListW(pidlEmpty, wszPath);
ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError());
if (!result) return;
- ok(!lstrcmpiW(wszDesktop, wszPath), "SHGetPathFromIDList didn't return desktop path for empty pidl!\n");
+ ok(!lstrcmpiW(wszDesktop, wszPath), "SHGetPathFromIDListW didn't return desktop path for empty pidl!\n");
- /* MyComputer does not map to a filesystem path. SHGetPathFromIDList should fail. */
+ /* MyComputer does not map to a filesystem path. SHGetPathFromIDListW should fail. */
hr = SHGetDesktopFolder(&psfDesktop);
ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr);
if (FAILED(hr)) return;
@@ -827,9 +836,9 @@ static void test_SHGetPathFromIDList(void)
SetLastError(0xdeadbeef);
wszPath[0] = 'a';
wszPath[1] = '\0';
- result = SHGetPathFromIDListW(pidlMyComputer, wszPath);
- ok (!result, "SHGetPathFromIDList succeeded where it shouldn't!\n");
- ok (GetLastError()==0xdeadbeef, "SHGetPathFromIDList shouldn't set last error! Last error: %u\n", GetLastError());
+ result = pSHGetPathFromIDListW(pidlMyComputer, wszPath);
+ ok (!result, "SHGetPathFromIDListW succeeded where it shouldn't!\n");
+ ok (GetLastError()==0xdeadbeef, "SHGetPathFromIDListW shouldn't set last error! Last error: %u\n", GetLastError());
ok (!wszPath[0], "Expected empty path\n");
if (result) {
IShellFolder_Release(psfDesktop);
@@ -881,7 +890,7 @@ static void test_SHGetPathFromIDList(void)
"returned incorrect path for file placed on desktop\n");
}
- result = SHGetPathFromIDListW(pidlTestFile, wszPath);
+ result = pSHGetPathFromIDListW(pidlTestFile, wszPath);
ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError());
IMalloc_Free(ppM, pidlTestFile);
if (!result) return;
@@ -896,9 +905,9 @@ static void test_SHGetPathFromIDList(void)
ok(SUCCEEDED(hr), "SHGetFolderLocation failed: 0x%08x\n", hr);
SetLastError(0xdeadbeef);
- result = SHGetPathFromIDListW(pidlPrograms, wszPath);
+ result = pSHGetPathFromIDListW(pidlPrograms, wszPath);
IMalloc_Free(ppM, pidlPrograms);
- ok(result, "SHGetPathFromIDList failed\n");
+ ok(result, "SHGetPathFromIDListW failed\n");
}
static void test_EnumObjects_and_CompareIDs(void)