Module: wine
Branch: refs/heads/master
Commit: 39a1a9422149a0d3d081f02d540423eac131bfaa
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=39a1a9422149a0d3d081f02…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Tue Feb 21 19:30:29 2006 +0100
shell32: Use more reasonable timeouts in shlexec test.
---
dlls/shell32/tests/shlexec.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c
index b2652f2..98a3819 100644
--- a/dlls/shell32/tests/shlexec.c
+++ b/dlls/shell32/tests/shlexec.c
@@ -112,7 +112,7 @@ static int shell_execute(LPCSTR operatio
if (rc>=32)
{
int wait_rc;
- wait_rc=WaitForSingleObject(hEvent, 60000);
+ wait_rc=WaitForSingleObject(hEvent, 5000);
ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc);
}
/* The child process may have changed the result file, so let profile
@@ -172,10 +172,10 @@ static int shell_execute_ex(DWORD mask,
int wait_rc;
if (sei.hProcess!=NULL)
{
- wait_rc=WaitForSingleObject(sei.hProcess, 60000);
+ wait_rc=WaitForSingleObject(sei.hProcess, 5000);
ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject(hProcess) returned %d\n", wait_rc);
}
- wait_rc=WaitForSingleObject(hEvent, 60000);
+ wait_rc=WaitForSingleObject(hEvent, 5000);
ok(wait_rc==WAIT_OBJECT_0, "WaitForSingleObject returned %d\n", wait_rc);
}
/* The child process may have changed the result file, so let profile
Module: wine
Branch: refs/heads/master
Commit: a05e712cb82cb6c4bdb73205f86bfb06608b1a32
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=a05e712cb82cb6c4bdb7320…
Author: Jeff Latimer <lats(a)yless4u.com.au>
Date: Tue Feb 21 20:24:24 2006 +1100
usp10: Add ScriptPlace funtionality.
The key function is to calculate the total of the ABC widths of the
characters converted to gylphs by ScriptShape.
---
dlls/usp10/tests/usp10.c | 4 ++-
dlls/usp10/usp10.c | 57 ++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 57 insertions(+), 4 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 5a0cc7d..a81af2e 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -148,7 +148,7 @@ START_TEST(usp10)
if (hr ==0) {
hr = ScriptPlace(NULL, &psc, pwOutGlyphs, pcGlyphs, psva, &pItem[0].a, piAdvance,
pGoffset, pABC);
- todo_wine ok (hr == 0, "Should return 0 not (%08x)\n", (unsigned int) hr);
+ ok (hr == 0, "Should return 0 not (%08x)\n", (unsigned int) hr);
}
/* This test will check to make sure that SCRIPT_CACHE is reused and that not translation *
@@ -182,7 +182,7 @@ START_TEST(usp10)
if (hr ==0) {
hr = ScriptPlace(NULL, &psc, pwOutGlyphs, pcGlyphs, psva, &pItem[0].a, piAdvance,
pGoffset, pABC);
- todo_wine ok (hr == 0, "ScriptPlace should return 0 not (%08x)\n", (unsigned int) hr);
+ ok (hr == 0, "ScriptPlace should return 0 not (%08x)\n", (unsigned int) hr);
}
}
hr = ScriptFreeCache( &psc);
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index dd7832d..374b387 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -368,12 +368,65 @@ HRESULT WINAPI ScriptPlace(HDC hdc, SCRI
int cGlyphs, const SCRIPT_VISATTR *psva,
SCRIPT_ANALYSIS *psa, int *piAdvance, GOFFSET *pGoffset, ABC *pABC )
{
- FIXME("(%p,%p,%p,%s,%d, %p, %p, %p): stub\n", hdc, psc, pwGlyphs,
+ HDC phdc;
+ int wcnt;
+ LPABC lpABC;
+ Scriptcache *pScriptcache;
+ FIXME("(%p, %p, %p, %s, %d, %p, %p, %p): semi-stub\n", hdc, psc, pwGlyphs,
debugstr_w(pwGlyphs),
cGlyphs, psva, psa,
piAdvance);
- return E_NOTIMPL;
+ /* We need a valid hdc to do any of the font calls. The spec says that hdc is optional and
+ * psc will be used first. If psc and hdc are not specified E_PENDING is returned to get
+ * the caller to return the hdc. For convience, the hdc is cached in SCRIPT_CACHE. */
+
+ if (!hdc && !*psc) {
+ TRACE("No Script_Cache (psc) and no hdc. Ask for one. Hdc=%p, psc=%p\n", hdc, *psc);
+ return E_PENDING;
+ } else
+ if (hdc && !*psc) {
+ pScriptcache = HeapAlloc( GetProcessHeap(), 0, sizeof(Scriptcache) );
+ pScriptcache->hdc = hdc;
+ phdc = hdc;
+ *psc = pScriptcache;
+ } else
+ if (*psc) {
+ pScriptcache = *psc;
+ phdc = pScriptcache->hdc;
+ }
+
+ /* Here we need to calculate the width of the run unit. At this point the input string
+ * has been converted to glyphs and we till need to translate back to the original chars
+ * to get the correct ABC widths. To make life easier the ABC widths are saved in the
+ * SCRIPT_CACHE. This is ok as the cache must be invalidated if the font or font size
+ * changes. */
+
+ lpABC = pScriptcache->CharWidths;
+ pABC->abcA = 0;
+ pABC->abcB = 0;
+ pABC->abcC = 0;
+ if (!pScriptcache->HaveWidths) {
+ if (GetCharABCWidthsW(phdc, 0, 255, lpABC ))
+ pScriptcache->HaveWidths = 1;
+ else {
+ WARN("Could not get ABC values\n");
+ }
+ }
+
+ for (wcnt = 0; wcnt < cGlyphs ; wcnt++) { /* add up the char lengths */
+ TRACE(" Glyph=%04x, abcA=%d, abcB=%d, abcC=%d wcnt=%d\n",
+ pwGlyphs[wcnt],
+ lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcA,
+ lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcB,
+ lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcC, wcnt);
+ pABC->abcA += lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcA;
+ pABC->abcB += lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcB;
+ pABC->abcC += lpABC[pScriptcache->GlyphToChar[pwGlyphs[wcnt]]].abcC;
+ }
+ TRACE("Total for run: abcA=%d, abcB=%d, abcC=%d\n", pABC->abcA, pABC->abcB, pABC->abcC);
+
+ return 0;
}
/***********************************************************************
Module: wine
Branch: refs/heads/master
Commit: b24e69dc38217cc2fe1c79a080e8d523597407c4
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b24e69dc38217cc2fe1c79a…
Author: Roderick Colenbrander <thunderbird2k(a)gmx.net>
Date: Mon Feb 20 23:01:08 2006 +0100
d3d8: Move the capability detection code over to WineD3D.
Let the few existing parts which need the capabiliteis use the WineD3D
capability structure (gl_info). This info structure contains next to
'flags' inidicating certain features also all GL/GLX functions
pointers. Because D3D8 moves over to the wined3d gl_info structure all
the gl prototypes in d3dcore_gl.h were unneeded and removed.
---
dlls/d3d8/d3d8_private.h | 238 +++++++++++++
dlls/d3d8/d3dcore_gl.h | 838 ----------------------------------------------
dlls/d3d8/directx.c | 361 --------------------
dlls/d3d8/shader.c | 3
dlls/wined3d/device.c | 7
dlls/wined3d/directx.c | 10 +
6 files changed, 242 insertions(+), 1215 deletions(-)
Diff: http://source.winehq.org/git/?p=wine.git;a=commitdiff;h=b24e69dc38217cc2fe1…