Lock fail?

I’ve got this error:

Direct3D8: (ERROR) :Driver failed Lock request: -2005532131

in the debug spew, after each SDL_SetVideoMode(), even when it does not
fail. The error code translates to DDRAW as facility code, and 541 (0x21D)
as error code, that is not listed in DDRAW.H.
System is Win2K + GeForce 2 MX + Detonator 6.31. Since all seems to work
well, I would not care, but some testers report crashes when changing

Moreover, I’ve noticed that most DX5 code uses a direct comparison to DD_OK
for the result of DDRAW calls. This is potentially dangerous since the COM
standard mandates (*) the use of FAILED() and SUCCEEDED() macros to check if
a method has failed.

Does someone know about this bug/issue? Looking at the code, I can see a
Lock() used by DX5_AllocDDSurface() (called internally by
DX5_SetVideoMode()), used just to get the pitch, and check if the
SetSurfaceDesc() worked. Maybe is this the call that fails for some reasons?
And could this be related to the crashes?

Thanks in advance.

(*) I may be wrong here, don’t remember exactly. Anyway, Microsoft advocates
its use always, and there are several partial success codes used in DX that
will fail a direct comparison with DD_OK.—
Giovanni Bajo
Lead Programmer

Protonic Interactive

  • Black holes are generated when God divides by zero -

Not that it helps any, but I have the exact same setup and am exhibiting the same trouble. Dammit I don’t want to have to drop down to dx7!