Small DDraw problem

Lionel Ulmer lionel.ulmer at free.fr
Sun Feb 11 17:46:58 CST 2001


Hi all,

After seeing the reports on cemw of Grim Fandango not working anymore, I
decided to check it out. Install worked fine, but the game did not work.

It stopped just after doing a SetCooperativeLevel. After some checkings, the
error came from there (file dlls/ddraw/ddraw/main.c) :

HRESULT WINAPI
Main_DirectDraw_SetCooperativeLevel(LPDIRECTDRAW7 iface, HWND hwnd, DWORD cooplevel)
{
(....)
    if ((This->cooperative_level & DDSCL_EXCLUSIVE) &&
            (cooplevel & DDSCL_EXCLUSIVE))
	    return DDERR_EXCLUSIVEMODEALREADYSET;
(....)
}

Grim Fandango did the following :
fixme:ddraw:Main_DirectDraw_SetCooperativeLevel (0x4039a090)->(00000138,00000051)
 - DDSCL_FULLSCREEN DDSCL_ALLOWMODEX DDSCL_EXCLUSIVE 
(...)
fixme:ddraw:Main_DirectDraw_SetCooperativeLevel (0x4039a090)->(00000138,00000011)
 - DDSCL_FULLSCREEN DDSCL_EXCLUSIVE 

I wonder if this test is really needed ? My interpretation of the
'DDERR_EXCLUSIVEMODEALREADYSET' error was that ANOTHER application already
used this flag, not that it was already set for the current application.

Anyway, removing this test fixed Grim Fandango. It now starts fine, except
for some palette problems.

If you agree, I will submit a patch that removes this test :-)

          Lionel

PS: I found out that Grim Fandango eats up my X auto repeat (I need to do a
    'xset r on' after)... I thought that this was removed in recent Wine
    versions ?



More information about the wine-devel mailing list