Sputuks3 / ddhack

Automatically exported from code.google.com/p/ddhack
0 stars 0 forks source link

ddwrapper Blt is broken (in trunk) #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
this issue is also referenced here: 
http://code.google.com/p/ddhack/issues/detail?id=5#c3 

I now... see that the branch ddhack_abe addresses this issue as well
but it does not look purposed for logging in generic games

however, after spending over an hour figuring this out... I'm going to post 
this anyways 

the Blt function is passing the myIDDrawSurface* to real ddraw...
which results in a failure ( E INVALID ARG ) 
instead Blt should be passing b->m_pIDDrawSurface

return m_pIDDrawSurface->Blt(
    a,
    ( (b) ? (((myIDDrawSurface1*)b)->m_pIDDrawSurface) : b ),
    c,
    d,
    e
);

----

ddwrapper assumes lpDDBltFx will not be NULL, a crash results.
( the game Planescape: Torment passes NULL )

I can't find anything in the regular DDraw specs saying it can be NULL

However, in the ddraw CE specs it says:
"If you do not require any special effects other than scaling when using Blt, 
you can pass NULL as the lpDDBltFx parameter." 

Original issue reported on code.google.com by vippor...@yahoo.com on 5 Dec 2011 at 3:31

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
*doh* nevermind about the first part, at some point I had removed the line:
if (b) b = ((myIDDrawSurface1*)b)->m_pIDDrawSurface;

Original comment by vippor...@yahoo.com on 5 Dec 2011 at 3:43