Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 119931 - wine direct3d DirectDrawGammaControl error 25
Summary: wine direct3d DirectDrawGammaControl error 25
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Wine Maintainers
URL: http://bugs.winehq.org/show_bug.cgi?i...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-22 08:18 UTC by David
Modified: 2006-08-15 12:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
wine ddraw gamma patch (wine-20060122-gamma.patch,908 bytes, patch)
2006-01-22 21:11 UTC, David
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David 2006-01-22 08:18:00 UTC
I was trying to run Diablo II under wine-0.9.6.  Installed fine but wouldn't start up.  Received message: 'Error 25: A critical error has occured while initializing Direct3D'.

Found wine bug report at
http://bugs.winehq.org/show_bug.cgi?id=3192

I created an ebuild under /usr/local/portage that applied the workaround of shorting out the functions.  Now Diablo II works fine.  I assume the fix removes functionality but it fixed my problem.  Don't know if it would be a problem for some other application.  Don't know when wine people will implement actual fix.

My ebuild was the same as wine-0.9.6.ebuild except for the following diff:

--- /usr/portage/app-emulation/wine/wine-0.9.6.ebuild   2006-01-20 08:35:23.000000000 -0500
+++ wine-0.9.6-r1.ebuild        2006-01-21 17:41:15.000000000 -0500
@@ -83,6 +83,8 @@
        epatch "${FILESDIR}"/wine-20050524-alsa-headers.patch
        epatch "${FILESDIR}"/winearts-kdecvs-fix.patch
        sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in
+       sed -i 's/This->set_gamma_ramp(This, dwFlags, lpGammaRamp)/DD_OK/' dlls/ddraw/surface_gamma.c
+       sed -i 's/This->get_gamma_ramp(This, dwFlags, lpGammaRamp)/DD_OK/' dlls/ddraw/surface_gamma.c
        epatch "${FILESDIR}"/wine-20041019-no-stack.patch #66002
        sed -i '/^MimeType/d' tools/wine.desktop || die #117785
 }
Comment 1 SpanKY gentoo-dev 2006-01-22 11:34:13 UTC
post a patch instead of a sed please ;)
Comment 2 David 2006-01-22 21:11:58 UTC
Created attachment 77883 [details, diff]
wine ddraw gamma patch

I put together a patch that operates a little differently from the sed commands in my previous post.  The sed commands removed the internal function calls and replaced with DD_OK.  The patch makes the function calls (as in the original code) but then returns DD_OK regardless of the returns of the internal function calls.  I tried the patch as part of a build, re-emerged, and Diablo II still worked.
Comment 3 SpanKY gentoo-dev 2006-01-24 16:02:56 UTC
thanks, ive added your patch to wine 0.9.6