re: Rude hack fixes Run Time Error 445:Object Doesn't Support This Action
Dave wrote: The following rudely changed function: static HRESULT WINAPI WebBrowser_put_RegisterAsBrowser(... works around wine bug 5183. For me. The app I use to run the test is a VB app written by a friend Can you throw together a minimal test in VB and attach it with source and binary to bug 5183? - Dan
Rude hack fixes Run Time Error 445:Object Doesn't Support This Action
The following rudely changed function: static HRESULT WINAPI WebBrowser_put_RegisterAsBrowser(IWebBrowser2 *iface, VARIANT_BOOL bRegister) { WebBrowser *This = WEBBROWSER_THIS(iface); FIXME("(%p)->(%x)\n", This, bRegister); TRACE("dadebug fake return\n"); /* My rude addition. */ return S_OK; /* My rude addition */ return E_NOTIMPL; } in wine/dlls/shdocvw/webbrowser.c works around wine bug 5183. For me. The app I use to run the test is a VB app written by a friend (not commercial software). I have no idea what the above function is really supposed to do nor any idea how to even find out.I really don't want a web browser running out of VB anyway :-) Note that a couple years ago the app in question worked. But stopped with Run-time error "445":Object doesn't support this action (oleaut32) at some point. If anyone could make a suggestion of something *meaningful* I could do about this that would be great. What if the above simply returned S_OK with a FIXME instead of E_NOTIMPL??? Would that be an acceptable hack for the official source? David Anderson
Re: [5/5] WineD3D: Implement high order patches
Stefan Dösinger wrote: There are other things too which could be moved, but I'm not sure if that would make the code more readable. One big function which does things step by step vs a few smaller functions which disturbs the readflow. All of this code pasted 3 times could probably benefit from some loops over an index. Without knowing anything about the code - typically big if statements are candidates for a sub-function (if (normal))
Re: [5/5] WineD3D: Implement high order patches
Am Freitag, 6. Juli 2007 21:37 schrieb H. Verbeet: > On 06/07/07, Stefan Dösinger <[EMAIL PROTECTED]> wrote: > > The right list this time > > I realize this has already been committed, but is there no way to > split tesselate_rectpatch() up a bit into smaller functions? It's > rather huge at the moment. Ya, it perhaps could / should be split up, but I haven't found a splitup I liked. The most tempting thing would be to move the function parsing the feedback data into a separate function, since the code sort of exists two times. But the two versions are too different, so that doesn't really work. There are other things too which could be moved, but I'm not sure if that would make the code more readable. One big function which does things step by step vs a few smaller functions which disturbs the readflow.
Re: Paul Vriens : kernel32/tests 2/2: Use skip for not implemented function.
Michael Stefaniuc wrote: This patch introduced a lot of dead code. Alexandre Julliard wrote: Module: wine Branch: master Commit: 35edd40f33ba8dce6d2c39fda46c6b5045947c1c URL: http://source.winehq.org/git/wine.git/?a=commit;h=35edd40f33ba8dce6d2c39fda46c6b5045947c1c Author: Paul Vriens <[EMAIL PROTECTED]> Date: Thu Jul 5 16:35:10 2007 +0200 kernel32/tests 2/2: Use skip for not implemented function. --- dlls/kernel32/tests/profile.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/dlls/kernel32/tests/profile.c b/dlls/kernel32/tests/profile.c index 4824ce8..b875134 100644 --- a/dlls/kernel32/tests/profile.c +++ b/dlls/kernel32/tests/profile.c @@ -227,31 +227,37 @@ static void test_profile_sections_names(void) ok( ret == 25, "expected return size 25, got %d\n", ret ); ok( buf[ret+1] == 0 && buf[ret] == 0, "returned buffer not terminated with double-null\n" ); +/* Tests on nonexistent file */ +memset(buf, 0xcc, sizeof(buf)); +ret = GetPrivateProfileSectionNamesA( buf, 10, ".\\not_here.ini" ); +ok( ret == 0, "expected return size 0, got %d\n", ret ); +ok( buf[0] == 0, "returned buffer not terminated with null\n" ); +ok( buf[1] != 0, "returned buffer terminated with double-null\n" ); /* Test with sufficiently large buffer */ +SetLastError(0xdeadbeef); ret = GetPrivateProfileSectionNamesW( bufW, 29, testfile3W ); Looks like some if () is missing here. The skip and return are therefor called unconditionally. Smatch is rightfully complaining about dead code after the return. +{ +skip("GetPrivateProfileSectionNamesW is not implemented\n"); +DeleteFileA( testfile3 ); +return; +} bye michael Sorry about that. just sent a patch to fix that. Thanks for spotting it. Cheers, Paul.
Re: winealsa/dsound: Testers asked for capture patch
Maarten Lankhorst wrote: Since apparantly counter strike goes 2 fps or so when alsa is used and capture is enabled, I was looking to see if that can be speed up,. Since I don't have that game I cannot do it myself, so can someone test attached patch and see if that fixes performance problems? Current GIT is much worse then wine-0.9.40. And this patch makes absolutely no difference. To test, start CS:S and hover over the menu, you should hear clicks. This works fine with 0.9.40, doesn't work at all with GIT. Then go into options menu, this is when DS Capture is being initialized. Everything gets really really slow. And stays this slow until you exit CS:S. This is a bit of improvement over few versions back when things just froze. Vitaliy
winealsa/dsound: Testers asked for capture patch
Sorry, I couldn't notice any improvements using that patch. For your information: From wine-0.9.36 to .39 graphics and sound were very choppy. As of wine-0.9.40 video is still stuck at 4fps but audio plays stutter-free. I think this was caused by your remixing-patch.
Re: programs: Add extrac32
В сообщении от 6 июля 2007 Kirill K. Smirnov написал(a): > > +int PASCAL wWinMain ( HINSTANCE hInstance, HINSTANCE prev, LPWSTR > > cmdline, > > int show ) > > Sorry for asking this too late, but what's the point to use WinMain in pure > console application? 'cmd' and 'xcopy' use wmain. extrac32 is not a pure console app. Native version of it uses shellapi and shows extracting progress... -- Vitaly Lipatov, ALT Linux Team Russia, Saint-Petersburg, www.etersoft.ru
Re: [1/2] gdiplus: rendering of linecaps [try2]
Why do you use M_PI / 2.0 or M_PI / 4.0 and not directly M_PI_2 and M_PI_4? Laurent Evan Stade a écrit : Hi, [try2] Removed non-portable constructs. Changelog: * added helpers that render line caps * added end cap drawing for GdipDrawLineI dlls/gdiplus/graphics.c | 220 ++- dlls/gdiplus/pen.c |5 - 2 files changed, 217 insertions(+), 8 deletions(-) diff --git a/dlls/gdiplus/graphics.c b/dlls/gdiplus/graphics.c index 4765e33..6c40aec 100644 --- a/dlls/gdiplus/graphics.c +++ b/dlls/gdiplus/graphics.c @@ -27,8 +27,11 @@ #include "gdiplus.h" #include "gdiplus_private.h" #include "wine/debug.h" -/* looks-right constant */ +WINE_DEFAULT_DEBUG_CHANNEL(gdiplus); + +/* looks-right constants */ #define TENSION_CONST (0.3) +#define ANCHOR_WIDTH (2.0) static inline INT roundr(REAL x) { @@ -108,6 +111,212 @@ static void calc_curve_bezier_endp(REAL *y = roundr(tension * (yadj - yend) + yend); } +/* Draws the linecap the specified color and size on the hdc. The linecap is in + * direction of the line from x1, y1 to x2, y2 and is anchored on x2, y2. */ +static void draw_cap(HDC hdc, COLORREF color, GpLineCap cap, REAL size, +REAL x1, REAL y1, REAL x2, REAL y2) +{ +HGDIOBJ oldbrush, oldpen; +HBRUSH brush; +HPEN pen; +POINT pt[4]; +REAL theta, dsmall, dbig, dx, dy, invert; + +if(x2 != x1) +theta = atan((y2 - y1) / (x2 - x1)); +else if(y2 != y1){ +theta = M_PI / 2.0 * (y2 > y1 ? 1.0 : -1.0); +} +else +return; + +invert = ((x2 - x1) >= 0.0 ? 1.0 : -1.0); +brush = CreateSolidBrush(color); +pen = CreatePen(PS_SOLID, 1, color); +oldbrush = SelectObject(hdc, brush); +oldpen = SelectObject(hdc, pen); + +switch(cap){ +case LineCapFlat: +break; +case LineCapSquare: +case LineCapSquareAnchor: +case LineCapDiamondAnchor: +size = size * (cap & LineCapNoAnchor ? ANCHOR_WIDTH : 1.0) / 2.0; +if(cap == LineCapDiamondAnchor){ +dsmall = cos(theta + M_PI / 2.0) * size; +dbig = sin(theta + M_PI / 2.0) * size; +} +else{ +dsmall = cos(theta + M_PI / 4.0) * size; +dbig = sin(theta + M_PI / 4.0) * size; +} + +/* calculating the latter points from the earlier points makes them + * look a little better because of rounding issues */ +pt[0].x = roundr(x2 - dsmall); +pt[1].x = roundr(((REAL)pt[0].x) + dbig + dsmall); + +pt[0].y = roundr(y2 - dbig); +pt[3].y = roundr(((REAL)pt[0].y) + dsmall + dbig); + +pt[1].y = roundr(y2 - dsmall); +pt[2].y = roundr(dbig + dsmall + ((REAL)pt[1].y)); + +pt[3].x = roundr(x2 - dbig); +pt[2].x = roundr(((REAL)pt[3].x) + dsmall + dbig); + +Polygon(hdc, pt, 4); + +break; +case LineCapArrowAnchor: +size = size * 4.0 / sqrt(3.0); + +dx = cos(M_PI / 6.0 + theta) * size * invert; +dy = sin(M_PI / 6.0 + theta) * size * invert; + +pt[0].x = roundr(x2 - dx); +pt[0].y = roundr(y2 - dy); + +dx = cos(- M_PI / 6.0 + theta) * size * invert; +dy = sin(- M_PI / 6.0 + theta) * size * invert; + +pt[1].x = roundr(x2 - dx); +pt[1].y = roundr(y2 - dy); + +pt[2].x = roundr(x2); +pt[2].y = roundr(y2); + +Polygon(hdc, pt, 3); + +break; +case LineCapRoundAnchor: +dx = dy = ANCHOR_WIDTH * size / 2.0; + +x2 = (REAL) roundr(x2 - dx); +y2 = (REAL) roundr(y2 - dy); + +Ellipse(hdc, (INT) x2, (INT) y2, roundr(x2 + 2.0 * dx), +roundr(y2 + 2.0 * dy)); +break; +case LineCapTriangle: +size = size / 2.0; +dx = cos(M_PI / 2.0 + theta) * size; +dy = sin(M_PI / 2.0 + theta) * size; + +/* Using roundr here can make the triangle float off the end of the + * line. */ +pt[0].x = ((x2 - x1) >= 0 ? floor(x2 - dx) : ceil(x2 - dx)); +pt[0].y = ((y2 - y1) >= 0 ? floor(y2 - dy) : ceil(y2 - dy)); +pt[1].x = roundr(pt[0].x + 2.0 * dx); +pt[1].y = roundr(pt[0].y + 2.0 * dy); + +dx = cos(theta) * size * invert; +dy = sin(theta) * size * invert; + +pt[2].x = roundr(x2 + dx); +pt[2].y = roundr(y2 + dy); + +Polygon(hdc, pt, 3); + +break; +case LineCapRound: +dx = -cos(M_PI / 2.0 + theta) * size * invert; +dy = -sin(M_PI / 2.0 + theta) * size * invert; + +pt[0].x = ((x2 - x1) >= 0 ? floor(x2 - dx) : ceil(x2 - dx)); +pt[0].y = ((y2 - y1) >= 0 ? floo